[#7570] feat(authz): Support topic authorization#7580
[#7570] feat(authz): Support topic authorization#7580xunliu merged 11 commits intoapache:branch-metadata-authzfrom
Conversation
| @PathParam("catalog") @AuthorizationMetadata(type = MetadataObject.Type.CATALOG) | ||
| String catalog, | ||
| @PathParam("schema") @AuthorizationMetadata(type = MetadataObject.Type.SCHEMA) | ||
| String schema) { |
There was a problem hiding this comment.
The list interface does not require AuthorizationMetadata.
| topics = | ||
| MetadataFilterHelper.filterByExpression( | ||
| metalake, | ||
| "METALAKE::CONSUME_TOPIC || CATALOG::CONSUME_TOPIC || SCHEMA::CONSUME_TOPIC || TOPIC::CONSUME_TOPIC || METALAKE::PRODUCE_TOPIC ||CATALOG::PRODUCE_TOPIC || SCHEMA::PRODUCE_TOPIC || TOPIC::PRODUCE_TOPIC || METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || TOPIC::OWNERSHIP", |
There was a problem hiding this comment.
USE_CATALOG and USE_SCHEMA is required.
| @ResponseMetered(name = "load-topic", absolute = true) | ||
| @AuthorizationExpression( | ||
| expression = | ||
| "METALAKE::CONSUME_TOPIC || CATALOG::CONSUME_TOPIC || SCHEMA::CONSUME_TOPIC || TOPIC::CONSUME_TOPIC || METALAKE::PRODUCE_TOPIC || CATALOG::PRODUCE_TOPIC || SCHEMA::PRODUCE_TOPIC || TOPIC::PRODUCE_TOPIC || METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || TOPIC::OWNERSHIP", |
There was a problem hiding this comment.
USE_CATALOG and USE_SCHEMA is required.
There was a problem hiding this comment.
Please use any expression like ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
Please refer to https://github.com/apache/gravitino/pull/7577/files
| topics = | ||
| MetadataFilterHelper.filterByExpression( | ||
| metalake, | ||
| "METALAKE::CONSUME_TOPIC || CATALOG::CONSUME_TOPIC || SCHEMA::CONSUME_TOPIC || TOPIC::CONSUME_TOPIC || METALAKE::PRODUCE_TOPIC ||CATALOG::PRODUCE_TOPIC || SCHEMA::PRODUCE_TOPIC || TOPIC::PRODUCE_TOPIC || METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || TOPIC::OWNERSHIP", |
There was a problem hiding this comment.
Please use any expression like ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
Please refer to https://github.com/apache/gravitino/pull/7577/files
| @ResponseMetered(name = "create-topic", absolute = true) | ||
| @AuthorizationExpression( | ||
| expression = | ||
| "METALAKE::CREATE_TOPIC || CATALOG::CREATE_TOPIC || SCHEMA::CREATE_TOPIC || METALAKE::OWNER || CATALOG::OWNER || SCHEMA::OWNER", |
There was a problem hiding this comment.
Please use any expression like ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
Please refer to https://github.com/apache/gravitino/pull/7577/files
| @ResponseMetered(name = "load-topic", absolute = true) | ||
| @AuthorizationExpression( | ||
| expression = | ||
| "METALAKE::CONSUME_TOPIC || CATALOG::CONSUME_TOPIC || SCHEMA::CONSUME_TOPIC || TOPIC::CONSUME_TOPIC || METALAKE::PRODUCE_TOPIC || CATALOG::PRODUCE_TOPIC || SCHEMA::PRODUCE_TOPIC || TOPIC::PRODUCE_TOPIC || METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || TOPIC::OWNERSHIP", |
There was a problem hiding this comment.
Please use any expression like ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
Please refer to https://github.com/apache/gravitino/pull/7577/files
| @ResponseMetered(name = "alter-topic", absolute = true) | ||
| @AuthorizationExpression( | ||
| expression = | ||
| "METALAKE::PRODUCE_TOPIC || CATALOG::PRODUCE_TOPIC || SCHEMA::PRODUCE_TOPIC || TOPIC::PRODUCE_TOPIC || METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || TOPIC::OWNERSHIP", |
There was a problem hiding this comment.
Please use any expression like ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
Please refer to https://github.com/apache/gravitino/pull/7577/files
| @ResponseMetered(name = "drop-topic", absolute = true) | ||
| @AuthorizationExpression( | ||
| expression = | ||
| "METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || TOPIC::OWNERSHIP", |
There was a problem hiding this comment.
Please use any expression like ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
Please refer to https://github.com/apache/gravitino/pull/7577/files
|
PHAL @jerqi |
### What changes were proposed in this pull request? Support topic authorization. ### Why are the changes needed? Fixes apache#7570 ### Does this PR introduce any user-facing change? No. ### How was this patch tested? `org.apache.gravitino.client.integration.test.authorization.TopicAuthorizationIT` --------- Co-authored-by: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Co-authored-by: 1161623489@qq.com <1161623489@qq.com>
### What changes were proposed in this pull request? Support topic authorization. ### Why are the changes needed? Fixes apache#7570 ### Does this PR introduce any user-facing change? No. ### How was this patch tested? `org.apache.gravitino.client.integration.test.authorization.TopicAuthorizationIT` --------- Co-authored-by: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Co-authored-by: 1161623489@qq.com <1161623489@qq.com>
### What changes were proposed in this pull request? Support topic authorization. ### Why are the changes needed? Fixes apache#7570 ### Does this PR introduce any user-facing change? No. ### How was this patch tested? `org.apache.gravitino.client.integration.test.authorization.TopicAuthorizationIT` --------- Co-authored-by: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Co-authored-by: 1161623489@qq.com <1161623489@qq.com>
### What changes were proposed in this pull request? Support topic authorization. ### Why are the changes needed? Fixes #7570 ### Does this PR introduce any user-facing change? No. ### How was this patch tested? `org.apache.gravitino.client.integration.test.authorization.TopicAuthorizationIT` --------- Co-authored-by: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Co-authored-by: 1161623489@qq.com <1161623489@qq.com>
### What changes were proposed in this pull request? Support topic authorization. ### Why are the changes needed? Fixes apache#7570 ### Does this PR introduce any user-facing change? No. ### How was this patch tested? `org.apache.gravitino.client.integration.test.authorization.TopicAuthorizationIT` --------- Co-authored-by: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Co-authored-by: 1161623489@qq.com <1161623489@qq.com>
What changes were proposed in this pull request?
Support topic authorization.
Why are the changes needed?
Fixes #7570
Does this PR introduce any user-facing change?
No.
How was this patch tested?
org.apache.gravitino.client.integration.test.authorization.TopicAuthorizationIT