summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authorization_manager.h
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2019-01-30 18:50:32 +0000
committerSara Golemon <sara.golemon@mongodb.com>2019-02-14 16:42:34 +0000
commite55d6e2292e5dbe2f97153251d8193d1cc89f5d7 (patch)
tree8f9d2d5b4afc2db482a29a0dc028e0b8dffc6c4f /src/mongo/db/auth/authorization_manager.h
parent2dedc4f28b8807fc76ce7ad93fcb709728c18642 (diff)
downloadmongo-e55d6e2292e5dbe2f97153251d8193d1cc89f5d7.tar.gz
SERVER-38984 Validate unique User ID on UserCache hit
Diffstat (limited to 'src/mongo/db/auth/authorization_manager.h')
-rw-r--r--src/mongo/db/auth/authorization_manager.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h
index f9cd1248d4b..1ec9f421a4c 100644
--- a/src/mongo/db/auth/authorization_manager.h
+++ b/src/mongo/db/auth/authorization_manager.h
@@ -99,6 +99,7 @@ public:
static MONGO_DECLARE_SHIM(()->std::unique_ptr<AuthorizationManager>) create;
+ static constexpr StringData USERID_FIELD_NAME = "userId"_sd;
static constexpr StringData USER_NAME_FIELD_NAME = "user"_sd;
static constexpr StringData USER_DB_FIELD_NAME = "db"_sd;
static constexpr StringData ROLE_NAME_FIELD_NAME = "role"_sd;
@@ -267,6 +268,13 @@ public:
const UserName& userName) = 0;
/**
+ * Validate the ID associated with a known user while refreshing session cache.
+ */
+ virtual StatusWith<UserHandle> acquireUserForSessionRefresh(OperationContext* opCtx,
+ const UserName& userName,
+ const User::UserId& uid) = 0;
+
+ /**
* Marks the given user as invalid and removes it from the user cache.
*/
virtual void invalidateUserByName(OperationContext* opCtx, const UserName& user) = 0;