Skip to content

Implement audit log (initial patch)

Dmitry Ivanov requested to merge funbringer/impl-audit-log into master

Summary

Implement ACL audit events

Currently, this implements some of the required audit events. See: https://docs.google.com/document/d/1wNXBtcVfzgawNb7ylvi8AQr3A4IxyseLmO5n1knWsOA

Implemented:

  • features:

    • FFI wrappers for say.{h,c}
    • safe logger object on top of FFI definitions
    • unified tlog/audit definitions for formatting
    • fixed a needless allocation in tlog (new root per each line)
  • events:

    • create_user
    • drop_user
    • create_role
    • drop_role
    • change_password
    • grant_privilege
    • revoke_privilege
    • create_table
    • drop_table
    • grant_role
    • revoke_role

Todo:

  • features:

    • unique id generation
    • security subject (who executed the action)
    • audit configuration (via pico.audit function)
  • well-defined events:

    • create_database (universe)
    • change_config
    • change_current_grade
  • special events (local to each node):

    • auth_ok / auth_fail
    • access_denied (still not sure if we absolutely need that)
    • audit_rotate
  • Unavailable (haven't been defined yet):

    • rename_user
    • create_procedure
    • drop_procedure

Related: #349 (closed)

Ensure that

  • New code is covered by tests (tbd in follow-up MRs)
  • API is documented
  • Changelog is up to date (tbd in follo-up MRs)
  • (if Lua API changed) Lua API version is bumped in luamod.rs
  • A follow-up doc issue: docs#105 (closed)
Edited by Yaroslav Dynnikov

Merge request reports