-
Notifications
You must be signed in to change notification settings - Fork 47
Distinguish between the two ways to enable SASL #1562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Distinguish between the two ways to enable SASL #1562
Conversation
✅ Deploy Preview for redpanda-docs-preview ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis change updates the authentication documentation in Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@modules/manage/partials/authentication.adoc`:
- Around line 548-554: The cross-reference to enable-sasl-authentication is
broken because that anchor isn’t present; fix it by either adding the missing
anchor id "enable-sasl-authentication" immediately above the relevant heading
(so the xref resolves) or update the xref to point to an existing anchor/ID used
in this document (for example the actual heading ID for SASL enablement or the
authentication section); ensure the xref text remains
"enable-sasl-authentication" or change it to the correct existing ID and verify
the xref renders.
2a62d06 to
08de78d
Compare
| === Enable SASL authentication | ||
|
|
||
| To enable authentication in your Redpanda cluster, you have the following options, depending on your requirements for SASL authentication and authorization. | ||
| Redpanda provides two methods for enabling SASL authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Redpanda provides two methods for enabling SASL authentication. | |
| Redpanda provides the following options for enabling SASL authentication: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I try to avoid saying how many options there are because if it changes, then I have to remember to change the number too (over the years, I've seen this come up many times).
| To enable authentication in your Redpanda cluster, you have the following options, depending on your requirements for SASL authentication and authorization. | ||
| Redpanda provides two methods for enabling SASL authentication. | ||
|
|
||
| *Why two methods?* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Why two methods?* |
|
|
||
| *Why two methods?* | ||
|
|
||
| * *Method 1* (`enable_sasl`) is the original approach, maintained for backwards compatibility. It applies SASL globally to all Kafka listeners with a single command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * *Method 1* (`enable_sasl`) is the original approach, maintained for backwards compatibility. It applies SASL globally to all Kafka listeners with a single command. | |
| * *`enable_sasl`* - is the original approach, which is maintained for backwards compatibility. It applies SASL globally to all Kafka listeners with a single command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vuldin
I'm not sure "the original approach" will resonate so much with users. Original from when? Is there any other distinguishing quality other than it is an "original approach"? Legacy approach?
| *Why two methods?* | ||
|
|
||
| * *Method 1* (`enable_sasl`) is the original approach, maintained for backwards compatibility. It applies SASL globally to all Kafka listeners with a single command. | ||
| * *Method 2* (per-listener configuration) is the newer, more flexible approach that allows you to configure different authentication methods on different listeners. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * *Method 2* (per-listener configuration) is the newer, more flexible approach that allows you to configure different authentication methods on different listeners. | |
| * *per-listener configuration* - A more flexible approach that allows you to configure different authentication methods on different listeners. |
| * *Method 1* (`enable_sasl`) is the original approach, maintained for backwards compatibility. It applies SASL globally to all Kafka listeners with a single command. | ||
| * *Method 2* (per-listener configuration) is the newer, more flexible approach that allows you to configure different authentication methods on different listeners. | ||
|
|
||
| *Which method should I use?* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Which method should I use?* | |
| Use the following criteria to help you select the best option: |
| * **For new clusters:** Use *Method 2* (per-listener configuration). This gives you the flexibility to configure authentication per listener, which is useful for mixed environments where some listeners are internal (no auth required) and others are external (auth required). | ||
| * **For existing clusters using `enable_sasl`:** Continue using *Method 1* if it meets your needs. Only migrate to Method 2 if you need per-listener authentication control. | ||
| * **For uniform authentication:** If you know all your Kafka listeners will use SASL authentication, *Method 1* is simpler and doesn't require a restart. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * **For new clusters:** Use *Method 2* (per-listener configuration). This gives you the flexibility to configure authentication per listener, which is useful for mixed environments where some listeners are internal (no auth required) and others are external (auth required). | |
| * **For existing clusters using `enable_sasl`:** Continue using *Method 1* if it meets your needs. Only migrate to Method 2 if you need per-listener authentication control. | |
| * **For uniform authentication:** If you know all your Kafka listeners will use SASL authentication, *Method 1* is simpler and doesn't require a restart. | |
| [cols="1,1,2",options="header"] | |
| |=== | |
| |Use Case |Use Authentication Method |Explanation | |
| |When creating new clusters | |
| |Use per-listener configuration | |
| |Provides you the flexibility to configure authentication per listener, which is useful for mixed environments where some listeners are internal (no authentication required) and others are external (authentication required). | |
| |When you have existing clusters already using `enable_sasl` | |
| |Use `enable_sasl` | |
| |You can use per-listener configuration if it continues to meet your needs. You only need to migrate to `enable_sasl` if you need per-listener authentication control. | |
| |When you require uniform authentication | |
| |Use `enable_sasl` | |
| |If you know all your Kafka listeners will use SASL authentication, this option is simpler and doesn't require a restart. | |
| |=== |
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| *Do not mix configuration methods* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Do not mix configuration methods* | |
| *Do not mix configuration methods*. |
| + | ||
| NOTE: This command implicitly enables authorization. If you want to disable authorization, you can use the `kafka_enable_authorization` cluster configuration property. | ||
| + | ||
| ==== Method 1: Global authentication (backwards compatible) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ==== Method 1: Global authentication (backwards compatible) | |
| ==== Use `enable_sasl` for Global authentication (backwards compatible) |
| + | ||
| ==== Method 1: Global authentication (backwards compatible) | ||
|
|
||
| This method applies SASL authentication to all Kafka API listeners with a single command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This method applies SASL authentication to all Kafka API listeners with a single command. | |
| Using the `enable_sasl` option applies SASL authentication to all Kafka API listeners with a single command. |
|
|
||
| This method applies SASL authentication to all Kafka API listeners with a single command. | ||
|
|
||
| *When to use:* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *When to use:* | |
| Use this option when: |
| * You prefer simpler configuration | ||
| * You want to avoid a cluster restart | ||
|
|
||
| *Tradeoffs:* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Tradeoffs:* | |
| Trade-offs when using this `enable_sasl`: |
|
|
||
| * ✅ Simple: One command enables authentication on all listeners | ||
| * ✅ No restart required | ||
| * ✅ No `redpanda.yaml` changes needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * ✅ No `redpanda.yaml` changes needed | |
| * ✅ No `redpanda.yaml` changes required |
| * ❌ Cannot configure different authentication methods per listener | ||
| * ❌ All listeners must use the same authentication method | ||
|
|
||
| *Command:* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Command:* | |
| To use this option, run: |
| When using this method, do NOT additionally set `kafka_enable_authorization: true` or add `authentication_method: sasl` to `redpanda.yaml`. The `enable_sasl` setting handles both automatically. | ||
| ==== | ||
|
|
||
| ==== Method 2: Per-listener authentication (recommended for new clusters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ==== Method 2: Per-listener authentication (recommended for new clusters) | |
| ==== Use per-listener authentication (recommended for new clusters) |
|
|
||
| ==== Method 2: Per-listener authentication (recommended for new clusters) | ||
|
|
||
| This method allows you to configure authentication per listener, giving you flexibility to have different authentication methods on different listeners. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This method allows you to configure authentication per listener, giving you flexibility to have different authentication methods on different listeners. | |
| This option allows you to configure authentication per listener, giving you flexibility to have different authentication methods on different listeners. |
|
|
||
| This method allows you to configure authentication per listener, giving you flexibility to have different authentication methods on different listeners. | ||
|
|
||
| *When to use:* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *When to use:* | |
| Use this option when: |
| * You're setting up a new cluster | ||
| * You want explicit control over which listeners have authentication enabled | ||
|
|
||
| *Tradeoffs:* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Tradeoffs:* | |
| Trade-offs when using per listener configuration: |
|
|
||
| * ✅ Flexible: Configure authentication per listener | ||
| * ✅ Explicit: Clear configuration in `redpanda.yaml` for each listener | ||
| * ✅ Can mix authentication methods (some listeners with auth, some without) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * ✅ Can mix authentication methods (some listeners with auth, some without) | |
| * ✅ Can mix authentication methods (some listeners with authentication, some without) |
| * ❌ Requires configuration in `redpanda.yaml` for each listener | ||
| * ❌ Requires cluster restart to apply changes | ||
|
|
||
| *Steps:* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Steps:* | |
| To configure per listener authentication: |
Description
This PR makes it clear there are two ways to enable SASL, explains what they are, when to choose one or the other, and why we even have two ways to begin with (why not just one?), and which is the recommended path for new clusters.
Page previews
https://deploy-preview-1562--redpanda-docs-preview.netlify.app/current/manage/security/authentication/
Checks