-
Notifications
You must be signed in to change notification settings - Fork 151
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
ROX-28388: Log the event of an API token creation #14526
base: master
Are you sure you want to change the base?
Conversation
Images are ready for the commit at 2a5880c. To use with deploy scripts, first |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14526 +/- ##
==========================================
+ Coverage 49.08% 49.11% +0.02%
==========================================
Files 2522 2523 +1
Lines 184227 184284 +57
==========================================
+ Hits 90434 90510 +76
+ Misses 86585 86568 -17
+ Partials 7208 7206 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/retest |
@@ -17,7 +17,8 @@ var ( | |||
hints = map[string]map[string]map[string]string{ | |||
authenticationDomain: { | |||
adminResources.APIToken: { | |||
"": `An API token is about to expire. See the details on the expiration time within the event message. | |||
codes.TokenCreated: `An API token has been created.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codes.TokenCreated: `An API token has been created.`, | |
codes.TokenCreated: `An API token has been created; consider using machine-to-machine authentication instead.`, |
Description
User-facing documentation
Testing and quality
Automated testing
How I validated my change
Unit tests.
Log message:
apitoken/creation: 2025/03/06 13:21:53.626725 log.go:27: Warn: An API token has been created {"err_code": "token-created", "api_token_name": "Log Token Creation Test", "api_token_id": "3c4f0797-74fd-4ac9-9c5e-dee2a011ef22", "roles": ["Configuration Controller"], "user_id": "sso:4df1b98c-24ed-4073-a9ad-356aec6bb62d:admin", "user_auth_provider": "basic Login with username/password"}
Administration event