Skip to content

Commit 71629b0

Browse files
authored
Fix mfa argument + backport (#1104)
This is a continuation of PR #1013 Fixed `-mfa` argument for CLI flags since it was incorrect. - Incorrect: <img width="1414" height="913" alt="2025-10-14 12 17 15 developer hashicorp com 7ab8618e50d0" src="https://github.com/user-attachments/assets/622bd797-91aa-4ed5-903a-2baa08dc84d7" /> - Correct: <img width="1445" height="957" alt="2025-10-14 12 17 45 developer hashicorp com 5ab16498018b" src="https://github.com/user-attachments/assets/58996634-ca11-421d-b57e-a8fe37d5e9d6" /> Also added this CLI flag description to the Single-Phase login docs so customers who are looking for Single-Phase MFA login can now find how to do it via API and CLI on one page (reduces confusion).
2 parents 7dfad54 + 733cd6a commit 71629b0

File tree

11 files changed

+49
-9
lines changed
  • content/vault

11 files changed

+49
-9
lines changed

content/vault/v1.14.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ $ curl \
108108
http://127.0.0.1:8200/v1/auth/userpass/login/alice
109109
```
110110

111+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
112+
113+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
114+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
115+
111116
### Two-Phase login
112117

113118
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.15.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ $ curl \
108108
http://127.0.0.1:8200/v1/auth/userpass/login/alice
109109
```
110110

111+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
112+
113+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
114+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
115+
111116
### Two-Phase login
112117

113118
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.16.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ $ curl \
108108
http://127.0.0.1:8200/v1/auth/userpass/login/alice
109109
```
110110

111+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
112+
113+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
114+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
115+
111116
### Two-Phase login
112117

113118
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.17.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ $ curl \
108108
http://127.0.0.1:8200/v1/auth/userpass/login/alice
109109
```
110110

111+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
112+
113+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
114+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
115+
111116
### Two-Phase login
112117

113118
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.18.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ $ curl \
112112
http://127.0.0.1:8200/v1/auth/userpass/login/alice
113113
```
114114

115+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
116+
117+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
118+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
119+
115120
### Two-Phase login
116121

117122
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.19.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ $ curl \
112112
http://127.0.0.1:8200/v1/auth/userpass/login/alice
113113
```
114114

115+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
116+
117+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
118+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
119+
115120
### Two-Phase login
116121

117122
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.19.x/content/partials/global-settings/both/mfa.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
**`[-mfa | VAULT_MFA] (string : "")`** <EnterpriseAlert inline="true" />
44

55
A multi-factor authentication (MFA) credential, in the format
6-
`mfa_method_name[:key[=value]]`, that the CLI should use to authenticate to
6+
`mfa_method_id:passcode`, that the CLI should use to authenticate to
77
Vault. The CLI adds MFA credentials to the `X-Vault-MFA` header when calling the
88
underlying API endpoint.
99

1010
**Examples**:
1111

12-
- CLI flag: `-mfa "totp:password=12345"`
13-
- Environment variable: `export VAULT_MFA="totp:password=12345"`
12+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
13+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
1414

1515
<Note>
1616

content/vault/v1.20.x/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ $ curl \
112112
http://127.0.0.1:8200/v1/auth/userpass/login/alice
113113
```
114114

115+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
116+
117+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
118+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
119+
115120
### Two-Phase login
116121

117122
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

content/vault/v1.20.x/content/partials/global-settings/both/mfa.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
**`[-mfa | VAULT_MFA] (string : "")`** <EnterpriseAlert inline="true" />
44

55
A multi-factor authentication (MFA) credential, in the format
6-
`mfa_method_name[:key[=value]]`, that the CLI should use to authenticate to
6+
`mfa_method_id:passcode`, that the CLI should use to authenticate to
77
Vault. The CLI adds MFA credentials to the `X-Vault-MFA` header when calling the
88
underlying API endpoint.
99

1010
**Examples**:
1111

12-
- CLI flag: `-mfa "totp:password=12345"`
13-
- Environment variable: `export VAULT_MFA="totp:password=12345"`
12+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
13+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
1414

1515
<Note>
1616

content/vault/v1.21.x (rc)/content/docs/auth/login-mfa/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ $ curl \
113113
http://127.0.0.1:8200/v1/auth/userpass/login/alice
114114
```
115115

116+
Use the `-mfa` CLI flag or `VAULT_MFA` environment variable to pass in MFA credentials. For example:
117+
118+
- CLI flag: `-mfa "d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
119+
- Environment variable: `export VAULT_MFA="d16fd3c2-50de-0b9b-eed3-0301dadeca10:695452"`
120+
116121
### Two-Phase login
117122

118123
The more conventional and prevalent MFA method is a two-request mechanism, also referred to as Two-phase Login MFA.

0 commit comments

Comments
 (0)