sarankk commented on code in PR #201:
URL: https://github.com/apache/cassandra-sidecar/pull/201#discussion_r1982199877


##########
server/src/main/java/org/apache/cassandra/sidecar/acl/authentication/MutualTlsAuthenticationHandler.java:
##########
@@ -54,6 +68,39 @@ public void authenticate(RoutingContext ctx, 
Handler<AsyncResult<User>> handler)
                     .recover(cause -> { // converts any exception to 
unauthorized http exception
                         throw new 
HttpException(HttpResponseStatus.UNAUTHORIZED.code(), cause);
                     })
-                    .andThen(handler);
+                    .andThen(authN-> {
+                        if (authN.failed())
+                        {
+                            handler.handle(Future.failedFuture(new 
HttpException(UNAUTHORIZED.code(), authN.cause())));
+                            return;
+                        }
+
+                        List<String> identities = 
extractIdentities(authN.result());
+
+                        if (identities.isEmpty())
+                        {
+                            handler.handle(Future.failedFuture("Missing client 
identities"));
+                            return;
+                        }

Review Comment:
   Removed this check, since IdentityExtractor throws if identity cant be 
extracted



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to