Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBG-4060: Role-based audit filtering #6980

Merged
merged 9 commits into from
Jul 22, 2024
Merged

CBG-4060: Role-based audit filtering #6980

merged 9 commits into from
Jul 22, 2024

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Jul 18, 2024

CBG-4060

  • Add GetRoles() to auth.User interface for access to roles (and initialization if nessesary)
  • Add role filtering logic to shouldLogAuditEventForUserAndRole
  • Store SG or CB Server roles on LogContext, but only when we have role-based filtering enabled
    • Getting the roles for CB Server RBAC users costs one additional HTTP /whoami request per-authed request when we have auditing and CB Server role filtering enabled.
    • Getting the roles for SG users is free if they are initialized
  • Test coverage of role-filtered audit events in TestAuditLoggingFields

Integration Tests

@bbrks bbrks self-assigned this Jul 18, 2024
torcolvin
torcolvin previously approved these changes Jul 18, 2024
Copy link
Collaborator

@torcolvin torcolvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

base/logger_audit.go Outdated Show resolved Hide resolved
rest/server_context.go Outdated Show resolved Hide resolved
@bbrks bbrks removed their assignment Jul 22, 2024
@adamcfraser adamcfraser self-assigned this Jul 22, 2024
@adamcfraser adamcfraser merged commit 8b34228 into main Jul 22, 2024
38 checks passed
@adamcfraser adamcfraser deleted the CBG-4060 branch July 22, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants