-
Notifications
You must be signed in to change notification settings - Fork 162
Adds more debug logging to help figure out OIDC/RBAC issues #3308
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
- We log out the namespaces we've guessed a user has access to so if thats quite wrong we can go straight to investigating RBAC - Include user a bit more in the logs too - Remove "attempt to read token from auth header" as its not that useful
- Again remove the JWTAuthorizationHeaderPrincipalGetter debug statement, its not very useful
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.
Love the additional styling guidelines! ✨ Just a small question.
core/clustersmngr/factory.go
Outdated
return client, nil | ||
} | ||
|
||
// Format the namespaces as a map[clusterName][]namespacesNames |
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.
Will this scale?
What if you have 100+ namespaces? 1000+ ?
For clarity, 1000+ is not uncommon
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.
Good question. For the scenarios we've been exploring ~10-15 namespaces its been a real help. But for 1000 I guess some part of your logging system might get grumpy.
{ "myCluster": { "namespaces": ["foo", "bar"], "totalCount": "3" } # show a sensible N namespaces and report the total count
I don't know if the structured logging has nested structures in mind..
The count alone would still be useful.
@foot Is this still in progress? |
What changed?
Why was this change made?
Make it easier to debug why things may be missing on the apps/sources etc pages
How was this change implemented?
Adding more logging
How did you validate the change?
Manually
Examples