Skip to content

Commit f6d36b6

Browse files
committed
CABPI-429: Review and Update Project Documentation
1 parent 5025e63 commit f6d36b6

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

app/code/Magento/AdminAdobeIms/README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To rebuild the minified css run the command `./node_modules/.bin/postcss -o dist
6262
For the AdobeIMS Login we provide a redirect_uri on the request. After a successful Login in AdobeIMS, we get redirected to provided redirect_uri.
6363

6464
In the ImsCallback Controller we get the access_token and then the user profile.
65-
We then check if the assigned organization is valid and if the user does exist in the magento database, before we complete the user login in Magento.
65+
We then check if the assigned organization is valid and if the user does exist in the Magento database, before we complete the user login in Magento.
6666

6767
If there went something wrong during the authorization, the user gets redirected to the admin login page and an error message is shown.
6868

@@ -97,7 +97,7 @@ If token is not valid, session will be destroyed.
9797
The logout from Adobe IMS Service is performed when Magento Admin User is logged out.
9898
It's triggered by the event `controller_action_predispatch_adminhtml_auth_logout`
9999

100-
We do external LogOut by call to IMS. Session revoke is standard magento behavior
100+
We do external LogOut by call to IMS. Session revoke is standard Magento behavior
101101

102102
# Admin Created Email
103103
We created an Observer for the `admin_user_save_after` event. \
@@ -112,11 +112,11 @@ The notification mail will be sent inside our `AdminNotificationService` where w
112112
# Error Handling
113113
For the AdminAdobeIms Module we have two specific error messages and one general error message which are shown on the Admin Login page when an error occured.
114114

115-
###AdobeImsTokenAuthorizationException
115+
### AdobeImsTokenAuthorizationException
116116
Will be thrown when there was an error during the authorization. \
117-
e. g. a call to AdobeIMS fails or there was no matching admin found in the magento database.
117+
e. g. a call to AdobeIMS fails or there was no matching admin found in the Magento database.
118118

119-
###AdobeImsOrganizationAuthorizationException
119+
### AdobeImsOrganizationAuthorizationException
120120
Will be thrown when the admin user who wants to log in does not have the configured organization ID assigned to his AdobeIMS Profile.
121121

122122
### Error logging
@@ -128,26 +128,27 @@ Logging can be enabled or disabled in the config on changing the value for `adob
128128
There you can switch the toggle for `Enable Logging for Admin Adobe IMS Module`
129129

130130
# Password usage in Admin UI
131-
When the AdobeAdminIMS Module is enabled, we do not need any password fields in the magento admin backend anymore.
131+
When the AdobeAdminIMS Module is enabled, we do not need any password fields in the Magento admin backend anymore.
132132

133-
So we hide the "Current User Verification" fields and removed the "Password" and "Password Confirmation" fields of the user forms.
134-
This is done by the Plugin `\Magento\AdminAdobeIms\Plugin\RemovePasswordAndUserConfirmationFormFieldsPlugin`.
135-
Here we remove the password and password confirmation field, and hide the current user verification fieldset.
133+
So we removed the "Password" and "Password Confirmation" fields of the user forms.
134+
This is done by the plugin `\Magento\AdminAdobeIms\Plugin\RemovePasswordAndUserConfirmationFormFieldsPlugin`.
135+
Here we remove the password and password confirmation field.
136136
As the verification field is just hidden, we set a random password to bypass the input filters of the Save and Delete user Classes.
137-
The `\Magento\AdminAdobeIms\Plugin\RemoveUserValidationRulesPlugin` Plugin is required to remove the password fields from the form validation.
137+
The `\Magento\AdminAdobeIms\Plugin\RemoveUserValidationRulesPlugin` plugin is required to remove the password fields from the form validation.
138+
We update the "Current User Identity Verification" fieldset to add "Verify Identity with Adobe IMS" button instead "Your Password" field.
139+
This is done by the plugins: `Magento\AdminAdobeIms\Plugin\Block\Adminhtml\User\Edit\Tab\AddReAuthVerification`, `Magento\AdminAdobeIms\Plugin\Block\Adminhtml\System\Account\Edit\AddReAuthVerification`, `Magento\AdminAdobeIms\Plugin\Block\Adminhtml\User\Role\Tab\AddReAuthVerification` and `Magento\AdminAdobeIms\Plugin\Block\Adminhtml\Integration\Edit\Tab\AddReAuthVerification`.
138140

139-
As we don't show the current user verification field anymore, we have the `\Magento\AdminAdobeIms\Plugin\ReplaceVerifyIdentityWithImsPlugin` Plugin to verify the `access_token` of the current admin user in AdobeIMS and only proceed when it is still valid.
141+
As we update the current user verification field, we have the `\Magento\AdminAdobeIms\Plugin\ReplaceVerifyIdentityWithImsPlugin` plugin to verify the `AdobeReAuthToken` of the current admin user in AdobeIMS and only proceed when it is valid.
140142

141143
For the newly created user will be a random password generated, as we did not modify the admin_user table, where the password field can not be null.
142144
This is done in the `\Magento\AdminAdobeIms\Plugin\UserSavePlugin`.
143145

144-
We also disabled the "Change password in 30 days" functionally, as we don't need the magento admin user password for the login.
146+
We also disabled the "Change password in 30 days" functionally, as we don't need the Magento admin user password for the login.
145147
This can be found in the `\Magento\AdminAdobeIms\Plugin\DisableForcedPasswordChangePlugin` and `\Magento\AdminAdobeIms\Plugin\DisablePasswordResetPlugin` Plugins.
146148

147149
When the AdminAdobeIMS Module is disabled, the user can not be log in when using an empty password.
148150
Instead, the forgot password function must be used to reset the password.
149151

150-
151152
# WEB API authentication using IMS ACCESS_TOKEN
152153
When Admin Adobe IMS is enabled, Adobe Commerce admin users will stop having credentials (username and password).
153154
These admin user credentials are needed for getting token that can be used to make requests to admin web APIs.
@@ -171,7 +172,7 @@ Magento has setting: Stores > Settings > Configuration > Services > OAuth > Acce
171172
Both of values are checked in function isTokenExpired \Magento\AdminAdobeIms\Model\TokenReader.
172173
it means that with default values is not possible to use tokens that older than 4h.
173174

174-
###IMS access token verification.
175+
### IMS access token verification.
175176
To verify token a public key is required. For more info https://wiki.corp.adobe.com/display/ims/IMS+public+key+retrieval
176177
In Admin Adobe Ims module was defined path where certificate has to be downloaded from.
177178
By default, in config.xml, these value for production.
@@ -195,7 +196,7 @@ Examples, how developers can test functionality:
195196
curl -X GET "{domain}/rest/V1/customers/2" -H "Authorization: Bearer AddAdobeImsAccessToken"
196197
curl -X GET "{domain}/rest/V1/products/24-MB01" -H "Authorization: Bearer AddAdobeImsAccessToken"
197198

198-
###Two-factor authentication.
199+
### Two-factor authentication.
199200
During CLI enablement of the module, the admin user is asked, whether 2FA is enabled for him on Adobe side.
200201
If the answer is yes, Magento TFA module (if it's present in the code base), should be disable.
201202

0 commit comments

Comments
 (0)