chia7712 commented on code in PR #23557:
URL: https://github.com/apache/kafka/pull/23557#discussion_r4221254831
##########
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/unsecured/OAuthBearerUnsecuredLoginCallbackHandler.java:
##########
@@ -180,12 +180,21 @@ public void close() {
private void handleTokenCallback(OAuthBearerTokenCallback callback) {
if (callback.token() != null)
throw new IllegalArgumentException("Callback had a token already");
- if (moduleOptions.isEmpty()) {
- log.debug("Token not provided, this login cannot be used to
establish client connections");
+ if (!hasUnsecuredLoginOptions()) {
+ if (moduleOptions.isEmpty()) {
+ log.debug("Token not provided, this login cannot be used to
establish client connections");
+ } else {
+ // INFO (not DEBUG) so a mistyped unsecuredLogin* option isn't
silently ignored; this is the
+ // normal path for ssl.*-only JWKS trust options (KAFKA-21143)
until KAFKA-21221, not a warning.
+ log.info("Token not provided (no {}* options; ignoring options
{}), this login cannot be used to establish client connections",
Review Comment:
`ignoring options` is a bit odd to me since it may be used by other classes,
right?
--
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]