Skip to content

Commit 320d1b7

Browse files
committed
Update website docs around root token generation
1 parent 7cd1984 commit 320d1b7

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

website/source/api/system/generate-root.html.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,18 @@ This endpoint initializes a new root generation attempt. Only a single root
5454
generation attempt can take place at a time. One (and only one) of `otp` or
5555
`pgp_key` are required.
5656

57+
Note: `otp` can be empty, in which case an OTP of suitable length will be
58+
generated for you, which is recommended. Future versions of Vault will remove
59+
the need to set this parameter at all.
60+
5761
| Method | Path | Produces |
5862
| :------- | :--------------------------- | :--------------------- |
5963
| `PUT` | `/sys/generate-root/attempt` | `200 application/json` |
6064

6165
### Parameters
6266

63-
- `otp` `(string: <required-unless-pgp>)` – Specifies a base64-encoded 16-byte
64-
value. The raw bytes of the token will be XOR'd with this value before being
65-
returned to the final unseal key provider.
67+
- `otp` `(string: <required-unless-pgp>)` – Set, but leave this value blank, to
68+
have Vault generate a suitable OTP and return it.
6669

6770
- `pgp_key` `(string: <required-unless-otp>)` – Specifies a base64-encoded PGP
6871
public key. The raw bytes of the token will be encrypted with this value
@@ -72,7 +75,7 @@ generation attempt can take place at a time. One (and only one) of `otp` or
7275

7376
```json
7477
{
75-
"otp": "CB23=="
78+
"otp": ""
7679
}
7780
```
7881

@@ -94,7 +97,8 @@ $ curl \
9497
"progress": 1,
9598
"required": 3,
9699
"encoded_token": "",
97-
"pgp_fingerprint": "816938b8a29146fbe245dd29e7cbaf8e011db793",
100+
"otp": "2vPFYG8gUSW9npwzyvxXMug0",
101+
"otp_length" :24,
98102
"complete": false
99103
}
100104
```

website/source/api/system/replication-dr.html.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,18 @@ This endpoint initializes a new generation attempt. Only a single
457457
generation attempt can take place at a time. One (and only one) of `otp` or
458458
`pgp_key` are required.
459459

460+
Note: `otp` can be empty, in which case an OTP of suitable length will be
461+
generated for you, which is recommended. Future versions of Vault will remove
462+
the need to set this parameter at all.
463+
460464
| Method | Path | Produces |
461465
| :------- | :--------------------------- | :--------------------- |
462466
| `PUT` | `/sys/replication/dr/secondary/generate-operation-token/attempt` | `200 application/json` |
463467

464468
### Parameters
465469

466-
- `otp` `(string: <required-unless-pgp>)` – Specifies a base64-encoded 16-byte
467-
value. The raw bytes of the token will be XOR'd with this value before being
468-
returned to the final unseal key provider.
470+
- `otp` `(string: <required-unless-pgp>)` – Set, but leave this value blank, to
471+
have Vault generate a suitable OTP and return it.
469472

470473
- `pgp_key` `(string: <required-unless-otp>)` – Specifies a base64-encoded PGP
471474
public key. The raw bytes of the token will be encrypted with this value
@@ -475,7 +478,7 @@ generation attempt can take place at a time. One (and only one) of `otp` or
475478

476479
```json
477480
{
478-
"otp": "CB23=="
481+
"otp": ""
479482
}
480483
```
481484

@@ -497,7 +500,8 @@ $ curl \
497500
"progress": 1,
498501
"required": 3,
499502
"encoded_token": "",
500-
"pgp_fingerprint": "816938b8a29146fbe245dd29e7cbaf8e011db793",
503+
"otp": "2vPFYG8gUSW9npwzyvxXMug0",
504+
"otp_length" :24,
501505
"complete": false
502506
}
503507
```

0 commit comments

Comments
 (0)