-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
BE: RBAC: Subject type/value is unintended to be optional #719
base: main
Are you sure you want to change the base?
Conversation
@Haarolean I checked locally and with these changes RBAC with AD works as expected for both types ( Parameter value If need I can add integration tests with Active Directory. |
# Conflicts: # api/src/test/java/io/kafbat/ui/AbstractIntegrationTest.java
minor test refactoring
@Haarolean I've added integration tests with Active Directory. |
@@ -63,24 +62,39 @@ public ReactiveAuthenticationManager authenticationManager(LdapContextSource lda | |||
ba.setUserSearch(userSearch); | |||
} | |||
|
|||
AuthenticationManager manager = new ProviderManager(List.of( |
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.
Let's not mix the distinct issues in one PR, please. #54 is to be solved within #717 (which was planned as more of a refactoring PR first, but, welp, it's another story).
#716 has nothing to do with LDAP in particular, we'd need RBAC subject validation. In io.kafbat.ui.model.rbac.Permission
and Role
classes there's a validate
method, perhaps implementing one for Subject
as well is the way 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.
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.
@ActiveProfiles("rbac-ad") | ||
@AutoConfigureWebTestClient(timeout = "60000") | ||
@ContextConfiguration(initializers = {ActiveDirectoryIntegrationTest.Initializer.class}) | ||
public class ActiveDirectoryIntegrationTest { |
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.
This one is really cool tho, can you raise a separate PR with these tests so we can merge this?
Btw, we don't quite need kafka container here, the app can perfectly start with no defined clusters.
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.
Btw, we don't quite need kafka container here, the app can perfectly start with no defined clusters.
Yes, but there's a test that checks the creation of a topic on a cluster.
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.
Yes, but there's a test that checks the creation of a topic on a cluster.
this sounds redundant. Authenticating successfully should suffice
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.
can you raise a separate PR with these tests so we can merge this?
Opened the PR with the tests #726
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)