From 00fb45cd97d2314548dc07c2c8e1cc1737fd273f Mon Sep 17 00:00:00 2001 From: Andreas Nilsson Date: Wed, 3 Jul 2013 17:09:09 +0100 Subject: SERVER-7455 Common internal cluster auth function --- src/mongo/db/auth/security_key.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mongo/db/auth/security_key.h') diff --git a/src/mongo/db/auth/security_key.h b/src/mongo/db/auth/security_key.h index e261123dcea..e62bb3f32fd 100644 --- a/src/mongo/db/auth/security_key.h +++ b/src/mongo/db/auth/security_key.h @@ -18,8 +18,27 @@ #include +#include "mongo/client/dbclientinterface.h" + namespace mongo { + /** + * Internal secret key info. + */ + struct AuthInfo { + AuthInfo(); + std::string user; + std::string pwd; + }; + extern AuthInfo internalSecurity; // set at startup and not changed after initialization. + + /** + * This method authenticates to another cluster member using appropriate + * authentication data + * @return true if the authentication was succesful + */ + extern bool authenticateInternalUser(DBClientWithCommands* conn); + /** * This method checks the validity of filename as a security key, hashes its * contents, and stores it in the internalSecurity variable. Prints an -- cgit v1.2.1