diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2021-10-07 14:38:29 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-01 20:38:59 +0000 |
commit | 102cc8aeb299faadd9349c3ffd23f7ca9ff3c32b (patch) | |
tree | 72fc430c4f795afc34269c6e43b7c00062eb0518 | |
parent | cf80c11bc5308d9b889ed61c1a3eeb821839df56 (diff) | |
download | mongo-102cc8aeb299faadd9349c3ffd23f7ca9ff3c32b.tar.gz |
SERVER-60362 Implement KMIP-based Audit Log Encryption
-rw-r--r-- | src/mongo/db/audit.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/audit.h | 5 | ||||
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 1 | ||||
-rw-r--r-- | src/mongo/s/mongos_main.cpp | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/audit.cpp b/src/mongo/db/audit.cpp index 2f62a0d26b9..c741b8c4e4c 100644 --- a/src/mongo/db/audit.cpp +++ b/src/mongo/db/audit.cpp @@ -39,6 +39,8 @@ std::function<void(ServiceContext*)> initializeSynchronizeJob; ImpersonatedClientAttrs::ImpersonatedClientAttrs(Client* client) {} +void rotateAuditLog() {} + void logClientMetadata(Client* client) { invariant(client); } diff --git a/src/mongo/db/audit.h b/src/mongo/db/audit.h index 2e4904e09df..684983bf7be 100644 --- a/src/mongo/db/audit.h +++ b/src/mongo/db/audit.h @@ -152,6 +152,11 @@ private: }; /** + * Rotates the audit log in enterprise. Only to be called on startup. + */ +void rotateAuditLog(); + +/** * Logs the result of an authentication attempt. */ void logAuthentication(Client* client, const AuthenticateEvent& event); diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index b785bd235a0..36f6842d691 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -1469,6 +1469,7 @@ int mongod_main(int argc, char* argv[]) { } } + audit::rotateAuditLog(); setUpCollectionShardingState(service); setUpCatalog(service); setUpReplication(service); diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index e945b019249..8753323ccf4 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -907,6 +907,7 @@ ExitCode mongos_main(int argc, char* argv[]) { return EXIT_ABRUPT; } + audit::rotateAuditLog(); registerShutdownTask(cleanupTask); const auto service = getGlobalServiceContext(); |