jerqi commented on code in PR #9788:
URL: https://github.com/apache/gravitino/pull/9788#discussion_r2730018649
##########
server-common/src/main/java/org/apache/gravitino/server/authentication/OAuthConfig.java:
##########
@@ -144,4 +144,26 @@ public interface OAuthConfig {
.version(ConfigConstants.VERSION_1_0_0)
.stringConf()
.createWithDefault("org.apache.gravitino.server.authentication.StaticSignKeyValidator");
+
+ ConfigEntry<String> PRINCIPAL_MAPPER_TYPE =
+ new ConfigBuilder(OAUTH_CONFIG_PREFIX + "principalMapperType")
+ .doc(
+ "Type of principal mapper to use for OAuth/JWT principals. "
+ + "Built-in value: 'regex' (uses regex pattern to extract
username). "
+ + "Default pattern '^(.*)$' keeps the principal unchanged. "
+ + "Can also be a fully qualified class name implementing
PrincipalMapper for custom logic.")
+ .version(ConfigConstants.VERSION_1_2_0)
+ .stringConf()
+ .createWithDefault("regex");
+
+ ConfigEntry<String> PRINCIPAL_MAPPER_REGEX_PATTERN =
+ new ConfigBuilder(OAUTH_CONFIG_PREFIX + "principalMapper.regex.pattern")
Review Comment:
`principalMapper.regex.pattern` -> `principalMapperRegexPattern`?
--
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]