-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add role management endpoints #8984
Conversation
3728a5c
to
6c32f1a
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #8984 +/- ##
============================================
+ Coverage 37.11% 37.14% +0.03%
Complexity 2241 2241
============================================
Files 1262 1263 +1
Lines 115834 116059 +225
Branches 3277 3277
============================================
+ Hits 42991 43110 +119
- Misses 70889 70995 +106
Partials 1954 1954
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
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.
Great PR.
I think it's going to be a pain not to have a “role config” in this repository but in the deployment repository. It's great that it can be overridden, but knowing that you're likely to want to update it regularly (until the whole thing has stabilized and settled down), it's error prone.
It will. I just split it to help with the review. I may keep a few commits (especially for the stdcm env part), but I'll split it right this time 😁
Agreed. I am becoming increasingly convinced that we don't need application roles after all. (Or at least until we have a proper administration panel.) Maybe it wouldn't be so bad to remove them since we are the ones who will grant roles anyway. |
Another argument is that with the current implementation, changing the scope of an application role won't change user roles. (Except if we do a proper migration). It reduces the usefulness of this object in my opinion. |
62486a1
to
3c6a80d
Compare
9c8b0a1
to
52e1e67
Compare
52e1e67
to
fca53c6
Compare
fca53c6
to
386aafb
Compare
Since a new Authorizer is created for each request, it doesn't needs to be refcounted. However it still needs to be Clone otherwise axum rejects the type. Removing the Arc allows easier mutability. Signed-off-by: Leo Valais <leo.valais97@gmail.com>
Builtin roles are supposed to be atomic. Having to resolve both builtin roles and application roles makes all algorithms more cumbersome to write and induces some questions about whether or not we write implied builtin roles in the DB. Signed-off-by: Leo Valais <leo.valais97@gmail.com>
Signed-off-by: Leo Valais <leo.valais97@gmail.com>
Signed-off-by: Leo Valais <leo.valais97@gmail.com>
Signed-off-by: Leo Valais <leo.valais97@gmail.com>
386aafb
to
ce257e6
Compare
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.
Tested and not working. No user is created when using the application.
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 (tested).
Before using it in prod we need:
- Add tests
- Remove application role
- Add CLI
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 (not tested)
Tip
Review each commit individually.
Refs #8743
This PR lacks the following elements:
However I suggest we merge it like this if its content is good enough to allow @kmer2016 to work on the frontend part as soon as possible. Consequently, to also sum up the comments of this PR, we'll need to:
DbConnection
API: Add role management endpoints #8984 (comment)