Skip to content

Commit b150e74

Browse files
authored
MONGOCRYPT-599 document need to call mongocrypt_setopt_retry_kms (#909)
* remove HTTP from documentation The KMIP KMS provider does not use HTTP. * revise note about fanning out requests To avoid suggesting that drivers can iterate all KMS requests initially with `mongocrypt_ctx_next_kms_ctx`. When retry is enabled, more KMS requests may be added when processing responses. * note call to `mongocrypt_setopt_retry_kms` is needed * clarify call of `mongocrypt_kms_ctx_fail`
1 parent 4bde0b8 commit b150e74

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

integrating.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ All contexts except for create data key.
195195

196196
**libmongocrypt needs**...
197197

198-
The responses from one or more HTTP messages to KMS.
198+
The responses from one or more messages to KMS.
199+
200+
Ensure `mongocrypt_setopt_retry_kms` is called on the `mongocrypt_t` to enable retry.
199201

200202
**Driver needs to...**
201203

202-
1. Iterate all KMS requests using `mongocrypt_ctx_next_kms_ctx`.
203-
(Note, the driver MAY fan out all HTTP requests at the same time).
204-
2. For each context:
204+
1. For each context returned by `mongocrypt_ctx_next_kms_ctx`:
205205

206206
a. Delay the message by the time in microseconds indicated by
207207
`mongocrypt_kms_ctx_usleep` if returned value is greater than 0.
@@ -219,11 +219,13 @@ The responses from one or more HTTP messages to KMS.
219219
d. Feed the reply back with `mongocrypt_kms_ctx_feed`. Repeat
220220
> until `mongocrypt_kms_ctx_bytes_needed` returns 0.
221221

222-
If any step encounters a network error, continue to the next KMS context if
223-
`mongocrypt_kms_ctx_fail` returns true. Otherwise, abort and report an
224-
error.
222+
If any step encounters a network error, call `mongocrypt_kms_ctx_fail`.
223+
If `mongocrypt_kms_ctx_fail` returns true, continue to the next KMS context.
224+
If `mongocrypt_kms_ctx_fail` returns false, abort and report an error.
225+
226+
2. When done feeding all replies, call `mongocrypt_ctx_kms_done`.
225227

226-
3. When done feeding all replies, call `mongocrypt_ctx_kms_done`.
228+
Note, the driver MAY fan out KMS requests in parallel. More KMS requests may be added when processing responses to retry.
227229

228230
**Applies to...**
229231

0 commit comments

Comments
 (0)