Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
xunliu committed Dec 10, 2024
1 parent 16069c6 commit 4cd031e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,40 +142,55 @@ public static String getChainProviderKey() {
AuthorizationPropertiesMetadata.getInstance().wildcardPropertyKey(),
PropertyEntry.wildcardPropertyEntry(
AuthorizationPropertiesMetadata.getInstance().wildcardPropertyKey(),
"The Chain authorization plugins"))
"The Chain authorization plugins",
true,
false))
.put(
CHAIN_CATALOG_PROVIDER,
PropertyEntry.wildcardPropertyEntry(
CHAIN_PROVIDER, "The Chain sub entity catalog provider"))
CHAIN_PROVIDER, "The Chain sub entity catalog provider", true, false))
.put(
CHAIN_PROVIDER,
PropertyEntry.wildcardPropertyEntry(
CHAIN_PROVIDER, "The Chain sub entity authorization plugin provider"))
CHAIN_PROVIDER,
"The Chain sub entity authorization plugin provider",
true,
false))
.put(
CHAIN_RANGER_SERVICE_NAME,
PropertyEntry.wildcardPropertyEntry(
CHAIN_RANGER_SERVICE_NAME,
"The Chain sub entity authorization Ranger service name"))
"The Chain sub entity authorization Ranger service name",
true,
false))
.put(
CHAIN_RANGER_ADMIN_URL,
PropertyEntry.wildcardPropertyEntry(
CHAIN_RANGER_ADMIN_URL,
"The Chain sub entity authorization Ranger admin web URIs"))
"The Chain sub entity authorization Ranger admin web URIs",
true,
false))
.put(
CHAIN_RANGER_AUTH_TYPES,
PropertyEntry.wildcardPropertyEntry(
CHAIN_RANGER_AUTH_TYPES,
"The Chain sub entity authorization Ranger admin web auth type (kerberos/simple)"))
"The Chain sub entity authorization Ranger admin web auth type (kerberos/simple)",
true,
false))
.put(
CHAIN_RANGER_USERNAME,
PropertyEntry.wildcardPropertyEntry(
CHAIN_RANGER_USERNAME,
"The Chain sub entity authorization Ranger admin web login username"))
"The Chain sub entity authorization Ranger admin web login username",
true,
false))
.put(
CHAIN_RANGER_PASSWORD,
PropertyEntry.wildcardPropertyEntry(
CHAIN_RANGER_PASSWORD,
"The Chain sub entity authorization Ranger admin web login password"))
"The Chain sub entity authorization Ranger admin web login password",
true,
false))
.put(
RANGER_SERVICE_NAME,
PropertyEntry.stringOptionalPropertyEntry(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,18 @@ public static PropertyEntry<Boolean> booleanReservedPropertyEntry(
return booleanPropertyEntry(name, description, false, true, defaultValue, hidden, true);
}

public static PropertyEntry<String> wildcardPropertyEntry(String name, String description) {
public static PropertyEntry<String> wildcardPropertyEntry(
String name, String description, boolean immutable, boolean hidden) {
return new Builder<String>()
.withName(name)
.withDescription(description)
.withRequired(false)
.withImmutable(false)
.withImmutable(immutable)
.withJavaType(String.class)
.withDefaultValue(null)
.withDecoder(Function.identity())
.withEncoder(Function.identity())
.withHidden(false)
.withHidden(hidden)
.withReserved(false)
.withWildcard(true)
.build();
Expand Down

0 comments on commit 4cd031e

Please sign in to comment.