From b5059f5c6b9beec74849ad38cfe8890da2255d83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 10:32:30 -0700 Subject: [PATCH 1/2] build(deps): bump driver-core/src/test/resources/specifications (#1724) Bumps [driver-core/src/test/resources/specifications](https://github.com/mongodb/specifications) from `ca0e382` to `f4c0bbd`. - [Release notes](https://github.com/mongodb/specifications/releases) - [Commits](https://github.com/mongodb/specifications/compare/ca0e382fe02d1f4e87118bb72b05096e1d8ed4f4...f4c0bbdbf8a8560580c947ca2c331794431a0c78) --- updated-dependencies: - dependency-name: driver-core/src/test/resources/specifications dependency-version: f4c0bbdbf8a8560580c947ca2c331794431a0c78 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- driver-core/src/test/resources/specifications | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-core/src/test/resources/specifications b/driver-core/src/test/resources/specifications index ca0e382fe0..f4c0bbdbf8 160000 --- a/driver-core/src/test/resources/specifications +++ b/driver-core/src/test/resources/specifications @@ -1 +1 @@ -Subproject commit ca0e382fe02d1f4e87118bb72b05096e1d8ed4f4 +Subproject commit f4c0bbdbf8a8560580c947ca2c331794431a0c78 From 3de5b477fa6b5edbb3072762fcc590c539615160 Mon Sep 17 00:00:00 2001 From: Viacheslav Babanin Date: Fri, 6 Jun 2025 12:52:36 -0700 Subject: [PATCH 2/2] Use OperationContext with NOOP Session (#1733) JAVA-5880 --- .../main/com/mongodb/internal/connection/Authenticator.java | 2 +- .../com/mongodb/internal/connection/OidcAuthenticator.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java b/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java index b1579cd119..2889a93870 100644 --- a/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java +++ b/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java @@ -113,7 +113,7 @@ public void reauthenticateAsync(final InternalConnection connection, final Opera }).finish(callback); } - private static OperationContext operationContextWithoutSession(final OperationContext operationContext) { + static OperationContext operationContextWithoutSession(final OperationContext operationContext) { return operationContext.withSessionContext( new ReadConcernAwareNoOpSessionContext(operationContext.getSessionContext().getReadConcern())); } diff --git a/driver-core/src/main/com/mongodb/internal/connection/OidcAuthenticator.java b/driver-core/src/main/com/mongodb/internal/connection/OidcAuthenticator.java index 99fcee788e..1e67626d60 100644 --- a/driver-core/src/main/com/mongodb/internal/connection/OidcAuthenticator.java +++ b/driver-core/src/main/com/mongodb/internal/connection/OidcAuthenticator.java @@ -253,7 +253,7 @@ static OidcCallback getGcpCallback(final MongoCredential credential) { @Override public void reauthenticate(final InternalConnection connection, final OperationContext operationContext) { assertTrue(connection.opened()); - authenticationLoop(connection, connection.getDescription(), operationContext); + authenticationLoop(connection, connection.getDescription(), operationContextWithoutSession(operationContext)); } @Override @@ -262,7 +262,7 @@ public void reauthenticateAsync(final InternalConnection connection, final SingleResultCallback callback) { beginAsync().thenRun(c -> { assertTrue(connection.opened()); - authenticationLoopAsync(connection, connection.getDescription(), operationContext, c); + authenticationLoopAsync(connection, connection.getDescription(), operationContextWithoutSession(operationContext), c); }).finish(callback); }