Skip to content

audit: audit the audit log 🔍  #4408

Closed

Description

@bpmct

As we're quickly building/changing features, we need to ensure the audit log is capturing an accurate trail of user actions.

A 🦈 has caught a couple of issues, but we need to do a comprehensive list of CRUD actions (CLI and dashboard) and ensure they're being accurately represented.

The intended behavior is documented here.

Additionally, we should have a process in place for ensuring incoming features (#4125, #4311) are represented in the audit log. Can we do this via automated tests or should we build something into the product/QA process?

It's better to start thinking about this now before we introduce a lot of debt.

Activity

  1. added this to the EE milestone on Oct 6, 2022
  2. f0ssel commented on Oct 7, 2022

    @f0ssel
    Member

    I think it's easy enough to write go tests for this, it's probably best to have each feature/endpoint do it's own expected audit log testing.

  3. coadler commented on Oct 7, 2022

    @coadler
    Contributor

    One thing that makes testing audit logs generated by AGPL routes hard is that the audit logs are generated in the enterprise code. You can really only assert the inputs to the enterprise code unless you want to move the tests there as well.

  4. self-assigned this
    on Oct 7, 2022
  5. Kira-Pilot commented on Oct 10, 2022

    @Kira-Pilot
    Contributor

    Discussed with @coadler and the path forward here is to:

    1. fix the above issues and any others we come across smoke-testing.
    2. ensure that we assert the creation (rather than content) of logs for each action. We cannot test the diffs because we cannot easily test the enterprise code.

    There is no way to automate audit log creation for new features, but I can write a quick how-to if that's helpful, @bpmct.

  6. bpmct commented on Oct 10, 2022

    @bpmct
    MemberAuthor

    There is no way to automate audit log creation for new features, but I can write a quick how-to if that's helpful, @bpmct.

    That would be helpful! We can ensure that incoming features are in the audit log during QA and rely on automated tests to ensure records remain accurate. Does that make sense to you @Kira-Pilot?

  7. Kira-Pilot commented on Oct 10, 2022

    @Kira-Pilot
    Contributor

    Yup, sounds good to me! @bpmct

  8. changed the title [-]Audit the audit log 🔍 [/-] [+]audit: add/validate tests for audited events 🔍 [/+] on Oct 10, 2022
  9. changed the title [-]audit: add/validate tests for audited events 🔍 [/-] [+]audit: audit the audit log 🔍 [/+] on Oct 19, 2022
  10. Kira-Pilot commented on Oct 24, 2022

    @Kira-Pilot
    Contributor

    @bpmct I am going to close this issue if that's alright with you as I think it has been completed!
    Here is a guide on auditing new features for product/future devs.
    Here is an epic of Audit issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions