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-4064: stamp effective user ID from header #6984

Merged
merged 4 commits into from
Jul 19, 2024
Merged

CBG-4064: stamp effective user ID from header #6984

merged 4 commits into from
Jul 19, 2024

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented Jul 19, 2024

CBG-4064

  • Stamp effective user id from headers into audit context

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Integration Tests

Copy link
Member

@bbrks bbrks left a comment

Choose a reason for hiding this comment

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

Looks good. Think we want a bit more coverage of the event emitted for real_userid

Comment on lines 459 to 463
for _, event := range events {
effective := event[base.AuditEffectiveUserID].(map[string]any)
assert.Equal(t, cnfDomain, effective[domain])
assert.Equal(t, cnfUser, effective[user])
}
Copy link
Member

Choose a reason for hiding this comment

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

As discussed, make sure we're still setting real_userid (this might need tweaks to ensure it works under combination of walrus/cb server based on admin auth)

Copy link
Member

@bbrks bbrks left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks!

@bbrks bbrks merged commit 09feb24 into main Jul 19, 2024
38 checks passed
@bbrks bbrks deleted the CBG-4064 branch July 19, 2024 14:12
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.

2 participants