You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add configuration option to require explicit authentication method specification #25184
I searched in the issues and found nothing similar.
Motivation
Currently, when a client connects to a Pulsar broker without specifying an authentication method (via the X-Pulsar-Auth-Method-Name header in HTTP or the auth method field in the Pulsar protocol), the broker attempts to authenticate using all configured authentication providers sequentially until one succeeds or all fail.
While this fallback behaviour provides flexibility, it can create security concerns in deployments where operators want to enforce that clients must explicitly specify which authentication method they're using. This explicit requirement helps prevent:
Unintended authentication against the wrong provider
Ambiguity about which authentication mechanism was actually used
Potential security issues where fallback behaviour differs from operator expectations
Solution
Add a new broker configuration option strictAuthMethod (default: false) that, when enabled, requires clients to explicitly specify their authentication method. When enabled:
Authentication requests without an explicit method will immediately fail with an "Authentication method missing" error
Clients must specify which authentication provider they intend to use
No fallback to trying multiple providers will occur
This provides operators with better control over authentication behaviour in security-sensitive deployments while maintaining backward compatibility through the default false value.
Alternatives
No, this is an additive feature that doesn't change existing behaviour when disabled.
Thanks @omarkj for the proposal. This was implemented by #25185, which adds the strictAuthMethod broker setting (default false). When it is enabled, a request that does not name an authentication method fails instead of trying each configured provider. It is in 4.2.0 and was also released in 4.0.9 and 4.1.3. If something here is still missing on a currently supported release, please reopen or open a new issue.
Activity
merlimat commentedon Oct 23, 2026
Thanks @omarkj for the proposal. This was implemented by #25185, which adds the
strictAuthMethodbroker setting (defaultfalse). When it is enabled, a request that does not name an authentication method fails instead of trying each configured provider. It is in 4.2.0 and was also released in 4.0.9 and 4.1.3. If something here is still missing on a currently supported release, please reopen or open a new issue.