diff options
author | Andreas Nilsson <andreas.nilsson@10gen.com> | 2013-07-03 17:09:09 +0100 |
---|---|---|
committer | Andreas Nilsson <andreas.nilsson@10gen.com> | 2013-07-03 18:29:37 +0100 |
commit | 00fb45cd97d2314548dc07c2c8e1cc1737fd273f (patch) | |
tree | 39bad422345f565c4bd8c6728eb8eb8a1e6104b1 /src/mongo/db/auth/security_key.h | |
parent | 3457954bb082d98dfd769d27771d4e30f3f785a5 (diff) | |
download | mongo-00fb45cd97d2314548dc07c2c8e1cc1737fd273f.tar.gz |
SERVER-7455 Common internal cluster auth function
Diffstat (limited to 'src/mongo/db/auth/security_key.h')
-rw-r--r-- | src/mongo/db/auth/security_key.h | 19 |
1 files changed, 19 insertions, 0 deletions
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,9 +18,28 @@ #include <string> +#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 * error message to the logs if there's an error. |