bharos commented on code in PR #12757: URL: https://github.com/apache/gravitino/pull/12757#discussion_r3907578199
########## design-docs/tag-based-access-control.md: ########## @@ -0,0 +1,441 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +# Design of Tag-Based Access Control in Gravitino + +**Status:** draft for discussion. The [open questions](#open-questions) are deliberately left +undecided in this revision, each presented with its options; decisions will be folded in after +review. + +Discussion: [#12619](https://github.com/apache/gravitino/discussions/12619) + +--- + +## Summary + +An access rule is a `Policy` of type `system_access_control` whose `content` carries an action, a +role condition and a scope. The policy is bound to a tag. Any object carrying that tag becomes +subject to the rule. + +```json +POST /api/metalakes/prod/policies +{ + "name": "analyst_read_certified_finance", + "policyType": "system_access_control", + "enabled": true, + "content": { + "action": "SELECT_TABLE", Review Comment: Do you mean supporting multiple privileges ? Yes, we can do that ``` "content": { "privileges": ["SELECT_TABLE", "MODIFY_TABLE"], "role": { "name": "analyst" } } ``` I can change "action" to "privileges" is that is better or should we keep generic name ? I will update the doc and example based on your preference -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
