You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "harmadasg (via GitHub)" <gi...@apache.org> on 2026/10/29 15:20:31 UTC
[PR] Require expected issuer and audience for the SASL/OAUTHBEARER broker validator [kafka]
harmadasg opened a new pull request, #24017:
URL: https://github.com/apache/kafka/pull/24017
When a JWKS endpoint is configured, the broker's SASL/OAUTHBEARER validator now requires both sasl.oauthbearer.expected.issuer and sasl.oauthbearer.expected.audience to be set, and the broker fails fast at startup otherwise, so the issuer and audience of incoming tokens are verified by default.
Operators that intentionally do not restrict the issuer or audience can opt out via sasl.oauthbearer.allow.unverified.issuer=true and/or sasl.oauthbearer.allow.unverified.audience=true; a startup warning is logged when an opt-out is enabled.
- Add sasl.oauthbearer.allow.unverified.issuer and sasl.oauthbearer.allow.unverified.audience (boolean, default false) to both the client and broker config definitions.
- Raise the importance of sasl.oauthbearer.expected.issuer and sasl.oauthbearer.expected.audience to HIGH.
- BrokerJwtValidator fails fast when an expected value is missing without the matching opt-out, and skips jose4j's default audience validation when the audience opt-out is enabled.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Require expected issuer and audience for the SASL/OAUTHBEARER broker validator [kafka]
Posted by "omkreddy (via GitHub)" <gi...@apache.org>.
omkreddy commented on code in PR #24017:
URL: https://github.com/apache/kafka/pull/24017#discussion_r4415025892
##########
docs/getting-started/upgrade.md:
##########
@@ -58,6 +58,12 @@ If you are upgrading from version 2.4.0 or above, and you have not overridden th
+### Notable changes in 3.9.3
+
+ * The broker-side OAUTHBEARER JWT validator now fails fast at startup when a JWKS endpoint (`sasl.oauthbearer.jwks.endpoint.url`) is configured but `sasl.oauthbearer.expected.audience` or `sasl.oauthbearer.expected.issuer` is not set. Brokers that previously started without these settings will now fail to start until they are configured. To intentionally accept tokens regardless of their audience or issuer, set the new `sasl.oauthbearer.allow.unverified.audience` or `sasl.oauthbearer.allow.unverified.issuer` configs (both default `false`) to `true`.
Review Comment:
I think we can skip this CVE, as this is a hardening fix starting from 4.4 onwards.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Require expected issuer and audience for the SASL/OAUTHBEARER broker validator [kafka]
Posted by "harmadasg (via GitHub)" <gi...@apache.org>.
harmadasg commented on code in PR #24017:
URL: https://github.com/apache/kafka/pull/24017#discussion_r4415503687
##########
docs/getting-started/upgrade.md:
##########
@@ -58,6 +58,12 @@ If you are upgrading from version 2.4.0 or above, and you have not overridden th
+### Notable changes in 3.9.3
+
+ * The broker-side OAUTHBEARER JWT validator now fails fast at startup when a JWKS endpoint (`sasl.oauthbearer.jwks.endpoint.url`) is configured but `sasl.oauthbearer.expected.audience` or `sasl.oauthbearer.expected.issuer` is not set. Brokers that previously started without these settings will now fail to start until they are configured. To intentionally accept tokens regardless of their audience or issuer, set the new `sasl.oauthbearer.allow.unverified.audience` or `sasl.oauthbearer.allow.unverified.issuer` configs (both default `false`) to `true`.
Review Comment:
@omkreddy thanks for the feedback, I will mark this CVE as won't do on 3.9
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Require expected issuer and audience for the SASL/OAUTHBEARER broker validator [kafka]
Posted by "harmadasg (via GitHub)" <gi...@apache.org>.
harmadasg commented on code in PR #24017:
URL: https://github.com/apache/kafka/pull/24017#discussion_r4414302125
##########
docs/getting-started/upgrade.md:
##########
@@ -58,6 +58,12 @@ If you are upgrading from version 2.4.0 or above, and you have not overridden th
+### Notable changes in 3.9.3
+
+ * The broker-side OAUTHBEARER JWT validator now fails fast at startup when a JWKS endpoint (`sasl.oauthbearer.jwks.endpoint.url`) is configured but `sasl.oauthbearer.expected.audience` or `sasl.oauthbearer.expected.issuer` is not set. Brokers that previously started without these settings will now fail to start until they are configured. To intentionally accept tokens regardless of their audience or issuer, set the new `sasl.oauthbearer.allow.unverified.audience` or `sasl.oauthbearer.allow.unverified.issuer` configs (both default `false`) to `true`.
Review Comment:
Not sure about backporting this CVE fix due to the breaking behavior. 3.9.3 is a patch/bugfix release with backward compatible guarantees and also the original [commit](https://github.com/apache/kafka/commit/9c7fad339731199da395d90690fc62efae69615b) was never backported to any releases prior to 4.4
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Require expected issuer and audience for the SASL/OAUTHBEARER broker validator [kafka]
Posted by "harmadasg (via GitHub)" <gi...@apache.org>.
harmadasg closed pull request #24017: Require expected issuer and audience for the SASL/OAUTHBEARER broker validator
URL: https://github.com/apache/kafka/pull/24017
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org