OmniaGM commented on code in PR #16522:
URL: https://github.com/apache/kafka/pull/16522#discussion_r1707133524


##########
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/OAuthBearerSaslClientCallbackHandler.java:
##########
@@ -97,7 +97,7 @@ public void close() {
     private void handleCallback(OAuthBearerTokenCallback callback) throws 
IOException {
         if (callback.token() != null)
             throw new IllegalArgumentException("Callback had a token already");
-        Subject subject = Subject.getSubject(AccessController.getContext());
+        Subject subject = SecurityManagerCompatibility.get().current();
         Set<OAuthBearerToken> privateCredentials = subject != null

Review Comment:
   `OAuthBearerSaslClientCallbackHandlerTest::testWithZeroTokens` is failing 
and seems related due to `privateCredentials` being empty when active strategy 
is `LegacyStratagy`



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

Reply via email to