You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Discussed with @coadler and the path forward here is to:
fix the above issues and any others we come across smoke-testing.
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.
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?
@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.
Activity
f0ssel commentedon Oct 7, 2022
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.
coadler commentedon Oct 7, 2022
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.
Kira-Pilot commentedon Oct 10, 2022
Discussed with @coadler and the path forward here is to:
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.
bpmct commentedon Oct 10, 2022
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?
Kira-Pilot commentedon Oct 10, 2022
Yup, sounds good to me! @bpmct
[-]Audit the audit log 🔍 [/-][+]audit: add/validate tests for audited events 🔍 [/+][-]audit: add/validate tests for audited events 🔍 [/-][+]audit: audit the audit log 🔍 [/+]Kira-Pilot commentedon Oct 24, 2022
@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.