You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/03/26 07:39:19 UTC

[GitHub] [pulsar] cckellogg commented on a change in pull request #6428: [Issue 5720][authorization provider] (WIP) Add more granularity

cckellogg commented on a change in pull request #6428: [Issue 5720][authorization provider] (WIP) Add more granularity
URL: https://github.com/apache/pulsar/pull/6428#discussion_r398367362
 
 

 ##########
 File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/NamespaceOperation.java
 ##########
 @@ -0,0 +1,83 @@
+/**
+ * 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.
+ */
+
+package org.apache.pulsar.common.policies.data;
+
+/**
+ * Namespace authorization operations.
+ */
+public enum NamespaceOperation {
 
 Review comment:
   I think we can simply these actions. I don't understand why an action is needed for every rest endpoint. For example, you can either update a namespace or not. You can either read a namespace or not. Why do you need fine grained control for updating/reading each field in a namespace? A simple Write permission can be applied to any action that changes a namespace. 
   
   In my opinion, having an action for every endpoint makes the code very difficult to change and it's hard to maintain. How will you depreciate actions and provide backward compatibility? What happens when you add a new field to a namespace policy? This could break exiting implementations and their permissions or force users to reconfigure authorization rules. 
   
   I see 2 basic actions needed to start for namespaces:
   - Write
   - Read
   
   Same for the most of the other entities. We should start with a small set. These actions will become public api and will be very difficult to change or modify.
   
   I disagree with the layout and operation mapping from PIP-49. 
   
   I agree with @sijie and think we should simplify the verbs and I think pulsar should move more towards a policy/role based system like nomad, consul, vault, and or kubernetes. 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services