jerryshao commented on code in PR #3946:
URL: https://github.com/apache/gravitino/pull/3946#discussion_r1671557062


##########
api/src/main/java/com/datastrato/gravitino/Catalog.java:
##########
@@ -88,6 +89,34 @@ enum CloudName {
    */
   String CLOUD_REGION_CODE = "cloud.region-code";
 
+  /**
+   * This variable is used as a key in properties of catalogs to use 
authorization plugin provider
+   * in Gravitino. <br>
+   * You can use your own authorized provider with this configuration The 
object you use may be
+   * unstable, so don't use it unless you know what you're doing.
+   */
+  String AUTHORIZATION_PLUGIN = "authorization-plugin";
+
+  /** Authorization plugin types */
+  enum AuthorizationPluginType {
+    /** Ranger authorization plugin */
+    RANGER("ranger"),
+    /** MySQL authorization plugin */
+    MYSQL("mysql");
+    /** Authorization plugin name */
+    private final String pluginName;
+
+    AuthorizationPluginType(String pluginName) {
+      Preconditions.checkArgument(pluginName != null, "plugin must not be 
null");
+      this.pluginName = pluginName;
+    }
+
+    /** @return The plugin name. */
+    public String getPluginName() {
+      return pluginName;
+    }
+  }

Review Comment:
   Why do we need a `AuthorizationPluginType` here, what is the relationship 
between "type" and "provider"?
   
   Do you mean that "provider" should be one of the type? If users implement 
their own plugin, should users add a type here?



-- 
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]

Reply via email to