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: docs/credentials.md
+23-19Lines changed: 23 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,19 @@
3
3
When you test functionality that involves external services such as UPS, FedEx, PayPal, or SignifyD,
4
4
use the MFTF credentials feature to hide sensitive [data][] like integration tokens and API keys.
5
5
6
-
Currently MFTF supports two types of credential storage:**.credentials file** and **HashiCorp vault**.
6
+
Currently the MFTF supports two types of credential storage:
7
7
8
-
#3 Configure File Storage
8
+
-**.credentials file**
9
+
-**HashiCorp vault**.
10
+
11
+
## Configure File Storage
9
12
10
13
The MFTF creates a sample file for credentials during [initial setup][]: `magento2/dev/tests/acceptance/.credentials.example`.
11
14
The file contains an example list of keys for fields that can require credentials.
12
15
13
-
## Create `.credentials`
16
+
###Create `.credentials`
14
17
15
-
To make the MFTF process the file with credentials, change directories to `magento2/dev/tests/acceptance/` and copy`.credentials.example` to `.credentials`.
18
+
To make the MFTF process the file with credentials, in the command line, nvaigate to `magento2/dev/tests/acceptance/` and rename`.credentials.example` to `.credentials`.
16
19
17
20
```bash
18
21
cd dev/tests/acceptance/
@@ -22,7 +25,7 @@ cd dev/tests/acceptance/
22
25
cp .credentials.example .credentials
23
26
```
24
27
25
-
## Add `.credentials` to `.gitignore`
28
+
###Add `.credentials` to `.gitignore`
26
29
27
30
Verify that the file is excluded from tracking by `.gitignore` (unless you need this behavior):
28
31
@@ -36,9 +39,9 @@ The command outputs the path if the file is excluded:
36
39
.credentials
37
40
```
38
41
39
-
## Define sensitive data in `.credentials` file
42
+
###Define sensitive data in the`.credentials` file
40
43
41
-
Open the `.credentials` file, for Magento core credentials, uncomment the fields you want to use, and add your values:
44
+
Open the `.credentials` file and, for Magento core credentials, uncomment the fields you want to use and add your values:
Hashicorp vault secures, stores, and tightly controls access to data in modern computing.
75
78
It provides advanced data protection for your testing credentials.
76
79
77
-
MFTF works with both `vault enterprise` and `vault open source` that use `KV Version 2` secret engine.
80
+
The MFTF works with both `vault enterprise` and `vault open source` that use `KV Version 2` secret engine.
78
81
79
-
## Install vault CLI
82
+
###Install vault CLI
80
83
81
84
Download and install vault CLI tool if you want to run or develop MFTF tests locally. [Download Vault][Download Vault]
82
85
83
86
### Authenticate to vault via vault CLI
84
87
85
-
Authenticate to vault server via vault CLI tool.[Login Vault][Login Vault]
88
+
Authenticate to vault server via the vault CLI tool:[Login Vault][Login Vault].
86
89
87
-
```terminal
90
+
```bash
88
91
vault login -method -path
89
92
```
90
-
**Do not** use `-no-store` command option, as MFTF will rely on the persisted token in the token helper
91
-
(usually the local filesystem) for future api requests.
93
+
94
+
**Do not** use `-no-store` command option, as the MFTF will rely on the persisted token in the token helper (usually the local filesystem) for future API requests.
92
95
93
96
### Store secrets in vault
94
97
95
-
MFTF uses `KV Version 2` secret engine for secret storage.
98
+
The MFTF uses the`KV Version 2` secret engine for secret storage.
96
99
More information for working with `KV Version 2` can be found in [Vault KV2][Vault KV2].
97
100
98
101
### Secrets path and key convention
99
102
100
-
The path and key for secret data must follow:
103
+
The path and key for secret data must follow the format:
It is possible and sometimes useful to setup and use both `.credentials` file and vault for secret storage at the same time.
138
-
In this case, MFTF tests are able to read secret data at runtime from both storage, and local `.credentials` file will take precedence.
141
+
In this case, the MFTF tests are able to read secret data at runtime from both storage options, but the local `.credentials` file will take precedence.
139
142
140
143
<!-- {% raw %} -->
141
144
@@ -164,7 +167,8 @@ Decrypted credentials do not appear in the console, error logs, or [test reports
164
167
The decrypted values are only available in the `.credentials` file or within vault.
165
168
166
169
<divclass="bs-callout bs-callout-info">
167
-
The MFTF tests delivered with Magento application do not use credentials and do not cover external services, because of sensitivity of the data.</div>
170
+
The MFTF tests delivered with Magento application do not use credentials and do not cover external services, because of sensitivity of the data.
0 commit comments