Skip to content

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Sep 2, 2025

Fixes #19671
(re-?)Adds an audit log entry when an API key is created via coder login.

NOTE: This does not backfill audit logs.

Screenshot 2025-09-02 at 14 16 24

@johnstcn johnstcn requested review from sreya and f0ssel September 2, 2025 12:28
@johnstcn johnstcn self-assigned this Sep 2, 2025
@johnstcn johnstcn added the cherry-pick/v2.26 Needs to be cherry-picked to the 2.26 release branch label Sep 2, 2025
@johnstcn johnstcn merged commit bd6e91e into main Sep 2, 2025
35 checks passed
@johnstcn johnstcn deleted the cj/postAPIKey-audit branch September 2, 2025 13:21
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2025
@johnstcn johnstcn added cherry-pick/v2.25 Needs to be cherry-picked to the 2.25 release branch cherry-pick/v2.24 Needs to be cherry-picked to the 2.24 release branch labels Sep 2, 2025
Audit: *auditor,
Log: api.Logger,
Request: r,
Action: database.AuditActionCreate,
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't be visible in the UI if filter will specify action:login

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, typically that gets logged when users authenticate via the Web UI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cherry-pick/v2.24 Needs to be cherry-picked to the 2.24 release branch cherry-pick/v2.25 Needs to be cherry-picked to the 2.25 release branch cherry-pick/v2.26 Needs to be cherry-picked to the 2.26 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CreateAPIKey method invocations should generate audit logs
3 participants