@@ -457,15 +457,18 @@ This endpoint initializes a new generation attempt. Only a single
457
457
generation attempt can take place at a time. One (and only one) of ` otp ` or
458
458
` pgp_key ` are required.
459
459
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
+
460
464
| Method | Path | Produces |
461
465
| :------- | :--------------------------- | :--------------------- |
462
466
| ` PUT ` | ` /sys/replication/dr/secondary/generate-operation-token/attempt ` | ` 200 application/json ` |
463
467
464
468
### Parameters
465
469
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.
469
472
470
473
- ` pgp_key ` ` (string: <required-unless-otp>) ` – Specifies a base64-encoded PGP
471
474
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
475
478
476
479
``` json
477
480
{
478
- "otp" : " CB23== "
481
+ "otp" : " "
479
482
}
480
483
```
481
484
@@ -497,7 +500,8 @@ $ curl \
497
500
"progress" : 1 ,
498
501
"required" : 3 ,
499
502
"encoded_token" : " " ,
500
- "pgp_fingerprint" : " 816938b8a29146fbe245dd29e7cbaf8e011db793" ,
503
+ "otp" : " 2vPFYG8gUSW9npwzyvxXMug0" ,
504
+ "otp_length" :24 ,
501
505
"complete" : false
502
506
}
503
507
```
0 commit comments