Skip to content

Commit

Permalink
Merge pull request #67 from atishgoswami/bugfix/issue#62
Browse files Browse the repository at this point in the history
Addes fixes for app:config:dump exporting sensitive information
  • Loading branch information
thaiphan authored Feb 2, 2019
2 parents d3ff8e9 + 49e96f8 commit d59a902
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 4 additions & 2 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
<resource>Thai_S3::config_s3</resource>
<group id="general" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>General</label>
<field id="access_key" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="access_key" type="obscure" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Access Key</label>
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
</field>
<field id="secret_key" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="secret_key" type="obscure" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Secret Key</label>
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
</field>
<field id="bucket" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Bucket</label>
Expand Down
6 changes: 6 additions & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<system>
<thai_s3>
<general>
<access_key backend_model="Magento\Config\Model\Config\Backend\Encrypted" />
<secret_key backend_model="Magento\Config\Model\Config\Backend\Encrypted" />
</general>
</thai_s3>
<media_storage_configuration>
<allowed_resources>
<attribute_image_folder>attribute</attribute_image_folder>
Expand Down
8 changes: 8 additions & 0 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@
<type name="Magento\Captcha\Model\DefaultModel">
<plugin name="thai_s3_model_captcha_defaultmodel_plugin" type="Thai\S3\Model\Captcha\DefaultModel\Plugin" />
</type>
<type name="Magento\Config\Model\Config\TypePool">
<arguments>
<argument name="sensitive" xsi:type="array">
<item name="thai_s3/general/access_key" xsi:type="string">1</item>
<item name="thai_s3/general/secret_key" xsi:type="string">1</item>
</argument>
</arguments>
</type>
</config>

0 comments on commit d59a902

Please sign in to comment.