Skip to content

Commit

Permalink
Sentitive / Environment information
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix128 committed Feb 9, 2018
1 parent f2d8507 commit 9aaa6a2
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Model/Provider/Engine/Authy.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ class Authy implements EngineInterface
*/
private $token;

/**
* Authy constructor.
* @param UserConfigManagerInterface $userConfigManager
* @param DecoderInterface $decoder
* @param ScopeConfigInterface $scopeConfig
* @param Token $token
* @param Service $service
* @param CurlFactory $curlFactory
*/
public function __construct(
UserConfigManagerInterface $userConfigManager,
DecoderInterface $decoder,
Expand Down
8 changes: 8 additions & 0 deletions Model/Provider/Engine/Authy/OneTouch.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class OneTouch
*/
private $decoder;

/**
* OneTouch constructor.
* @param CurlFactory $curlFactory
* @param UserConfigManagerInterface $userConfigManager
* @param DecoderInterface $decoder
* @param Service $service
* @param StoreManagerInterface $storeManager
*/
public function __construct(
CurlFactory $curlFactory,
UserConfigManagerInterface $userConfigManager,
Expand Down
4 changes: 4 additions & 0 deletions Model/Provider/Engine/Authy/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class Service
*/
private $scopeConfig;

/**
* Service constructor.
* @param ScopeConfigInterface $scopeConfig
*/
public function __construct(ScopeConfigInterface $scopeConfig)
{
$this->scopeConfig = $scopeConfig;
Expand Down
7 changes: 7 additions & 0 deletions Model/Provider/Engine/Authy/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ class Token
*/
private $decoder;

/**
* Token constructor.
* @param UserConfigManagerInterface $userConfigManager
* @param Service $service
* @param DecoderInterface $decoder
* @param CurlFactory $curlFactory
*/
public function __construct(
UserConfigManagerInterface $userConfigManager,
Service $service,
Expand Down
8 changes: 8 additions & 0 deletions Model/Provider/Engine/Authy/Verification.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class Verification
*/
private $dateTime;

/**
* Verification constructor.
* @param CurlFactory $curlFactory
* @param DecoderInterface $decoder
* @param DateTime $dateTime
* @param UserConfigManagerInterface $userConfigManager
* @param Service $service
*/
public function __construct(
CurlFactory $curlFactory,
DecoderInterface $decoder,
Expand Down
4 changes: 4 additions & 0 deletions Model/Provider/Engine/DuoSecurity.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ class DuoSecurity implements EngineInterface
*/
private $scopeConfig;

/**
* DuoSecurity constructor.
* @param ScopeConfigInterface $scopeConfig
*/
public function __construct(
ScopeConfigInterface $scopeConfig
) {
Expand Down
6 changes: 6 additions & 0 deletions Model/Provider/Engine/Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ class Google implements EngineInterface
*/
private $scopeConfig;

/**
* Google constructor.
* @param StoreManagerInterface $storeManager
* @param ScopeConfigInterface $scopeConfig
* @param UserConfigManagerInterface $configManager
*/
public function __construct(
StoreManagerInterface $storeManager,
ScopeConfigInterface $scopeConfig,
Expand Down
11 changes: 11 additions & 0 deletions Model/Provider/Engine/U2fKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ class U2fKey implements EngineInterface
*/
private $scopeConfig;

/**
* U2fKey constructor.
* @param StoreManagerInterface $storeManager
* @param ScopeConfigInterface $scopeConfig
* @param UserConfigManagerInterface $userConfigManager
*/
public function __construct(
StoreManagerInterface $storeManager,
ScopeConfigInterface $scopeConfig,
Expand Down Expand Up @@ -202,6 +208,11 @@ public function isTrustedDevicesAllowed()
return !!$this->scopeConfig->getValue(static::XML_PATH_ALLOW_TRUSTED_DEVICES);
}

/**
* @return U2F
* @throws LocalizedException
* @throws \u2flib_server\Error
*/
private function getU2f()
{
/** @var Store $store */
Expand Down
1 change: 0 additions & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
</field>
</group>


<group id="google" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Google Authenticator</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
Expand Down
18 changes: 18 additions & 0 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@
</arguments>
</type>

<!-- Set sensitive information -->
<type name="Magento\Config\Model\Config\TypePool">
<arguments>
<argument name="sensitive" xsi:type="array">
<item name="msp_securitysuite_twofactorauth/duo/integration_key" xsi:type="string">1</item>
<item name="msp_securitysuite_twofactorauth/duo/secret_key" xsi:type="string">1</item>
<item name="msp_securitysuite_twofactorauth/duo/api_hostname" xsi:type="string">1</item>
<item name="msp_securitysuite_twofactorauth/authy/api_key" xsi:type="string">1</item>
</argument>
<argument name="environment" xsi:type="array">
<item name="msp_securitysuite_twofactorauth/duo/integration_key" xsi:type="string">1</item>
<item name="msp_securitysuite_twofactorauth/duo/secret_key" xsi:type="string">1</item>
<item name="msp_securitysuite_twofactorauth/duo/api_hostname" xsi:type="string">1</item>
<item name="msp_securitysuite_twofactorauth/authy/api_key" xsi:type="string">1</item>
</argument>
</arguments>
</type>

<!-- System 2FA providers list -->
<type name="MSP\TwoFactorAuth\Api\ProviderPoolInterface">
<arguments>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="MSP_TwoFactorAuth" setup_version="2.1.6">
<module name="MSP_TwoFactorAuth" setup_version="2.1.7">
<sequence>
<module name="MSP_SecuritySuiteCommon"/>
<module name="Magento_User"/>
Expand Down

0 comments on commit 9aaa6a2

Please sign in to comment.