-
Notifications
You must be signed in to change notification settings - Fork 83
1.21 - RC Add MFA TOTP Self-Enroll Docs #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
126ac50
bc371e2
5c915be
be901c5
b557489
8e03dce
89975e2
9f63e46
a5a02e5
5e62767
79de110
171bbcf
251d596
f96b054
3a78db0
cb80c3d
a834555
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ This endpoint creates an MFA method of type TOTP. | |
|:-------|:----------------------------| | ||
| `POST` | `/identity/mfa/method/totp` | | ||
|
||
### Parameters | ||
### Request parameters | ||
|
||
- `method_name` `(string)` - The unique name identifier for this MFA method. Supported from Vault 1.13.0. | ||
|
||
|
@@ -33,6 +33,9 @@ This endpoint creates an MFA method of type TOTP. | |
|
||
- `max_validation_attempts` `(int: 5)` - The maximum number of consecutive failed validation attempts. | ||
|
||
- `enable_self_enrollment` `(bool: false)` - <EnterpriseAlert product="vault" inline /> When enabled, allows users to setup TOTP for their account by generating | ||
a TOTP secret (QR code) during login if they do not already have one. | ||
|
||
### Sample payload | ||
|
||
```json | ||
|
@@ -59,11 +62,13 @@ This endpoint updates the configuration of an MFA method of type TOTP. | |
|:-------|:---------------------------------------| | ||
| `POST` | `/identity/mfa/method/totp/:method_id` | | ||
|
||
### Parameters | ||
### Path parameters | ||
|
||
- `method_id` `(string: <required>)` - UUID of the MFA method. | ||
|
||
- and all of the parameters documented under the preceding "Create" endpoint. | ||
### Request parameters | ||
|
||
All of the parameters documented under the preceding ["Create"](#create-totp-mfa-method) endpoint. | ||
|
||
### Sample payload | ||
|
||
|
@@ -88,7 +93,7 @@ ID. | |
|:-------|:---------------------------------------| | ||
| `GET` | `/identity/mfa/method/totp/:method_id` | | ||
|
||
### Parameters | ||
### Path parameters | ||
|
||
- `method_id` `(string: <required>)` – UUID of the MFA method. | ||
|
||
|
@@ -129,7 +134,7 @@ by a [login enforcement](/vault/api-docs/secret/identity/mfa/login-enforcement). | |
|:---------|:---------------------------------------| | ||
| `DELETE` | `/identity/mfa/method/totp/:method_id` | | ||
|
||
### Parameters | ||
### Path parameters | ||
|
||
- `method_id` `(string: <required>)` - UUID of the MFA method. | ||
|
||
|
@@ -182,7 +187,7 @@ method ID. | |
|:-------|:-------------------------------------| | ||
| `POST` | `/identity/mfa/method/totp/generate` | | ||
|
||
### Parameters | ||
### Request parameters | ||
|
||
- `method_id` `(string: <required>)` - UUID of the MFA method. | ||
|
||
|
@@ -225,7 +230,7 @@ the `admin-generate` API stores the generated secret on the given entity ID. | |
|:-------|:-------------------------------------------| | ||
| `POST` | `/identity/mfa/method/totp/admin-generate` | | ||
|
||
### Parameters | ||
### Request parameters | ||
|
||
- `method_id` `(string: <required>)` - UUID of the MFA method. | ||
|
||
|
@@ -275,7 +280,7 @@ secret. | |
|:-------|:------------------------------------------| | ||
| `POST` | `/identity/mfa/method/totp/admin-destroy` | | ||
|
||
### Parameters | ||
### Request parameters | ||
|
||
- `method_id` `(string: <required>)` - UUID of the MFA method. | ||
|
||
|
@@ -300,3 +305,51 @@ $ curl \ | |
--data @payload.json \ | ||
http://127.0.0.1:8200/v1/identity/mfa/method/totp/admin-destroy | ||
``` | ||
|
||
## Self-enroll in TOTP MFA <EnterpriseAlert product="vault" inline /> | ||
|
||
The self-enroll endpoint lets users setup TOTP MFA by generating a TOTP | ||
secret (QR code) during login if they do not already have one. To use | ||
self-enrollment you must set [`enable_self_enrollment`](./totp#enable_self_enrollment) to `true` for the TOTP MFA | ||
method. | ||
|
||
| Method | Path | | ||
|:-------|:----------------------------------------| | ||
| `POST` | `/identity/mfa/method/totp/self-enroll` | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think it's worth mentioning somewhere that the UI only enters the self-enroll workflow if only one enforcement is configured because that's when Technically, users could circumvent this by manually requesting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very good point, I completely forgot about that. Yes, I think we should mention it wherever we can as long as this makes sense, to avoid users being confused. Maybe it would make sense to add screenshots of the whole flow somewhere? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah - I was holding off on screenshots until I heard back from the education team (since I just took a best guess at where to add docs 😂 ) But yes - @schavis - do you have thoughts on:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what happened to my original reply from last night =\
In general, we try to limit the number of screenshots due to the maintenance burden. Is there a "hero" screenshot we can reference to help folks orient themselves in the GUI?
Since we're essentially calling out a configuration gotcha, I'd recommend adding it as part of the instructions under "Option 1: Configure TOTP for self-enrollment". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The QR code appears after the user logs in, so I'm not sure that it would provide much of a benefit. I'm thinking we can add it later, if we think it'd be helpful, but for now I don't think it's necessary. I'll add below! |
||
|
||
### Request parameters | ||
|
||
- `mfa_request_id` `(string: <required>)` - The unique identifier of an MFA | ||
requirement in the authentication response of a login request. | ||
|
||
- `mfa_method_id` `(string: <required>)` - UUID of the MFA method. | ||
|
||
### Sample payload | ||
|
||
```json | ||
{ | ||
"mfa_request_id": "5879c74a-1418-1948-7be9-97b209d693a7", | ||
"mfa_method_id": "4746fb81-028c-cd4e-026b-7dd18fe4c2f4" | ||
} | ||
``` | ||
|
||
### Sample request | ||
|
||
```shell-session | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
--request POST \ | ||
--data @payload.json \ | ||
http://127.0.0.1:8200/v1/identity/mfa/method/totp/self-enroll | ||
``` | ||
|
||
### Sample response | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this, contents is copy/pasted from the sample output above |
||
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F31WdMawPfkXOMhZiBIGYgiBmPvx+iUo2RV/vp3llSpZuXpfqgbNwnsBAzEMQMBDHjSH0InAMLMePvAAAA//8x2VnbmmL6HQAAAABJRU5ErkJggg==", | ||
"url": "otpauth://totp/vault:4746fb81-028c-cd4e-026b-7dd18fe4c2f4?algorithm=SHA1&digits=6&issuer=vault&period=30&secret=6HQ4RZ7GM6MMLRKVDCI23LXNZF7UDZ2U" | ||
} | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### vault.replication.rpc.client.persist_pending_login_mfa_secret ((#vault-replication-rpc-client-persist_pending_login_mfa_secret)) | ||
|
||
Metric type | Value | Description | ||
----------- | ----- | ----------- | ||
summary | ms | Time required by the client to persist the pending login MFA TOTP secret |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### vault.replication.rpc.server.persist_pending_login_mfa_secret ((#vault-replication-rpc-server-persist_pending_login_mfa_secret)) | ||
|
||
Metric type | Value | Description | ||
----------- | ----- | ----------- | ||
summary | ms | Time required by the server to persist the pending login MFA TOTP secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increased this header size so it is now included in the page table of contents