MathiasHaudgaard commented on a change in pull request #11794: URL: https://github.com/apache/pulsar/pull/11794#discussion_r697194480
########## 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: I just removed e.printStackTrace() since I can see that you never really use LOG.error. The user will be informed of the malformed url from the exception 😄 -- 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