- Notifications
You must be signed in to change notification settings - Fork926
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
ProblemCurrently audit logging is initiated per route. This means that each route has at most1 audit event created.However, single http request can cause multiple changes to multiple entities. This is currently not being tracked. ExamplesCreate workspaceCreate workspace has multiple db changes; These tables can be updated in other routes and generate different audit log events (eg QuestionShould we design/implement a way to audit log side effects? ExampleCreate workspaceAn audit log for the create workspace should be made, as that is theuser action. Side effects of the provisioner job and workspace build should also be logged so that they can be tracked in the context of the original user action. Now a ProposalLinked audit logs (parent -> child or primary -> secondary)Allow creating linked audit logs with an optional We should not allow infinite nesting, and only allow 1 level of "children" logs. We do not want to build full tracing here. Linked audit log tableA new audit log table for these secondary audit logs would be created.
Other ideas?You got any? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 3 comments 10 replies
-
So glad you brought this up! It's definitely a pain point. Some color:
So pain points from my end are scaling (how many auditable resources do we really want) and UX (how many audit log lines do we really want; how can we make associations between log items clear; how do we handle filtering). |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank you for the extra context links. A thought on secondary audit events is that many can be implemented on the persistence layer itself. So every change to the db will automatically drop these logs. You bring up even more points of "secondary events" such as failed jobs. This would give the provisioner a way to drop an audit logs as a failed event relating to the primary user action. This does bring up a question though. Should the provisioner log show in the UI as it's own row? Or underneath the |
BetaWas this translation helpful?Give feedback.
All reactions
-
I like the idea of toggling because I actually think it might keep the UI simpler. What I would like to avoid is having to put in a bunch of filtering so users can make sense of the view - as@spikecurtis mentioned below, most filtering is probably going to be done in Splunk. IDK though - warrants more thought. |
BetaWas this translation helpful?Give feedback.
All reactions
-
In the RFC, we set thisas a requirement, and the proposed solution was to generate a RequestID that would tie together multiple logs if the request resulted in multiple actions. |
BetaWas this translation helpful?Give feedback.
All reactions
-
It does seem like we might have to store the Originally I was thinking it can all go on the |
BetaWas this translation helpful?Give feedback.
All reactions
-
I mean, we should already be storing it on the Audit Logs, but in the case that a request writes something to the database which then gets picked up by some background process (e.g. builds) then yes, the job that gets picked up would need the request ID. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I do like the idea of I still think there is value in |
BetaWas this translation helpful?Give feedback.
All reactions
-
Have we done any investigation into how other products that often involve linked, async requests handle their audit logs (e.g. CI vendors (e.g. circleci), git providers (e.g. gitlab), or identify-based access tools (e.g. teleport)? I'm personally curious if there are any patterns in how they link/relate logs, mostly to ensure that we don't do something bespoke that may be confusing for customers who are used to consuming logs from these other platforms (via the UI, consuming via the API, or ingesting into Splunk/StackDriver) |
BetaWas this translation helpful?Give feedback.
All reactions
-
@bpmct I have not, but this is essentially tracing which is rather normal. The onlyflair is how we present it on our UI |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Another reason for this is we log If we can link audit log actions, then we could have a |
BetaWas this translation helpful?Give feedback.