-
Notifications
You must be signed in to change notification settings - Fork 18
feat: RBAC support (Sync/Async) #349
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
![]() |
Infrastructure as Code | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
SAST | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
Secrets | ![]() ![]() ![]() ![]() |
View in Orca |
![]() |
Vulnerabilities | ![]() ![]() ![]() ![]() |
View in Orca |
Closed
antas-marcin
approved these changes
Jan 30, 2025
@EqualsAndHashCode makes comparing Role and Permission objects easy
Makes creating several permissions for the same resource easier. For example, instead of 'Permission.data('Pizza', CREATE), Permission.data('Pizza', DELETE)' users can write 'Permission.data('Pizza', CREATE, DELETE)'. To avoid having ~4 different withPermission() builder methods in the client classes all factory methods on Permission class will return Permission[] (even if known to be length 1).
Moved to a separate file and documented.
- rename manage_users -> assign_and_revoke_users - add read_users action - add [crud]_roles actions - add scope for roles actions - default to VERBOSE verbosity for nodes permission if collection filter applied
Separate RBAC- and User-related tests Upgrage Weaviate server version to v1.28.6
Update test cases to reflect new server defaults in 1.28.6
Some actions are hard-deprecated and will result in an error. They are only used by the library internally to read legacy permissions.
Java 8 does not have Stream::toList.
dca4abd
to
1d80eb5
Compare
Permission holds all actions it permits and is distinguished from other permissions by its resource filters. Permissions are "flattened" before being sent to Weaviate and then grouped / merged back together after the response's been deserialized.
This lets us skip deduplication in merge()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #343.
This PR is the first iteration of that story, adding RBAC support to the sync client.
Initially it drew a lot on the Python's client, but I ended up re-organizing things to be consistent with the current client.
client.async().roles()
Files to pay attention to (have denser logic):
Permission.java
WeaviatePermission.java
Role.java
WeaviateRole.java
ClientRbacTestSuite.java