You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/code/Magento/AdminAdobeIms/README.md
+4-11Lines changed: 4 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,12 @@
1
1
# Magento_Admin_Adobe_Ims module
2
-
3
2
The Magento_Admin_Adobe_Ims module contains integration with Adobe IMS for backend authentication.
4
3
5
4
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
6
5
7
6
# CLI command usage:
8
7
## bin/magento admin:adobe-ims:enable
9
8
Enables the AdminAdobeIMS Module. \
10
-
Required values are `Organization ID`, `Client ID` and `Client Secret`
9
+
Required values are `Organization ID`, `Client ID`, `Client Secret` and `2FA enabled on AdobeIMS`
11
10
12
11
### Argument Validation
13
12
On enabling the AdminAdobeIMS Module, the input arguments will be validated. \
@@ -19,6 +18,7 @@ The pattern for the validation are configured in the di.xml
@@ -27,6 +27,7 @@ We check if the arguments are not empty, as they are all required.
27
27
28
28
For the Organization ID, Client ID and Client Secret, we check if they contain only alphanumeric characters. \
29
29
Additionally for the Organization ID, we check if it matches 24 characters and optional has the suffix `@AdobeOrg`. But we only store the ID and ignore the suffix.
30
+
Also make sure 2FA is enabled on AdobeIMS.
30
31
31
32
## bin/magento admin:adobe-ims:disable
32
33
Disables the AdminAdobeIMS Module.
@@ -44,7 +45,6 @@ Client Secret configured
44
45
If Admin Adobe Ims module is disabled, cli command will show message "Module is disabled"
45
46
46
47
# Admin Login design
47
-
48
48
The admin login design changes when the AdminAdobeIms module is enabled and configured correctly via the CLI command.
49
49
We have added the customer layout handle `adobe_ims_login` to deal with all the design changes.
50
50
This handle is added via `\Magento\AdminAdobeIms\Plugin\AddAdobeImsLayoutHandlePlugin::afterAddDefaultHandle`.
@@ -59,7 +59,6 @@ We have included the minified css and the used svgs from Spectrum CSS with our m
59
59
To rebuild the minified css run the command `./node_modules/.bin/postcss -o dist/index.min.css index.css` after npm install from inside the web directory.
60
60
61
61
# AdminAdobeIMS Callback
62
-
63
62
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.
64
63
65
64
In the ImsCallback Controller we get the access_token and then the user profile.
@@ -68,15 +67,13 @@ We then check if the assigned organization is valid and if the user does exist i
68
67
If there went something wrong during the authorization, the user gets redirected to the admin login page and an error message is shown.
69
68
70
69
# Organization ID Validation
71
-
72
70
During the authorization we check if the configured `Organization ID` provided on the enabling CLI command is assigned to the user.
73
71
74
72
In the profile response from Adobe IMS must be a `roles` array. There we have all assigned organizations to the user.
75
73
76
74
We compare if the configured organization ID does exist in this array and also the structure of the organization ID is valid.
77
75
78
76
# Admin Backend Login
79
-
80
77
Login with the help Adobe IMS Service is implemented. The redirect to Adobe IMS Service is performed-
81
78
The redirect from Adobe IMS is done to \Magento\AdminAdobeIms\Controller\Adminhtml\OAuth\ImsCallback controller.
82
79
@@ -97,14 +94,12 @@ If token is valid, value token_last_check_time will be updated to current time a
97
94
If token is not valid, session will be destroyed.
98
95
99
96
# Admin Backend Logout
100
-
101
97
The logout from Adobe IMS Service is performed when Magento Admin User is logged out.
102
98
It's triggered by the event `controller_action_predispatch_adminhtml_auth_logout`
103
99
104
100
We do external LogOut by call to IMS. Session revoke is standard magento behavior
105
101
106
102
# Admin Created Email
107
-
108
103
We created an Observer for the `admin_user_save_after` event. \
109
104
There we check if the customer object is newly created or not. \
110
105
When a new admin user got created in Magento, he will then receive an email with further information on how to login.
@@ -154,7 +149,6 @@ Instead, the forgot password function must be used to reset the password.
154
149
155
150
156
151
# WEB API authentication using IMS ACCESS_TOKEN
157
-
158
152
When Admin Adobe IMS is enabled, Adobe Commerce admin users will stop having credentials (username and password).
159
153
These admin user credentials are needed for getting token that can be used to make requests to admin web APIs.
160
154
It means that will be not possible to create token because admin doesn't have credentials. In these case we have to use IMS access token.
curl -X GET "{domain}/rest/V1/products/24-MB01" -H "Authorization: Bearer AddAdobeImsAccessToken"
203
197
204
198
###Two-factor authentication.
205
-
206
199
During CLI enablement of the module, the admin user is asked, whether 2FA is enabled for him on Adobe side.
207
200
If the answer is yes, Magento TFA module (if it's present in the code base), should be disable.
208
201
@@ -222,4 +215,4 @@ When the form will be submitted, we verify the identity with the `Magento/AdminA
222
215
Here the existens of the `AdobeAccessToken` and `AdobeReAuthToken` will be checked.
223
216
The reauth_token will be used to call the AdobeIms validateToken Endpoint.
224
217
225
-
When this call is successfull, the form will be submitted, otherwise we update the Message of the thrown `AuthenticationException` to return a matching error message, done by the `Magento/AdminAdobeIms/Plugin/PerformIdentityCheckMessagePlugin.php` Plugin.
218
+
When this call is successful, the form will be submitted, otherwise we update the Message of the thrown `AuthenticationException` to return a matching error message, done by the `Magento/AdminAdobeIms/Plugin/PerformIdentityCheckMessagePlugin.php` Plugin.
0 commit comments