collado-mike commented on code in PR #2697: URL: https://github.com/apache/polaris/pull/2697#discussion_r2389528711
########## regtests/t_spark_sql/src/spark_sql_fine_grained_authz.sh: ########## @@ -0,0 +1,223 @@ +#!/bin/bash + +# +# 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. +# + +SPARK_BEARER_TOKEN="${REGTEST_ROOT_BEARER_TOKEN}" +CATALOG_NAME="spark_sql_fine_grained_catalog" +PRINCIPAL_NAME="fine_grained_user" +PRINCIPAL_ROLE_NAME="fine_grained_principal_role" +CATALOG_ROLE_NAME="fine_grained_catalog_role" + +echo "Creating catalog with fine-grained authorization enabled..." + +# Create catalog with fine-grained authorization feature flag enabled +curl -i -X POST -H "Authorization: Bearer ${SPARK_BEARER_TOKEN}" -H 'Accept: application/json' -H 'Content-Type: application/json' \ Review Comment: I hate to ask, but can we make this _not_ a shell script? I hate the shell script reg tests - the python tests are so much easier to debug ########## polaris-core/src/main/java/org/apache/polaris/core/entity/PolarisPrivilege.java: ########## @@ -155,6 +155,91 @@ public enum PolarisPrivilege { PolarisEntityType.POLICY, PolarisEntitySubType.NULL_SUBTYPE, PolarisEntityType.CATALOG_ROLE), + TABLE_ASSIGN_UUID( Review Comment: Can we add another privilege, like `TABLE_MANAGE_STRUCTURE` or something similar, that is a super privilege for basically everything except `TABLE_ADD_SNAPSHOT` and `TABLE_SET_SNAPSHOT_REF`? A lot of users will want to grant table-management privileges all at once, rather than having to grant `TABLE_SET_PROPERTIES` and `TABLE_REMOVE_PROPERTIES` separately. Similarly, I think `TABLE_ADD_SNAPSHOT` and `TABLE_SET_SNAPSHOT_REF` could fall under a common parent -- 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]
