-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
Externalizable source of truth for roles and attributes #678
Externalizable source of truth for roles and attributes #678
Conversation
Failed tests seems unrelated to this PR Some tests are never successful on my computer such as ConsumerGroupRepositoryTest list() (expected 6 was 11)
@tchiotludo what do you think ? |
There is flakky test on connect part. |
So I switched from local WSL to Azure Ubuntu build :
this feature branch :
In both branches the failing test is :
But the build is successful (thanks to org.gradle.test-retry I assume) |
cf5f696
to
a80a4c1
Compare
…groups-definition # Conflicts: # build.gradle # src/main/java/org/akhq/modules/OidcUserDetailsMapper.java
8505384
to
368bff4
Compare
…groups-definition # Conflicts: # src/main/java/org/akhq/modules/BasicAuthAuthenticationProvider.java
@tchiotludo I believe it's ready for review. Documentation is mostly a copy of this PR inside the README.md. I also added a small warning regarding the behavior of the attributes, since they only apply during read/list operation, and are not checked during insert/create. AKHQ users should know this. Some notes on changes I've made :
|
works perfectly !!! |
Refactoring of the Security layer to accomodate for external security configuration
PR Checklist
PR Description
In my use case, the source of truth which grants AKHQ users read access to certain topics and connects is located in a fast moving database and because of that, AKHQ configuration
application.yml
must be regenerated more than once per day which is not ideal.With this PR, I propose 3 implementations to map the user and users' groups into AKHQ roles and attributes.
Default configuration-based
This is the current implementation and the default one (doesn't break compatibility)
REST API
In this mode, AKHQ will send to the
akhq.security.rest.url
endpoint a POST request with the following JSON :and expect the following JSON as response :
Groovy API
akhq.security.groovy.file
must be a groovy class that implements the interface ClaimProvider :