Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97910

Propagate AuditClientAttrs across nodes via AuditMetadata and $audit

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • Security 2024-12-23, Security 2025-01-20, Security 2025-02-17
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      ForwardableOperationMetadata is useful for transferring data across OperationContexts and Clients on the same node. Transferring this data across nodes, however, requires for it to be included in rpc metadata.

      We can define a new IDL type called AuditMetadata which embeds impersonated users, roles, and client metadata (which is retrieved from the AuditClientAttrs instance on the thread-local Client. That type will serialize into the $audit BSON field that is attached on all intra-node command requests. When $audit is read on the ingress side, it will deserialize into AuditMetadata, which can then be transferred into the thread-local Client's AuditClientAttrs instance.

            Assignee:
            adrian.gonzalez@mongodb.com Adrian Gonzalez Montemayor
            Reporter:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: