You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/10 05:17:40 UTC

[GitHub] [pulsar] lhotari commented on a diff in pull request #15121: [Authenticate] fix Invalid signature error when use Kerberos Authentication

lhotari commented on code in PR #15121:
URL: https://github.com/apache/pulsar/pull/15121#discussion_r868824262


##########
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()));
+            } catch (IOException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new IOException(e);
+            }

Review Comment:
   I think this exception handling could be omitted. Catching all exceptions isn't really justified in this case.



-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org