Skip to content

Commit ce365eb

Browse files
committed
Update to use 5 minutes and no background task
1 parent f5e7b71 commit ce365eb

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
@@ -1120,20 +1120,14 @@ be used in lieu of manual caching.
11201120

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

11261126
If there are no current valid cached credentials, the driver MUST initiate a
11271127
credential request. To avoid adding a bottleneck that would override the
11281128
``maxConnecting`` setting, the driver MUST not place a lock on making a
11291129
request. The cache MUST be written atomically.
11301130

1131-
Once valid credentials are received, the driver SHOULD schedule an update of
1132-
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
1133-
handle timeouts or errors and retry appropriately. The purpose of the
1134-
background task is to limit the chance of needing to initiate multiple
1135-
simultaneous requests.
1136-
11371131
If AWS authentication fails for any reason, the cache MUST be cleared.
11381132

11391133
.. note::

source/auth/tests/mongodb-aws.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ check for the absence of the AWS_ACCESS_KEY_ID and of credentials in the URI.
129129
#. Clear the cache.
130130
#. Create a new client.
131131
#. Ensure that a ``find`` operation adds credentials to the cache..
132-
#. Override the cached credentials with an "Expiration" that is within thirty
133-
seconds of the current UTC time.
132+
#. Override the cached credentials with an "Expiration" that is within one
133+
minute of the current UTC time.
134134
#. Create a new client.
135135
#. Ensure that a ``find`` operation updates the credentials in the cache.
136-
#. Poison the cache with garbage content.
136+
#. Poison the cache with invalid auth content.
137137
#. Create a new client.
138138
#. Ensure that a ``find`` operation results in an error.
139139
#. Ensure that the cache has been cleared.

0 commit comments

Comments
 (0)