eolivelli commented on code in PR #15121:
URL: https://github.com/apache/pulsar/pull/15121#discussion_r868861082
##########
pulsar-broker-auth-sasl/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderSasl.java:
##########
@@ -175,6 +186,24 @@ private String createAuthRoleToken(String role, String
sessionId) {
return signed;
}
+ private byte[] readSecretFromUrl(String secretConfUrl) throws IOException {
+ if (secretConfUrl.startsWith("file:")) {
+ try {
+ return
IOUtils.toByteArray(URL.createURL(secretConfUrl.trim()));
Review Comment:
for JWT token Authentication we use URI and not URL
https://github.com/apache/pulsar/blob/330fcb9787d9f822667f0617b22bcae66b4644e5/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationToken.java#L81
I don't know the exact difference but I believe it is better to do the same
way
##########
pulsar-broker-auth-sasl/src/test/java/org/apache/pulsar/broker/authentication/ProxySaslAuthenticationTest.java:
##########
@@ -182,6 +183,10 @@ protected void setup() throws Exception {
conf.setAuthenticationEnabled(true);
conf.setSaslJaasClientAllowedIds(".*" + localHostname + ".*");
conf.setSaslJaasServerSectionName("PulsarBroker");
+ File secretKeyFile =
File.createTempFile("saslRoleTokenSignerSecret", ".key");
+ secretKeyFile.deleteOnExit();
Review Comment:
please do not use deleteOnExit but delete this file in the After/Teardown
method or in a finally block
--
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]