-
Notifications
You must be signed in to change notification settings - Fork 0
ENG-9494 expose roles in request context #17
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #17 +/- ##
============================================
+ Coverage 71.49% 72.10% +0.61%
- Complexity 78 80 +2
============================================
Files 16 16
Lines 228 233 +5
Branches 12 13 +1
============================================
+ Hits 163 168 +5
+ Misses 55 54 -1
- Partials 10 11 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
surajpuvvada
left a comment
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.
lgtm - but pls wait for one more review
grpc-context-utils/src/main/java/org/hypertrace/core/grpcutils/context/JwtParser.java
Outdated
Show resolved
Hide resolved
| private final String testJwtName = "Johnny Rocket"; | ||
| private final String testJwtPictureUrl = "www.example.com"; | ||
| private final String testJwtEmail = "jrocket@example.com"; | ||
| private final Set<String> testRoles = ImmutableSet.of("traceable", "user", "billing_admin"); |
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.
We can drop the traceable role - want to leak as little as possible here
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.
Sure. Done
This comment has been minimized.
This comment has been minimized.
|
@aaron-steinfeld addressed comments. Please have another look |
This comment has been minimized.
This comment has been minimized.
|
hey @aaron-steinfeld, addressed issues we discussed offline. Please have a look |
Description
Add roles parsing logic to JWT parser and expose roles in request context.
The main motivation is to be able to reuse this logic in other parts of codebase, specifically in graphql context
Testing
Added unit tests
Checklist:
Documentation
Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.