diff options
Diffstat (limited to 'src/mongo/executor')
-rw-r--r-- | src/mongo/executor/network_interface_tl.cpp | 6 | ||||
-rw-r--r-- | src/mongo/executor/remote_command_request.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/executor/network_interface_tl.cpp b/src/mongo/executor/network_interface_tl.cpp index 9ee2ffac0b6..d919bca3c3b 100644 --- a/src/mongo/executor/network_interface_tl.cpp +++ b/src/mongo/executor/network_interface_tl.cpp @@ -33,7 +33,7 @@ #include <fmt/format.h> #include "mongo/config.h" -#include "mongo/db/auth/security_token.h" +#include "mongo/db/auth/validated_tenancy_scope.h" #include "mongo/db/server_options.h" #include "mongo/db/wire_version.h" #include "mongo/executor/connection_pool_tl.h" @@ -71,9 +71,7 @@ Status appendMetadata(RemoteCommandRequestOnAny* request, if (!request->opCtx) return Status::OK(); - if (auto securityToken = auth::getSecurityToken(request->opCtx)) { - request->securityToken = securityToken->toBSON(); - } + request->validatedTenancyScope = auth::ValidatedTenancyScope::get(request->opCtx); return Status::OK(); } diff --git a/src/mongo/executor/remote_command_request.h b/src/mongo/executor/remote_command_request.h index 7d232a34756..cca27b03e71 100644 --- a/src/mongo/executor/remote_command_request.h +++ b/src/mongo/executor/remote_command_request.h @@ -33,6 +33,7 @@ #include <string> #include "mongo/base/error_codes.h" +#include "mongo/db/auth/validated_tenancy_scope.h" #include "mongo/db/jsobj.h" #include "mongo/rpc/metadata.h" #include "mongo/transport/transport_layer.h" @@ -73,7 +74,7 @@ struct RemoteCommandRequestBase { std::string dbname; BSONObj metadata{rpc::makeEmptyMetadata()}; BSONObj cmdObj; - BSONObj securityToken; + boost::optional<auth::ValidatedTenancyScope> validatedTenancyScope; // OperationContext is added to each request to allow OP_Command metadata attachment access to // the Client object. The OperationContext is only accessed on the thread that calls |