Transform gitserver access logs to audit logs#41865
Conversation
bobheadxi
left a comment
There was a problem hiding this comment.
Note that gitserver access logs may still be used by the log.gitserver.accessLogs setting as before (should we totally drop this?)
We should mark it as deprecated in the docstring and remove it in a future release
Regarding the change in fields, I think it should be fine as long as we mention it in the changelog
| disabled bool | ||
| callback func() | ||
| accessLogsDisabled bool | ||
| auditDisabled bool |
There was a problem hiding this comment.
Internally why do we need to distinguish between the two? The logic to set disabled should take into account the legacy access logs and the new audit logs setting - IMO we should keep this the same as before here
There was a problem hiding this comment.
I needed it to test this bool logic but since we're dropping the older setting it might not be needed
There was a problem hiding this comment.
Instead, we can write a unit test for just that logic and keep this simple :)
Are you OK if I do it as part of this PR? So the change will be effective, right after merging the PR? Follow-up question; do you know of any clients using this in prod?
Good idea! |
Absolutely! (not the removal yet though)
I'm not entirely sure actually, original PR is here: https://github.com/sourcegraph/sourcegraph/pull/38798 searching for the PR reveals https://sourcegraph.slack.com/archives/C02UC4WUX1Q/p1657786740125169 which seems to indicate only 1 customer uses this at the moment |
|
@bobheadxi changes pushed, I tihnk I addressed everything we discussed here! |
bobheadxi
left a comment
There was a problem hiding this comment.
Nice, thanks for the updates!!
Co-authored-by: Robert Lin <robert@bobheadxi.dev>
* Transform gitserver access logs to audit logs
Description
Gitserver access logs will optionally be included in the audit log. This is controlled via log.auditLog.gitServerAccess setting in the site config.
@bobheadxi I made a couple of calls here, but nothing is set in the stone yet. Let's treat this PR as a conversation for what should happen:
log.gitserver.accessLogssetting as before (should we totally drop this?)actoris now located in theaudit.actorpropertyTest plan