Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb98a9b

Browse files
authored
Merge branch 'master' into composer-file-change
2 parents 3aaa0f6 + f2ae23b commit eb98a9b

29 files changed

+1477
-256
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# OS generated files #
2-
######################
1+
# OS and IDE generated files #
2+
##############################
33
/*.db
44
.DS_Store
55
.vscode
6+
.history
67

78
# Config and output files #
89
###########################

src/_data/codebase/cloud/magento-cloud.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/_data/mde.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ extensions:
1010
-
1111
name: Amazon Sales Channel
1212
versions:
13+
-
14+
name: 4.2.0
15+
support:
16+
2.3.0: compatible
17+
2.3.1: compatible
18+
2.3.2: compatible
19+
2.3.3: compatible
20+
2.3.4: compatible
21+
2.3.5-p1: compatible
22+
2.4.0: supported
23+
1324
-
1425
name: 4.1.0
1526
support:

src/_data/toc/configuration-guide.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pages:
2121
- label: Two-Factor Authentication
2222
url: /security/two-factor-authentication.html
2323

24+
- label: Security.txt
25+
url: /security/security-txt.html
26+
exclude_versions: ["2.3"]
27+
2428
- label: X-Frame-Options header
2529
url: /config-guide/secy/secy-xframe.html
2630

src/_data/toc/release-notes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ pages:
1313
- label: Magento Commerce 2.4.0 Release Notes
1414
url: /release-notes/release-notes-2-4-0-commerce.html
1515

16+
- label: Magento B2B Release Notes
17+
url: /release-notes/b2b-release-notes.html
18+
1619

1720
- label: 2.3 Release Notes
1821
include_versions: ["2.3"]

src/assets/i/flag.svg

Lines changed: 6 additions & 0 deletions
Loading

src/cloud/before/before-workspace-ssh.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,42 @@ When initially setting up your local environment, you need to add the SSH keys t
2222

2323
{% include cloud/enable-ssh.md %}
2424

25+
## Unable to access projects without MFA
26+
27+
If you authenticate to a project with multi-factor authentication (MFA) enabled, you might receive the following error when connecting to other projects that do not require MFA:
28+
29+
```bash
30+
31+
[email protected]: Permission denied (publickey).
32+
```
33+
34+
During the SSH certificate generation, the Magento Cloud CLI adds an additional SSH key to your local environment. That key will be used by default if your local SSH configuration does not include the SSH key for project access.
35+
36+
{:.procedure}
37+
To add your SSH key to the local configuration:
38+
39+
1. Create the `config` file if it does not exists.
40+
41+
```bash
42+
touch ~/.ssh/config
43+
```
44+
45+
1. Add an `IdentityFile` configuration.
46+
47+
```yaml
48+
Host *
49+
IdentityFile ~/.ssh/id_rsa
50+
```
51+
52+
{:.bs-callout-info}
53+
You can specify multiple SSH keys by adding multiple `IdentityFile` entries to your configuration.
54+
55+
1. Reload your SSH configuration to apply the changes.
56+
57+
```bash
58+
source ~/.ssh/config
59+
```
60+
2561
{:.ref-header}
2662
Next step
2763

src/cloud/project/privatelink-service.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,25 @@ To test the connection to the VPC endpoint service:
153153
```
154154
{:.no-copy}
155155

156+
1. Run the following command to to ensure the service is listening on VM:
157+
158+
```bash
159+
netstat -na |grep <port>
160+
```
161+
162+
1. Run the following command to check the packages flow:
163+
164+
```bash
165+
tcpdump -i <ethernet interface> -tt -nn port <destination port> and host <source host>
166+
```
167+
168+
Check the following internal settings to ensure that the configuration is valid:
169+
170+
- Endpoint and endpoint services settings
171+
- NLB settings
172+
- The target groups in NLB and verify they are healthy
173+
- The netcat/curl endpoint URL from each VM ( listed above)
174+
156175
See the following articles for help troubleshooting connection issues:
157176

158177
- [AWS: Troubleshooting endpoint service connections][]
@@ -172,7 +191,7 @@ Submit a Magento Support ticket to change an existing PrivateLink configuration.
172191

173192
The customer VPC must have the following resources available to support bidirectional PrivateLink connections:
174193

175-
- A Network Load Balancer
194+
- A Network Load Balancer (NLB)
176195
- An endpoint service configuration that enables access to an application or service from the customer VPC
177196
- An [interface endpoint][] (AWS) or [private endpoint][] (Azure) that allows Magento to connect to endpoint services hosted in your VPC
178197

src/common/css/devdocs.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
font-size: var(--spectrum-heading-3-text-size, var(--spectrum-alias-heading3-text-size));
1919
margin: 2em 0 .7em 0;
2020
}
21+
22+
.container > .feature > ul > li > img.img-icon {
23+
margin-top: -4px;
24+
}

src/extensions/amazon-sales/release-notes/index.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ group: extensions
33
title: Amazon Sales Channel Release Notes
44
---
55
{:.bs-callout .bs-callout-warning}
6-
Amazon Sales Channel versions 4.0+ are only supported when integrated with Magento 2.3.x versions.
6+
Amazon Sales Channel versions 4.0.0 and 4.1.0 are only supported for Magento 2.3.x versions.<br/>Amazon Sales Channel version 4.2.0 is compatible with Magento 2.3.x versions but is only supported for Magento 2.4.x versions.
77

88
**Amazon Sales Channel** can be installed on instances with {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}} versions 2.3.x. We no longer support the extension on Magento 2.1, Magento 2.2, or Magento 1. Merchants can use Amazon Sales Channel to integrate with an Amazon Seller account to list and sell products from your Magento catalog on Amazon.
99

@@ -21,6 +21,32 @@ The release notes include:
2121

2222
See [Upcoming Releases](https://devdocs.magento.com/release/) for versioning, support, and compatibility.
2323

24+
### v4.2.0
25+
26+
Amazon Sales Channel 4.2.0 is compatible with versions 2.3.x but only supported for versions 2.4.x of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. If you have a previous Amazon Sales Channel version installed and attempt to update your Magento to version 2.4.0, you will be prompted to update the extension before you can complete the Magento update.
27+
28+
This version of Amazon Sales Channel includes a new feature along with improvements and fixes.
29+
30+
- {:.new}Amazon Sales Channel has been enhanced to accept text-based address data and match it to standardized address formats, including city, state, and zip code. This enables order and shipping data to synchronize (sync) with Amazon without address errors.<br/>For example, a shopper inputs the city, state, zip code as `Escondido, californiA 92025-1501`. Amazon Sales Channel imports and matches the data to the standard format as `Escondido, CA 92025`, and then syncs it back to Amazon in this standardized format.
31+
32+
- {:.new}Added support for PHP 7.4.
33+
34+
- {:.new}<!--CHAN-4334-->Added support for Magento 2.4.x. Previous versions may be compatible with Magento 2.4.x, but are not supported. See [Upcoming releases](https://devdocs.magento.com/release/) for version compatibility. Amazon Sales Channel must be updated to 4.2.0 before the Magento 2.4.0 update can be completed.
35+
36+
- {:.fix}<!--CHAN-4431-->Corrected an issue that caused an _Access Denied_ error for UK customers.
37+
38+
- {:.fix}<!--CHAN-4394-->Corrected an issue that prevented the Amazon shipping status from syncing to the corresponding Magento order, thus “locking” the order’s shipping status as `Pending` in Magento and `Unshipped` in Amazon. With the new standardized address feature, these shipping status errors have been resolved.
39+
40+
- {:.fix}<!--ticket#-->Updated order synchronization (sync) to ignore failed order imports, thus reducing multiple sync attempts and allowing subsequent imports to process, with order sync requests submitted every 5 minutes. Sync errors are still recorded in the error log, but marked as "processed" to allow further logging functions. Also, Amazon Sales Channel now automatically removes excess data collected for orders that fail to create in Magento.
41+
42+
- {:.fix}Updated error logging to collect more information for uncaught exception and extension update errors.
43+
44+
- {:.fix}<!--ticket#-->Corrected an issue that caused the initial sync of the _lowest price_ data to fail due to a missing _price_ value.
45+
46+
- {:.fix}<!--CHAN-4410-->Corrected issues that caused filtering errors in the _Amazon orders_ view when the date range field is left blank.
47+
48+
- {:.fix}<!--CHAN-4439-->Corrected an issue that caused quantity-related stock and fulfillment sync errors. The extension now rounds down quantity values entered as a decimal before syncing with Amazon.<br/> For example, when a merchant manually inputs a quantity of `2.5`, the extension rounds down the value to `2` and then syncs the updated quantity with Amazon.
49+
2450
### v4.1.0
2551

2652
Amazon Sales Channel 4.1.0 is compatible with versions 2.3.x of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. This version of Amazon Sales Channel includes user-interface enhancements, along with minor bug fixes.
@@ -54,7 +80,7 @@ Amazon Sales Channel 4.1.0 is compatible with versions 2.3.x of {{site.data.var.
5480
Amazon Sales Channel 4.0.0 is compatible with versions 2.3.0, 2.3.1, 2.3.2, 2.3.3, and 2.3.4 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. This version of Amazon Sales Channel includes many user-interface upgrades, along with minor bug fixes.
5581

5682
{:.bs-callout .bs-callout-warning}
57-
Amazon Sales Channel 4.0.0 is not supported with Magento 2.3.5. For support with Magento 2.3.5, upgrade to Amazon Sales Channel 4.1.0.
83+
Amazon Sales Channel 4.0.0 is not supported for Magento 2.3.5. For support with Magento 2.3.5, upgrade to Amazon Sales Channel 4.1.0.
5884

5985
- {:.new}Introduced a new [Amazon Sales Channel](https://docs.magento.com/m2/ee/user_guide/sales-channels/asc/amazon-sales-channel-home.html) home page with improved "card view" for your store information.
6086

src/guides/v2.3/graphql/authorization-tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ mutation {
4141

4242
In Magento GraphQL, you specify an admin token only if you need to query products, categories, price rules, or other entities that are scheduled to be in a campaign (staged content). Staging is supported in {{site.data.var.ee}} only. See [Staging queries]({{page.baseurl}}/graphql/queries/index.html#staging) for more information.
4343

44-
Magento does not provide a GraphQL mutation that generates an admin token. You must use the `GET /V1/integration/admin/token` REST endpoint instead. [Generate the admin token]({{page.baseurl}}/rest/tutorials/prerequisite-tasks/create-admin-token.html) shows how to use this endpoint.
44+
Magento does not provide a GraphQL mutation that generates an admin token. You must use the `POST /V1/integration/admin/token` REST endpoint instead. [Generate the admin token]({{page.baseurl}}/rest/tutorials/prerequisite-tasks/create-admin-token.html) shows how to use this endpoint.

src/guides/v2.3/graphql/queries/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ A staging query requires two specialized headers:
151151

152152
Header name | Description
153153
--- | ---
154-
`Authorization Bearer: <authorization_token>` | An admin token. Use the `GET /V1/integration/admin/token` REST endpoint to generate this token.
154+
`Authorization Bearer: <authorization_token>` | An admin token. Use the `POST /V1/integration/admin/token` REST endpoint to generate this token.
155155
`Preview-Version` | A timestamp (seconds since January 1, 1970) that is inside the range of dates of the campaign you are querying.
156156

157157
Magento returns an authorization error if you specify an invalid token or do not include both headers. If the specified timestamp does not correspond to a date in a scheduled campaign, the query results reflect the current storefront settings.

src/guides/v2.4/get-started/authentication/gs-authentication-token.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
group: web-api
3+
title: Token-based authentication
4+
functional_areas:
5+
- Integration
6+
---
7+
8+
To make a web [API](https://glossary.magento.com/api) call from a client such as a mobile application, you must supply an *access token* on the call. The token acts like an electronic key that lets you access the API.
9+
10+
Magento issues the following types of access tokens:
11+
12+
Token type | Description | Default lifetime
13+
--- | --- | ---
14+
Integration | The merchant determines which Magento resources the integration has access to. | Indefinite. It lasts until it is manually revoked.
15+
Admin | The merchant determines which Magento resources an admin user has access to. | 4 hours
16+
Customer | Magento grants access to resources with the `anonymous` or `self` permission. Merchants cannot edit these settings. | 1 hour
17+
18+
## Integration tokens
19+
20+
When a merchant creates and activates an integration, Magento generates a consumer key, consumer secret, access token, and access token secret. All of these entities are used for [OAuth-based authentication]({{ page.baseurl }}/get-started/authentication/gs-authentication-oauth.html), but token-based authentication requires only the access token.
21+
22+
Use the following steps to generate an access token:
23+
24+
1. Log in to Admin and click **System** > **Extensions** > **Integrations** to display the Integrations page.
25+
1. Click **Add New Integration** to display the New Integration page.
26+
1. Enter a unique name for the integration in the **Name** field. Then enter your admin password in the **Your Password** field. Leave all other fields blank.
27+
1. Click the API tab. Select the Magento resources the integration can access. You can select all resources, or select a custom list.
28+
1. Click **Save** to save your changes and return to the Integrations page.
29+
1. Click the **Activate** link in the grid that corresponds to the newly-created integration.
30+
1. Click **Allow** . A dialog similar to the following displays:
31+
32+
![REST client]({{ page.baseurl }}/get-started/authentication/images/integration-tokens.png)
33+
34+
The access token can be used in all calls made on behalf of the integration.
35+
36+
## Admin and customer access tokens
37+
38+
Magento provides a separate token service for administrators and customers. When you request a token from one of these services, the service returns a unique access token in exchange for the username and password for a Magento account.
39+
40+
The Magento web API framework allows *guest users* to access resources that are configured with the permission level of anonymous. Guest users are users who the framework cannot authenticate through existing authentication mechanisms. As a guest user, you do not need to, but you can, specify a token in a web API call for a resource with anonymous permission. [Restricting access to anonymous web APIs]({{ page.baseurl }}/rest/anonymous-api-security.html) contains a list of APIs that do not require a token.
41+
42+
The following table lists endpoints and services that can be used to get an authentication token. Some 2FA providers may require multiple calls.
43+
44+
Token type |REST| SOAP
45+
---|---|---
46+
Admin with Google Authenticator | `POST /V1/tfa/provider/google/authenticate` | `twoFactorAuthGoogleAuthenticateV1`
47+
Admin with Duo Security | `POST /V1/tfa/provider/duo-security/authenticate` | `twoFactorAuthDuoAuthenticateV1`
48+
Admin with Authy | `POST /V1/tfa/provider/authy/authenticate` | `twoFactorAuthAuthyAuthenticateV1`
49+
Admin with U2F | `POST /V1/tfa/provider/u2fkey/verify` | `twoFactorAuthU2fKeyAuthenticateV1`
50+
Customer | `POST /V1/integration/customer/token` | `integrationCustomerTokenServiceV1`
51+
52+
For most [web API](https://glossary.magento.com/web-api) calls, you supply this token in the `Authorization` request header with the `Bearer` HTTP [authorization](https://glossary.magento.com/authorization) scheme to prove your identity. By default, an admin token is valid for 4 hours, while a customer token is valid for 1 hour. You can change these values from Admin by selecting **Stores** > **Settings** > **Configuration** > **Services** > **OAuth** > **Access Token Expiration**.
53+
54+
A cron job that runs hourly removes all expired tokens.
55+
56+
## Request a token {#request-token}
57+
58+
A access token request contains three basic elements:
59+
60+
Component | Specifies
61+
--- | ---
62+
Endpoint | A combination of the _server_ that fulfills the request, the web service, and the `resource` against which the request is being made.<br/><br/>For example, in the `POST <host>/rest/<store_code>/V1/integration/customer/token` endpoint:<br/>The server is `magento.host/index.php/`,<br/> the web service is `rest`.<br/> and the resource is `/V1/integration/customer/token`.
63+
Content type | The content type of the request body. Set this value to either `"Content-Type:application/json"` or `"Content-Type:application/xml"`.
64+
Credentials | The username and password for a Magento account.<br/><br/>To specify these credentials in a JSON request body, include code similar to the following in the call: <br/><br/>`{"username":"<USER-NAME>;", "password":"<PASSWORD>"}`<br/><br/>To specify these credentials in XML, include code similar to the following in the call:<br/><br/>`<login><username>customer1</username><password>customer1pw</password></login>`
65+
66+
### Examples {#token-example}
67+
68+
The following image shows a token request for the [admin](https://glossary.magento.com/admin) account using a REST client:
69+
70+
![REST client]({{ page.baseurl }}/get-started/authentication/images/gs_auth_token1.png)
71+
72+
The following example uses the `curl` command to request a token for a customer account:
73+
74+
```bash
75+
curl -X POST "https://magento.host/index.php/rest/V1/integration/customer/token" \
76+
-H "Content-Type:application/json" \
77+
-d '{"username":"[email protected]", "password":"customer_password"}'
78+
```
79+
80+
The following example makes the same request with [XML](https://glossary.magento.com/xml) for a customer account token:
81+
82+
```bash
83+
curl -X POST "http://magento.vg/index.php/rest/V1/integration/customer/token" \
84+
-H "Content-Type:application/xml" \
85+
-d "<login><username>customer1</username><password>customer1pw</password></login>"
86+
```
87+
88+
For more information about the `curl` command, see [Use cURL to run the request]({{ page.baseurl }}/get-started/gs-curl.html)
89+
90+
## Authentication token response {#auth-response}
91+
92+
A successful request returns a response body with the token, as follows:
93+
94+
`asdf3hjklp5iuytre`
95+
96+
## Use the token in a Web API request {#web-api-access}
97+
98+
Any web API call that accesses a resource that requires a permission level higher than anonymous must contain the authentication token in the header To do this, specify a HTTP header in the following format:
99+
100+
`Authorization: Bearer <authentication token>`
101+
102+
### Admin access {#admin-access}
103+
104+
Admins can access any resources for which they are authorized.
105+
106+
For example, to make a web API call with an admin token:
107+
108+
`curl -X GET "http://magento.ll/index.php/rest/V1/customers/2" -H "Authorization: Bearer vbnf3hjklp5iuytre"`
109+
110+
### Customer access
111+
112+
Customers can access only resources with `self` permissions.
113+
114+
For example, to make a web API call with a customer token:
115+
`curl -X GET "http://magento.ll/index.php/rest/V1/customers/me" -H "Authorization: Bearer asdf3hjklp5iuytre"`
116+
117+
{:.ref-header}
118+
Related topics
119+
120+
[Construct a request]({{ page.baseurl }}/get-started/gs-web-api-request.html)
121+
122+
[Configure services as web APIs]({{ page.baseurl }}/extension-dev-guide/service-contracts/service-to-web-service.html)
123+
124+
[Restricting access to anonymous web APIs]({{ page.baseurl }}/rest/anonymous-api-security.html)

0 commit comments

Comments
 (0)