-
Notifications
You must be signed in to change notification settings - Fork 462
Fluss support ACL authotization #588
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
Conversation
|
@wuchong , CC |
7767d13 to
ca714de
Compare
ca714de to
c05bca0
Compare
wuchong
left a 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.
- Let's add
FlinkAuthorizationITCasefor general read/write/create/drop operations on the tables. - We can remove IDEMPOTENT_WRITE operation type in this PR, to just not check permission for it, and supports authorization for it in the next PR #756
- I created #757 to update the implementation of ServerMetadataCache instead of relying on
notifyLeaderRPC
fluss-client/src/main/java/com/alibaba/fluss/client/admin/DeleteAclsResult.java
Show resolved
Hide resolved
fluss-client/src/main/java/com/alibaba/fluss/client/admin/DeleteAclsResult.java
Outdated
Show resolved
Hide resolved
fluss-client/src/main/java/com/alibaba/fluss/client/admin/DeleteAclsResult.java
Outdated
Show resolved
Hide resolved
fluss-client/src/main/java/com/alibaba/fluss/client/admin/CreateAclsResult.java
Outdated
Show resolved
Hide resolved
fluss-client/src/main/java/com/alibaba/fluss/client/admin/DeleteAclsResult.java
Outdated
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/CoordinatorServer.java
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/tablet/TabletServer.java
Show resolved
Hide resolved
| if (authorizer != null) { | ||
| authorizer.authorize( | ||
| currentSession(), | ||
| OperationType.CREATE, |
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.
For partitions, I think we should use WRITE permission under the table. That means if a user has the write permission of a table, then he can create partitions. Otherwise, he has to apply CREATE/DROP permission which is very hard to use. Partition is just an internal data distribution.
Add IT case for this in FlinkAuthorizationITCase
fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/CoordinatorService.java
Outdated
Show resolved
Hide resolved
| public CompletableFuture<FetchLogResponse> fetchLog(FetchLogRequest request) { | ||
| CompletableFuture<FetchLogResponse> response = new CompletableFuture<>(); | ||
| Map<TableBucket, FetchData> fetchLogData = getFetchLogData(request); | ||
| for (TableBucket tableBucket : fetchLogData.keySet()) { |
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.
deduplicate table id?
…luster to database
eaca8a1 to
4a13fd0
Compare
…lient when reading.
9151836 to
af35430
Compare
af35430 to
4dedc9e
Compare
wuchong
left a 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.
Looks good to me in general. I left some minor comments and pushed a commit the address them. Please take a look at that changes.
fluss-client/src/main/java/com/alibaba/fluss/client/table/scanner/log/LogFetcher.java
Outdated
Show resolved
Hide resolved
...link-common/src/test/java/com/alibaba/fluss/flink/security/acl/FlinkAuthorizationITCase.java
Outdated
Show resolved
Hide resolved
fluss-rpc/src/main/java/com/alibaba/fluss/rpc/entity/FetchLogResultForBucket.java
Outdated
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/authorizer/DefaultAuthorizer.java
Outdated
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/tablet/TabletService.java
Outdated
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/tablet/TabletService.java
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/tablet/TabletService.java
Show resolved
Hide resolved
fluss-server/src/main/java/com/alibaba/fluss/server/utils/ServerRpcMessageUtils.java
Outdated
Show resolved
Hide resolved
fluss-server/src/test/java/com/alibaba/fluss/server/authorizer/DefaultAuthorizerTest.java
Outdated
Show resolved
Hide resolved
LGTM |
Co-authored-by: Jark Wu <[email protected]>
Co-authored-by: Jark Wu <[email protected]>
Co-authored-by: Jark Wu <[email protected]>
Co-authored-by: Jark Wu <[email protected]>
Purpose
Linked issue: close #485
This pr includes three things:
Test