eolivelli commented on a change in pull request #11794: URL: https://github.com/apache/pulsar/pull/11794#discussion_r697155651
########## File path: conf/standalone.conf ########## @@ -462,7 +468,7 @@ tokenSecretKey= # The key can be specified like: # tokenPublicKey=data:;base64,xxxxxxxxx # tokenPublicKey=file:///my/public.key ( Note: key file must be DER-encoded ) -tokenPublicKey= +tokenPublicKey=file:///Users/dkMatHau/pulsar/oauth0.key Review comment: Please revert this line ########## File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java ########## @@ -125,15 +146,31 @@ public void initialize(ServiceConfiguration config) throws IOException, IllegalA this.confTokenPublicAlgSettingName = prefix + CONF_TOKEN_PUBLIC_ALG; this.confTokenAudienceClaimSettingName = prefix + CONF_TOKEN_AUDIENCE_CLAIM; this.confTokenAudienceSettingName = prefix + CONF_TOKEN_AUDIENCE; + this.confIsJwkEnabledSettingName = prefix + CONF_JWK_ENABLED; + this.confJWkUrlSettingName = prefix + CONF_JWK_URL; + // we need to fetch the algorithm before we fetch the key this.publicKeyAlg = getPublicKeyAlgType(config); this.validationKey = getValidationKey(config); this.roleClaim = getTokenRoleClaim(config); this.audienceClaim = getTokenAudienceClaim(config); this.audience = getTokenAudience(config); + this.confIsJwkEnabled = getIsJwkEnabled(config); + this.jwkUrl = getJwkUrl(config); + + if(this.confIsJwkEnabled){ + try { + this.provider = new UrlJwkProvider(new URL(this.jwkUrl)); + } catch (MalformedURLException e){ + e.printStackTrace(); Review comment: Use Logger please -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org