-
Notifications
You must be signed in to change notification settings - Fork 9.4k
AC-2466 - Added ability to retrieve config paths instead of XML paths for use when re-encrypting data #37705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.4-develop
Are you sure you want to change the base?
Conversation
… for use when re-encrypting data
Hi @Skullsneeze. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Will take a look at the failing build. I believe there is a proxy class which is causing the builds to fail |
…gfix/AC-2466-fix-data-re-encryption-on-key-change
… github.com:Skullsneeze/magento2 into bugfix/AC-2466-fix-data-re-encryption-on-key-change
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
…gfix/AC-2466-fix-data-re-encryption-on-key-change
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Looking at the remaining failed test result I'm coming to the following conclusions: Unit test:
Semantic version checker:
Functional test (B2B, CE, EE):
|
@magento run Sample Data Tests CE, Sample Data Tests EE, Sample Data Tests B2B |
Failed to run the builds. Please try to re-run them later. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Description (*)
This PR aims to resolve issue #35061. The issue describes how data is not re-encrypted when a new encryption key is being generated.
I found that the
Change
controller retrieves all config fields from the XML structure based on thebackend_model
being set to\Magento\Config\Model\Config\Backend\Encrypted
. While this works, the paths which are returned are the full XML paths. There is however an option to define a<config_path>
node, which will be used in thecore_config_data
table to store the configuration value.Since the Controller checks directly against this table, a lot of paths seem to be "incorrect" and are not retrieved as values to re-encrypt.
In this PR I added a parameter (for backward compatibility) to retrieve the config path, instead of the full XML path.
Related Pull Requests
N/A
Fixed Issues (if relevant)
Manual testing scenarios (*)
config:store:get --decrypt paypal/wpp/api_password
)config:store:get --decrypt paypal/wpp/api_password
)Questions or comments
\Magento\Config\Model\Config\Structure::_getGroupFieldPathsByAttribute
could be simplified to a simple:$field['config_path'] ?? $parentPath . '/' . $field['id']
.Contribution checklist (*)