Skip to content

Commit 6d8a5c1

Browse files
committed
markdownlint autofix
1 parent c542c84 commit 6d8a5c1

File tree

145 files changed

+472
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+472
-248
lines changed

src/pages/module-reference/module-admin-adobe-ims.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ description: README.md contents of the module from the source code
44
---
55

66
# Magento_Admin_Adobe_Ims module
7+
78
The Magento_Admin_Adobe_Ims module contains integration with Adobe IMS for backend authentication.
89

910
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).
1011

1112
# CLI command usage:
13+
1214
## bin/magento admin:adobe-ims:enable
15+
1316
Enables the AdminAdobeIMS Module. \
1417
Required values are `Organization ID`, `Client ID`, `Client Secret` and `2FA enabled`
1518

1619
### Argument Validation
20+
1721
On enabling the AdminAdobeIMS Module, the input arguments will be validated. \
1822
The pattern for the validation are configured in the di.xml
1923

@@ -28,20 +32,23 @@ The pattern for the validation are configured in the di.xml
2832
</type>
2933
```
3034

31-
We check if the arguments are not empty, as they are all required.
35+
We check if the arguments are not empty, as they are all required.
3236

3337
For the Organization ID, Client ID and Client Secret, we check if they contain only alphanumeric characters. \
3438
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.
3539
Also make sure 2FA is enabled for the Organization in Adobe Admin Console.
3640

3741
## bin/magento admin:adobe-ims:disable
42+
3843
Disables the AdminAdobeIMS Module.
3944
When disabling, the `Organization ID`, `Client ID` and `Client Secret` values will be deleted from the config.
4045

4146
## bin/magento admin:adobe-ims:status
47+
4248
Shows if the AdminAdobeIMS Module is enabled or disabled
4349

4450
## bin/magento admin:adobe-ims:info
51+
4552
Example of getting data if Admin Adobe Ims module is enabled:\
4653
Client ID: 1234567890a \
4754
Organization ID: 1234567890@org \
@@ -50,11 +57,13 @@ Client Secret configured
5057
If Admin Adobe Ims module is disabled, cli command will show message "Module is disabled"
5158

5259
# Admin Login design
60+
5361
The admin login design changes when the AdminAdobeIms module is enabled and configured correctly via the CLI command.
5462
We have added the customer layout handle `adobe_ims_login` to deal with all the design changes.
5563
This handle is added via `\Magento\AdminAdobeIms\Plugin\AddAdobeImsLayoutHandlePlugin::afterAddDefaultHandle`.
5664

5765
The layout file `view/adminhtml/layout/adobe_ims_login.xml` adds:
66+
5867
* The bundled [Adobe Spectrum CSS](https://opensource.adobe.com/spectrum-css/).
5968
* New classes to current Magento html items,
6069
* Our new "Login with Adobe ID" button template,
@@ -64,6 +73,7 @@ We have included the minified css and the used svgs from Spectrum CSS with our m
6473
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.
6574

6675
# AdminAdobeIMS Callback
76+
6777
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.
6878

6979
In the ImsCallback Controller we get the access_token and then the user profile.
@@ -72,22 +82,25 @@ We then check if the assigned organization is valid and if the user does exist i
7282
If there went something wrong during the authorization, the user gets redirected to the admin login page and an error message is shown.
7383

7484
# Organization ID Validation
85+
7586
During the authorization we check if the configured `Organization ID` provided on the enabling CLI command is assigned to the user.
7687

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

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

8192
# Admin Backend Login
93+
8294
Login with the help Adobe IMS Service is implemented. The redirect to Adobe IMS Service is performed-
8395
The redirect from Adobe IMS is done to \Magento\AdminAdobeIms\Controller\Adminhtml\OAuth\ImsCallback controller.
8496

8597
The access code comes from Adobe, the token response is got on the basis of the access code,
86-
client id (api key) and client secret (private key).
87-
The token response access token is used for getting user profile information.
98+
client id (api key) and client secret (private key).
99+
The token response access token is used for getting user profile information.
88100
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.
89101

90102
# ACCESS_TOKEN saving in session and validation
103+
91104
When AdminAdobeIms module is enabled, we check each 10 minutes if ACCESS_TOKEN is still valid.
92105
For this when admin user login and when session is started, we add 2 extra variables to the session:
93106
token_last_check_time is current time
@@ -99,12 +112,14 @@ If token is valid, value token_last_check_time will be updated to current time a
99112
If token is not valid, session will be destroyed.
100113

101114
# Admin Backend Logout
115+
102116
The logout from Adobe IMS Service is performed when Magento Admin User is logged out.
103117
It's triggered by the event `controller_action_predispatch_adminhtml_auth_logout`
104118

105119
We do external LogOut by call to IMS. Session revoke is standard Magento behavior
106120

107121
# Admin Created Email
122+
108123
We created an Observer for the `admin_user_save_after` event. \
109124
There we check if the customer object is newly created or not. \
110125
When a new admin user got created in Magento, he will then receive an email with further information on how to login.
@@ -115,37 +130,42 @@ They are called `admin_adobe_ims_email_header_template` and `admin_adobe_ims_ema
115130
The notification mail will be sent inside our `AdminNotificationService` where we can add and modify the template variables.
116131

117132
# Error Handling
133+
118134
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.
119135

120136
### AdobeImsTokenAuthorizationException
137+
121138
Will be thrown when there was an error during the authorization. \
122139
e. g. a call to AdobeIMS fails or there was no matching admin found in the Magento database.
123140

124141
### AdobeImsOrganizationAuthorizationException
142+
125143
Will be thrown when the admin user who wants to log in does not have the configured organization ID assigned to his AdobeIMS Profile.
126144

127145
### Error logging
146+
128147
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.
129148

130-
Errors are logged into the `/var/log/admin_adobe_ims.log` file.
149+
Errors are logged into the `/var/log/admin_adobe_ims.log` file.
131150

132151
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`. \
133152
There you can switch the toggle for `Enable Logging for Admin Adobe IMS Module`
134153

135154
# Password usage in Admin UI
155+
136156
When the AdobeAdminIMS Module is enabled, we do not need any password fields in the Magento admin backend anymore.
137157

138158
So we removed the "Password" and "Password Confirmation" fields of the user forms.
139159
This is done by the plugin `\Magento\AdminAdobeIms\Plugin\RemovePasswordAndUserConfirmationFormFieldsPlugin`.
140-
Here we remove the password and password confirmation field.
160+
Here we remove the password and password confirmation field.
141161
As the verification field is just hidden, we set a random password to bypass the input filters of the Save and Delete user Classes.
142162
The `\Magento\AdminAdobeIms\Plugin\RemoveUserValidationRulesPlugin` plugin is required to remove the password fields from the form validation.
143163
We update the "Current User Identity Verification" fieldset to add "Verify Identity with Adobe IMS" button instead "Your Password" field.
144164
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`.
145165

146166
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.
147167

148-
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.
168+
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.
149169
This is done in the `\Magento\AdminAdobeIms\Plugin\UserSavePlugin`.
150170

151171
We also disabled the "Change password in 30 days" functionally, as we don't need the Magento admin user password for the login.
@@ -155,12 +175,13 @@ When the AdminAdobeIMS Module is disabled, the user can not be log in when using
155175
Instead, the forgot password function must be used to reset the password.
156176

157177
# WEB API authentication using IMS ACCESS_TOKEN
178+
158179
When Admin Adobe IMS is enabled, Adobe Commerce admin users will stop having credentials (username and password).
159180
These admin user credentials are needed for getting token that can be used to make requests to admin web APIs.
160181
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.
161182

162183
`\Magento\AdminAdobeIms\Model\Authorization\AdobeImsTokenUserContext` new implementation for `\Magento\Authorization\Model\UserContextInterface` was created.
163-
In the implementation IMS access token is validated and read to get created_at and expires_in data.
184+
In the implementation IMS access token is validated and read to get created_at and expires_in data.
164185
If access_token_hash already exists in admin_adobe_ims_webapi table, then we can get admin_user_id.
165186
If access_token_hash does not exist in admin_adobe_ims_webapi table, then we have to make request to IMS service to get Adobe user profile, that contain email.
166187
Using email from Adobe user profile we can check if admin user with these email exists in Magento. If so, we save relevant data into admin_adobe_ims_webapi table.
@@ -178,10 +199,12 @@ Both of values are checked in function isTokenExpired \Magento\AdminAdobeIms\Mod
178199
it means that with default values is not possible to use tokens that older than 4h.
179200

180201
### IMS access token verification.
181-
To verify token a public key is required. For more info https://wiki.corp.adobe.com/display/ims/IMS+public+key+retrieval
202+
203+
To verify token a public key is required. For more info https://wiki.corp.adobe.com/display/ims/IMS+public+key+retrieval
182204
In Admin Adobe Ims module was defined path where certificate has to be downloaded from.
183205
By default, in config.xml, these value for production.
184206
For testing reasons, developers can override this value, for example in env.php file like this:
207+
185208
```
186209
'system' => [
187210
'default' => [
@@ -193,6 +216,7 @@ For testing reasons, developers can override this value, for example in env.php
193216
]
194217
]
195218
```
219+
196220
Certificate value is cached.
197221

198222
This authentication mechanism enabled for REST and SOAP web API areas.
@@ -202,13 +226,15 @@ curl -X GET "{domain}/rest/V1/customers/2" -H "Authorization: Bearer AddAdobeIms
202226
curl -X GET "{domain}/rest/V1/products/24-MB01" -H "Authorization: Bearer AddAdobeImsAccessToken"
203227

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

208233
For this purpose the additional config value was added, this config value is read by Magento_TwoFactorAuth module.
209234
If the config value is not there, the Magento_TwoFactorAuth functionality works by default.
210235

211236
# Updated Current User Identity Verification
237+
212238
The AdobeAdminIms Module updates the handling of the current user identity verification.
213239

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

src/pages/module-reference/module-admin-analytics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ title: AdminAnalytics
33
description: README.md contents of the module from the source code
44
---
55

6-
The Magento\AdminAnalytics module gathers information about the features Magento administrators use. This information will be used to help improve the user experience on the Magento Admin.
6+
The Magento\AdminAnalytics module gathers information about the features Magento administrators use. This information will be used to help improve the user experience on the Magento Admin.

src/pages/module-reference/module-admin-gws.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ description: README.md contents of the module from the source code
55

66
# AdminGws
77

8-
**AdminGws** provides configuration management within the Global, Website, and Store data scopes. Restrictions can be
8+
**AdminGws** provides configuration management within the Global, Website, and Store data scopes. Restrictions can be
99
imposed on various system elements through configurations that are applied at the desired level.

src/pages/module-reference/module-adobe-commerce-events-client.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,28 @@ For development purposes this package can be added to Magento `composer.json` as
2222
```
2323

2424
And in the `require` section:
25+
2526
```json
2627
"magento/module-adobe-commerce-events-client": "*"
2728
```
2829

2930
### Admin panel configuration
3031

3132
After adding this package to Magento, the following changes should be made in the admin panel (navigate to Stores > Settings > Configuration > Adobe Services > Adobe I/O Events > Commerce events):
33+
3234
- Set `Enabled` to `Yes`
3335
- Enter a `Merchant ID`
3436
- Enter a `Environment ID`
3537

3638
## CLI commands defined by module
3739

3840
This module defines the following CLI commands:
41+
3942
- events:subscribe
4043
- events:unsubscribe
4144
- events:list
4245
- events:list:all
4346
- events:info
4447
- events:metadata:populate
4548

46-
Please see [documentation](https://developer.adobe.com/commerce/events/get-started/commands/) for details on using these commands.
49+
Please see [documentation](https://developer.adobe.com/commerce/events/get-started/commands/) for details on using these commands.

src/pages/module-reference/module-adobe-io-events-client.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Provider and custom Events Metadata.
1313
# Usage
1414

1515
This is a two-step process:
16+
1617
1. We will create an Event Provider, this is required once per Adobe Commerce instance
1718
2. We will update the Events Metadata, this should happen during the deployment phase
1819

@@ -23,12 +24,15 @@ This is a two-step process:
2324
- Populate the `Service Account Private Key` and `Adobe I/O Workspace Configuration` fields
2425
- Enter a unique ID in the `Adobe Commerce Instance ID` field
2526
4. Run the following command to create an event provider
27+
2628
```bash
2729
bin/magento events:create-event-provider --label "<unique_provider_label>" --description "<provider description>"
2830
````
31+
2932
5. Enter the Event Provider ID output by the command in the `Adobe I/O Event Provider ID` field
3033

3134
# Update Events Metadata
35+
3236
Events Metadata in the following format can optionally be stored in `app/etc/event-types.json`:
3337

3438
```json
@@ -49,6 +53,7 @@ Events Metadata in the following format can optionally be stored in `app/etc/eve
4953
```
5054

5155
To update the metadata using the `app/etc/event-types.json` file, add the following step to your `ece-tool` or deployment script:
56+
5257
```bash
5358
bin/magento events:sync-events-metadata
5459
```

src/pages/module-reference/module-advanced-checkout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ description: README.md contents of the module from the source code
55

66
Magento\AdvanceCheckout extends Magento_Checkout with following functions: adding product to cart by entering SKU on
77
frontend, uploading list of SKUs to add products to cart on frontend and ability for admin to manage customer's shopping
8-
cart.
8+
cart.

src/pages/module-reference/module-advanced-rule.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ description: README.md contents of the module from the source code
44
---
55

66
AdvancedRule module enhances the performance of rule processing.
7-

src/pages/module-reference/module-advanced-sales-rule.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ description: README.md contents of the module from the source code
44
---
55

66
AdvancedSalesRule module enhances the performance of sale rule processing.
7-

src/pages/module-reference/module-async-order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The _AsyncOrder_ module enables asynchronous order placement, which marks the or
99

1010
AsyncOrder values:
1111

12-
- `0` — (_Default value_) Disable the AsyncOrder module and use the standard synchronous order placement.
12+
- `0` — (_Default value_) Disable the AsyncOrder module and use the standard synchronous order placement.
1313
- `1` — Enable the AsyncOrder module for asynchronous order placement.
1414

1515
To enable AsyncOrder, set the `checkout/async` variable in the `env.php` file. For example:

src/pages/module-reference/module-banner-customer-segment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ title: BannerCustomerSegment
33
description: README.md contents of the module from the source code
44
---
55

6-
The Banner Customer Segment module allows creating and managing banners in the customer segment scope.
6+
The Banner Customer Segment module allows creating and managing banners in the customer segment scope.

0 commit comments

Comments
 (0)