Skip to content

Commit 20a9b17

Browse files
committed
Update to use 5 minutes and no background task
1 parent c29228a commit 20a9b17

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

source/auth/auth.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,20 +1059,14 @@ be used in lieu of manual caching.
10591059

10601060
If using manual caching, the "Expiration" field MUST be stored
10611061
and used to determine when to clear the cache. Credentials are considered
1062-
valid if they are more than one minute away from expiring, to the reduce the
1062+
valid if they are more than five minutes away from expiring, to the reduce the
10631063
chance of expiration before they are validated by the server.
10641064

10651065
If there are no current valid cached credentials, the driver MUST initiate a
10661066
credential request. To avoid adding a bottleneck that would override the
10671067
``maxConnecting`` setting, the driver MUST not place a lock on making a
10681068
request. The cache MUST be written atomically.
10691069

1070-
Once valid credentials are received, the driver SHOULD schedule an update of
1071-
the cache within five minutes of the expiration time, unless the driver does not have the ability to schedule background tasks. The background task MUST
1072-
handle timeouts or errors and retry appropriately. The purpose of the
1073-
background task is to limit the chance of needing to initiate multiple
1074-
simultaneous requests.
1075-
10761070
If AWS authentication fails for any reason, the cache MUST be cleared.
10771071

10781072
.. note::

source/auth/tests/mongodb-aws.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ check for the absence of the AWS_ACCESS_KEY_ID and of credentials in the URI.
105105
#. Clear the cache.
106106
#. Create a new client.
107107
#. Ensure that a ``find`` operation adds credentials to the cache..
108-
#. Override the cached credentials with an "Expiration" that is within thirty
109-
seconds of the current UTC time.
108+
#. Override the cached credentials with an "Expiration" that is within one
109+
minute of the current UTC time.
110110
#. Create a new client.
111111
#. Ensure that a ``find`` operation updates the credentials in the cache.
112-
#. Poison the cache with garbage content.
112+
#. Poison the cache with invalid auth content.
113113
#. Create a new client.
114114
#. Ensure that a ``find`` operation results in an error.
115115
#. Ensure that the cache has been cleared.

0 commit comments

Comments
 (0)