-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
feat(LDAP): add integration tests for LDAP Authorization #812
base: main
Are you sure you want to change the base?
Conversation
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.
@sixdouglas thank you very much for raising this PR, LDAP tests are much needed indeed :)
group-filter-search-base: "ou=people,dc=kafbat,dc=io" # required for RBAC | ||
oauth2: | ||
ldap: | ||
activeDirectory: false |
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 can be removed as it should default to false anyway, might be a good thing to catch possible issues like in https://github.com/kafbat/kafka-ui/pull/779/files
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.
Ok, you're right, let's remove redundant config settings
assertTrue(info.getRbacEnabled()); | ||
System.out.println("info = " + info); | ||
List<UserPermissionDTO> permissions = info.getUserInfo().getPermissions(); | ||
assertFalse(permissions.isEmpty()); |
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 particular test looks redundant -- in testUserPermissions
we've asserted that permissions of jacksmith
are the same as johndoe
's and have a topic permissions
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.
I agree, I've created this test while debugging config issues.
Not needed anymore, I'll remove it
@Override | ||
public void initialize(ConfigurableApplicationContext context) { | ||
System.setProperty("spring.ldap.urls", LDAP_CONTAINER.getLdapUrl()); | ||
System.setProperty("oauth2.ldap.activeDirectory", "false"); |
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.
perhaps redundant as mentioned in other 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.
Remove too, thanks for the catch
cc01a5c
to
b155902
Compare
@Haarolean removing both config:
and this one:
Break the LDAP tests in the CI, though it works on my machine (I never though I would use this sentence again ;) ). |
I'll take a look as well, might be faster |
What changes did you make? (Give an overview)
This is a PR to add Integration tests for the LDAP Authorization capability. Based on the work done for Active Directory in #726
closes #782
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)