Skip to content

Commit 1dc54b7

Browse files
committed
Docs fixes
1 parent 2f74114 commit 1dc54b7

File tree

6 files changed

+72
-44
lines changed

6 files changed

+72
-44
lines changed

.github/CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Contributions to the Adobe IMS codebase are done using the fork & pull model.
44
This contribution model has contributors maintaining their own fork of the Adobe IMS repository.
5-
The forked repository is then used to submit a request to the base repository to pull a set of changes.
5+
The forked repository is then used to submit a request to the base repository to "pull" a set of changes.
66
For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
77

88
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes or optimizations.
@@ -15,14 +15,14 @@ For more detailed information on contribution please read our [beginners guide](
1515

1616
## Contribution requirements
1717

18-
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.3/coding-standards/bk-coding-standards.html).
18+
1. Contributions must adhere to the [coding standards](https://developer.adobe.com/commerce/php/coding-standards/).
1919
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
2020
3. Commits must be accompanied by meaningful commit messages. Please see the [Adobe IMS Pull Request Template](https://github.com/magento/adobe-ims/blob/master/.github/PULL_REQUEST_TEMPLATE.md) for more information.
2121
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
22-
3. PRs which include new logic or new features must be submitted along with:
23-
* Unit/integration test coverage
24-
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
25-
4. For larger features or changes, please [open an issue](https://github.com/magento/adobe-ims/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
22+
5. PRs which include new logic or new features must be submitted along with:
23+
* Unit/integration test coverage
24+
* Proposed [documentation](https://developer.adobe.com/commerce) updates. Use feedback buttons __Edit in GitHub__ and __Log an issue__ at the top of a relevant topic.
25+
6. For larger features or changes, please [open an issue](https://github.com/magento/adobe-ims/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
2626

2727
## Contribution process
2828

@@ -32,7 +32,7 @@ This will allow you to collaborate with the Adobe IMS development team, fork the
3232
1. Search current [listed issues](https://github.com/magento/adobe-ims/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
3333
2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing.
3434
3. Create and test your work.
35-
4. Fork the Adobe IMS repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#pull_request).
35+
4. Fork the Adobe IMS repository according to the [Forks and pull requests instructions](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#forks-and-pull-requests).
3636
5. Once your contribution is received the Adobe IMS development team will review the contribution and collaborate with you as needed.
3737

3838
## Code of Conduct

AdminAdobeIms/README.md

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# Magento_Admin_Adobe_Ims module
2+
23
The Magento_Admin_Adobe_Ims module contains integration with Adobe IMS for backend authentication.
34

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).
5+
For information about module installation, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html).
6+
7+
## CLI command usage
8+
9+
### bin/magento admin:adobe-ims:enable
510

6-
# CLI command usage:
7-
## bin/magento admin:adobe-ims:enable
811
Enables the AdminAdobeIMS Module. \
912
Required values are `Organization ID`, `Client ID`, `Client Secret` and `2FA enabled`
1013

1114
When AdminAdobeIms module is enabled, new role `Adobe Ims` is created by default.
1215

13-
### Argument Validation
16+
#### Argument Validation
17+
1418
On enabling the AdminAdobeIMS Module, the input arguments will be validated. \
1519
The pattern for the validation are configured in the di.xml
1620

@@ -31,27 +35,32 @@ For the Organization ID, Client ID and Client Secret, we check if they contain o
3135
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.
3236
Also make sure 2FA is enabled for the Organization in Adobe Admin Console.
3337

34-
## bin/magento admin:adobe-ims:disable
38+
### bin/magento admin:adobe-ims:disable
39+
3540
Disables the AdminAdobeIMS Module.
3641
When disabling, the `Organization ID`, `Client ID` and `Client Secret` values will be deleted from the config.
3742

38-
## bin/magento admin:adobe-ims:status
43+
### bin/magento admin:adobe-ims:status
44+
3945
Shows if the AdminAdobeIMS Module is enabled or disabled
4046

41-
## bin/magento admin:adobe-ims:info
47+
### bin/magento admin:adobe-ims:info
48+
4249
Example of getting data if Admin Adobe Ims module is enabled:\
4350
Client ID: 1234567890a \
4451
Organization ID: 1234567890@org \
4552
Client Secret configured
4653

4754
If Admin Adobe Ims module is disabled, cli command will show message "Module is disabled"
4855

49-
# Admin Login design
56+
## Admin Login design
57+
5058
The admin login design changes when the AdminAdobeIms module is enabled and configured correctly via the CLI command.
5159
We have added the customer layout handle `adobe_ims_login` to deal with all the design changes.
5260
This handle is added via `\Magento\AdminAdobeIms\Plugin\AddAdobeImsLayoutHandlePlugin::afterAddDefaultHandle`.
5361

5462
The layout file `view/adminhtml/layout/adobe_ims_login.xml` adds:
63+
5564
* The bundled [Adobe Spectrum CSS](https://opensource.adobe.com/spectrum-css/).
5665
* New classes to current Magento html items,
5766
* Our new "Login with Adobe ID" button template,
@@ -60,33 +69,38 @@ The layout file `view/adminhtml/layout/adobe_ims_login.xml` adds:
6069
We have included the minified css and the used svgs from Spectrum CSS with our module, but you can also use npm to install the latest versions.
6170
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.
6271

63-
# AdminAdobeIMS Callback
72+
## AdminAdobeIMS Callback
73+
6474
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.
6575

6676
In the ImsCallback Controller, we call the UserContextInterface and redirected to AdobeImsAdminTokenUserContext which is responsible for Authorization related operations.
6777

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

70-
There is a dispatch method created for validating the state of IMS. To prevent CSRF Threat against OAuth 2 redirect-uri, an additional param ‘state’ is added to the redirect URL and the code is verifying whether it is the same returned after authentication from IMS.
80+
There is a dispatch method created for validating the state of IMS. To prevent CSRF Threat against OAuth 2 redirect-uri, an additional param 'state' is added to the redirect URL and the code is verifying whether it is the same returned after authentication from IMS.
81+
82+
## AdobeImsAdminTokenUserContext Authorization
7183

72-
# AdobeImsAdminTokenUserContext Authorization
7384
This provides a unified way of implementing UserContextInterface for authorization and login to the Admin Panel. Model class method getUserId() ensures the user is already logged in by checking if access_token is already present in the session and returns the user id.
7485

7586
If not logged in, it calls AdobeImsAdminTokenUserService and authenticates an admin user by getting access_token and redirecting to Admin Dashboard if login is successful in AdobeIMS.
7687

77-
# AdobeImsAdminTokenUserService Service
88+
## AdobeImsAdminTokenUserService Service
89+
7890
In the AdobeImsAdminTokenUserService service class, we call AdobeIMS API and get the access_token. After that, we get the user profile and also verify if the assigned organization is valid. If the user exists in the Magento database, it gets successfully logged in to Magento Admin.
7991

8092
If the user doesn't exist in Magento database, it creates the user with new role `Adobe Ims` assigned and profile info gets inherited from AdobeIMS.
8193

82-
# Organization ID Validation
94+
## Organization ID Validation
95+
8396
During the authorization we check if the configured `Organization ID` provided on the enabling CLI command is assigned to the user.
8497

8598
In the profile response from Adobe IMS must be a `roles` array. There we have all assigned organizations to the user.
8699

87100
We compare if the configured organization ID does exist in this array and also the structure of the organization ID is valid.
88101

89-
# Admin Backend Login
102+
## Admin Backend Login
103+
90104
Login with the help Adobe IMS Service is implemented. The redirect to Adobe IMS Service is performed-
91105
The redirect from Adobe IMS is done to \Magento\AdminAdobeIms\Controller\Adminhtml\OAuth\ImsCallback controller.
92106

@@ -95,7 +109,8 @@ client id (api key) and client secret (private key).
95109
The token response access token is used for getting user profile information.
96110
If this is successful, the admin user will be logged in and the access tokens is added to session as well as token_last_check_time value.
97111

98-
# ACCESS_TOKEN saving in session and validation
112+
## ACCESS_TOKEN saving in session and validation
113+
99114
When AdminAdobeIms module is enabled, we check each 10 minutes if ACCESS_TOKEN is still valid.
100115
For this when admin user login and when session is started, we add 2 extra variables to the session:
101116
token_last_check_time is current time
@@ -106,13 +121,15 @@ If yes, then we make call to IMS to validate access_token.
106121
If token is valid, value token_last_check_time will be updated to current time and session prolong.
107122
If token is not valid, session will be destroyed.
108123

109-
# Admin Backend Logout
124+
## Admin Backend Logout
125+
110126
The logout from Adobe IMS Service is performed when Magento Admin User is logged out.
111127
It's triggered by the event `controller_action_predispatch_adminhtml_auth_logout`
112128

113129
We do external LogOut by call to IMS. Session revoke is standard Magento behavior
114130

115-
# Admin Created Email
131+
## Admin Created Email
132+
116133
We created an Observer for the `admin_user_save_after` event. \
117134
There we check if the customer object is newly created or not. \
118135
When a new admin user got created in Magento, he will then receive an email with further information on how to login.
@@ -122,25 +139,30 @@ They are called `admin_adobe_ims_email_header_template` and `admin_adobe_ims_ema
122139

123140
The notification mail will be sent inside our `AdminNotificationService` where we can add and modify the template variables.
124141

125-
# Error Handling
142+
## Error Handling
143+
126144
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.
127145

128146
### AdobeImsTokenAuthorizationException
147+
129148
Will be thrown when there was an error during the authorization. \
130149
e. g. a call to AdobeIMS fails or there was no matching admin found in the Magento database.
131150

132151
### AdobeImsOrganizationAuthorizationException
152+
133153
Will be thrown when the admin user who wants to log in does not have the configured organization ID assigned to his AdobeIMS Profile.
134154

135155
### Error logging
156+
136157
Whenever an exception is thrown during the Adobe IMS Login, we will log the specific exception message but show a general error message on the admin login form.
137158

138159
Errors are logged into the `/var/log/admin_adobe_ims.log` file.
139160

140161
Logging can be enabled or disabled in the config on changing the value for `adobe_ims\integration\logging_enabled` or in the Magento Admin Configuration under `Advanced > Developer > Debug`. \
141162
There you can switch the toggle for `Enable Logging for Admin Adobe IMS Module`
142163

143-
# Password usage in Admin UI
164+
## Password usage in Admin UI
165+
144166
When the AdobeAdminIMS Module is enabled, we do not need any password fields in the Magento admin backend anymore.
145167

146168
So we removed the "Password" and "Password Confirmation" fields of the user forms.
@@ -162,7 +184,8 @@ This can be found in the `\Magento\AdminAdobeIms\Plugin\DisableForcedPasswordCha
162184
When the AdminAdobeIMS Module is disabled, the user can not be log in when using an empty password.
163185
Instead, the forgot password function must be used to reset the password.
164186

165-
# WEB API authentication using IMS ACCESS_TOKEN
187+
## WEB API authentication using IMS ACCESS_TOKEN
188+
166189
When Admin Adobe IMS is enabled, Adobe Commerce admin users will stop having credentials (username and password).
167190
These admin user credentials are needed for getting token that can be used to make requests to admin web APIs.
168191
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.
@@ -185,12 +208,14 @@ Magento has setting: Stores > Settings > Configuration > Services > OAuth > Acce
185208
Both of values are checked in function isTokenExpired \Magento\AdminAdobeIms\Model\TokenReader.
186209
it means that with default values is not possible to use tokens that older than 4h.
187210

188-
### IMS access token verification.
189-
To verify token a public key is required. For more info https://wiki.corp.adobe.com/display/ims/IMS+public+key+retrieval
211+
### IMS access token verification
212+
213+
To verify token a public key is required.
190214
In Admin Adobe Ims module was defined path where certificate has to be downloaded from.
191215
By default, in config.xml, these value for production.
192216
For testing reasons, developers can override this value, for example in env.php file like this:
193-
```
217+
218+
```php
194219
'system' => [
195220
'default' => [
196221
'adobe_ims' => [
@@ -201,6 +226,7 @@ For testing reasons, developers can override this value, for example in env.php
201226
]
202227
]
203228
```
229+
204230
Certificate value is cached.
205231

206232
This authentication mechanism enabled for REST and SOAP web API areas.
@@ -209,14 +235,16 @@ Examples, how developers can test functionality:
209235
curl -X GET "{domain}/rest/V1/customers/2" -H "Authorization: Bearer AddAdobeImsAccessToken"
210236
curl -X GET "{domain}/rest/V1/products/24-MB01" -H "Authorization: Bearer AddAdobeImsAccessToken"
211237

212-
### Two-factor authentication.
238+
### Two-factor authentication
239+
213240
During CLI enablement of the module, the admin user is asked, whether 2FA is enabled for Organization in Adobe Admin Console.
214241
If the answer is yes, Magento TFA module (if it's present in the code base), should be disable.
215242

216243
For this purpose the additional config value was added, this config value is read by Magento_TwoFactorAuth module.
217244
If the config value is not there, the Magento_TwoFactorAuth functionality works by default.
218245

219-
# Updated Current User Identity Verification
246+
## Updated Current User Identity Verification
247+
220248
The AdobeAdminIms Module updates the handling of the current user identity verification.
221249

222250
Instead of providing the current user password, the user needs to call the AdobeIms reAuth function.

AdminAdobeIms/view/adminhtml/email/new_admin_adobe_ims_admin_created.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</tr>
6363
<tr>
6464
<td class="email-text">
65-
<a class="email-information-link" href="https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html" target="_blank">
65+
<a class="email-information-link" href="https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html" target="_blank">
6666
{{trans "Release notes"}}
6767
</a>
6868
</td>

AdminAdobeImsTwoFactorAuth/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ The Magento_AdminAdobeImsTwoFactorAuth module is responsible to check whether Ad
66

77
Before disabling or uninstalling this module, note that the `Magento_AdminAdobeIms` and `Magento_TwoFactorAuth` modules depends on this module.
88

9-
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).
9+
For information about module installation, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html).
1010

1111
## Extensibility
1212

13-
Extension developers can interact with the Magento_AdminAdobeImsTwoFactorAuth module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
13+
Extension developers can interact with the Magento_AdminAdobeImsTwoFactorAuth module. For more information about the Magento extension mechanism, see [Plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/).
1414

15-
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdminAdobeImsTwoFactorAuth module.
15+
[The dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdminAdobeImsTwoFactorAuth module.
1616

1717
## Additional information
1818

19-
For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html).
19+
For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html).

AdobeIms/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ The Magento_AdobeIms module creates the following tables in the database:
1010

1111
Before disabling or uninstalling this module, note that the `Magento_AdobeStockImageAdminUi` module depends on this module.
1212

13-
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).
13+
For information about module installation, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html).
1414

1515
## Extensibility
1616

17-
Extension developers can interact with the Magento_AdobeIms module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
17+
Extension developers can interact with the Magento_AdobeIms module. For more information about the Magento extension mechanism, see [Plugins](https://developer.adobe.com/commerce/php/development/components/plugins/).
1818

19-
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdobeIms module.
19+
[The dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdobeIms module.
2020

2121
## Additional information
2222

23-
For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html).
23+
For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html).

0 commit comments

Comments
 (0)