You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "jerqi (via GitHub)" <gi...@apache.org> on 2025/01/06 11:38:30 UTC
[PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
jerqi opened a new pull request, #6117:
URL: https://github.com/apache/gravitino/pull/6117
### What changes were proposed in this pull request?
Fix the check of duplicated privileges
### Why are the changes needed?
Fix: #6116
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Added new UT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "xunliu (via GitHub)" <gi...@apache.org>.
xunliu merged PR #6117:
URL: https://github.com/apache/gravitino/pull/6117
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #6117:
URL: https://github.com/apache/gravitino/pull/6117#discussion_r1904948232
##########
clients/client-java/src/main/java/org/apache/gravitino/client/DTOConverters.java:
##########
@@ -321,7 +322,7 @@ static SecurableObjectDTO toSecurableObject(SecurableObject securableObject) {
.build();
}
- static List<PrivilegeDTO> toPrivileges(List<Privilege> privileges) {
+ static List<PrivilegeDTO> toPrivileges(Collection<Privilege> privileges) {
Review Comment:
Collection<Privilege>. Other places I used some collections which are not sets.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #6117:
URL: https://github.com/apache/gravitino/pull/6117#discussion_r1904128782
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/AccessControlIT.java:
##########
@@ -489,7 +489,18 @@ void testManageRolePermissions() {
metalake.grantPrivilegesToRole(
roleName,
duplicatedCatalog,
- Lists.newArrayList(Privileges.SelectTable.allow(), Privileges.SelectTable.deny())));
+ Lists.newArrayList(Privileges.ReadFileset.allow(), Privileges.ReadFileset.deny())));
Review Comment:
I modified the implement of server. If we want to change the client side, we should deprecate the API and add new API.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #6117:
URL: https://github.com/apache/gravitino/pull/6117#discussion_r1904080984
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/AccessControlIT.java:
##########
@@ -489,7 +489,18 @@ void testManageRolePermissions() {
metalake.grantPrivilegesToRole(
roleName,
duplicatedCatalog,
- Lists.newArrayList(Privileges.SelectTable.allow(), Privileges.SelectTable.deny())));
+ Lists.newArrayList(Privileges.ReadFileset.allow(), Privileges.ReadFileset.deny())));
Review Comment:
Modified.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "xunliu (via GitHub)" <gi...@apache.org>.
xunliu commented on code in PR #6117:
URL: https://github.com/apache/gravitino/pull/6117#discussion_r1904884278
##########
clients/client-java/src/main/java/org/apache/gravitino/client/DTOConverters.java:
##########
@@ -321,7 +322,7 @@ static SecurableObjectDTO toSecurableObject(SecurableObject securableObject) {
.build();
}
- static List<PrivilegeDTO> toPrivileges(List<Privilege> privileges) {
+ static List<PrivilegeDTO> toPrivileges(Collection<Privilege> privileges) {
Review Comment:
`Collection<Privilege>` or `Set<Privilege>`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #6117:
URL: https://github.com/apache/gravitino/pull/6117#discussion_r1904193697
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/AccessControlIT.java:
##########
@@ -489,7 +489,18 @@ void testManageRolePermissions() {
metalake.grantPrivilegesToRole(
roleName,
duplicatedCatalog,
- Lists.newArrayList(Privileges.SelectTable.allow(), Privileges.SelectTable.deny())));
+ Lists.newArrayList(Privileges.ReadFileset.allow(), Privileges.ReadFileset.deny())));
Review Comment:
All changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#6116] fix(authz): Fix the check of duplicated privileges [gravitino]
Posted by "xunliu (via GitHub)" <gi...@apache.org>.
xunliu commented on code in PR #6117:
URL: https://github.com/apache/gravitino/pull/6117#discussion_r1904066709
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/AccessControlIT.java:
##########
@@ -489,7 +489,18 @@ void testManageRolePermissions() {
metalake.grantPrivilegesToRole(
roleName,
duplicatedCatalog,
- Lists.newArrayList(Privileges.SelectTable.allow(), Privileges.SelectTable.deny())));
+ Lists.newArrayList(Privileges.ReadFileset.allow(), Privileges.ReadFileset.deny())));
Review Comment:
I think maybe we can use `Set<Privilge>` in the `grantPrivilegesToRole(..., ..., Set<Privilge> privileges)` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org