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
Add documentation for auth.sasl.bootstrapUser configuration to enable
secure by default cluster deployments with authentication enforced
from the first startup.
Changes:
- Add secure bootstrap section to k-production-deployment.adoc
showing quick example configuration
- Add comprehensive bootstrap superuser section to authentication.adoc
partial with when to use, configuration steps, verification, usage
examples, and security best practices
- Include note about secretRef requirement discovered during testing
Tested on kind cluster with both default and custom bootstrap user
configurations. Verified bootstrap user creation, ACL management, and
new user functionality.
Closes: DOC-242
Copy file name to clipboardExpand all lines: modules/deploy/pages/redpanda/kubernetes/k-production-deployment.adoc
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -545,6 +545,32 @@ auth:
545
545
546
546
See also: xref:manage:kubernetes/security/authentication/k-authentication.adoc[]
547
547
548
+
=== Secure bootstrap
549
+
550
+
To deploy a "secure by default" cluster with authentication enabled from the moment it starts, configure a bootstrap user using `auth.sasl.bootstrapUser`. This creates the initial superuser at cluster formation time, before any client connections are accepted.
551
+
552
+
This approach is recommended for production deployments where you want to ensure authentication is enforced immediately, without a window where the cluster is accessible without credentials.
553
+
554
+
[source,yaml]
555
+
----
556
+
auth:
557
+
sasl:
558
+
enabled: true
559
+
mechanism: "SCRAM-SHA-512"
560
+
secretRef: "sasl-password-secret"
561
+
users: []
562
+
bootstrapUser:
563
+
name: "kubernetes-controller" # Optional, defaults to "kubernetes-controller"
564
+
secretKeyRef:
565
+
name: "bootstrap-user-secret"
566
+
key: "password"
567
+
mechanism: "SCRAM-SHA-256" # Options: SCRAM-SHA-256 or SCRAM-SHA-512
568
+
----
569
+
570
+
The bootstrap user is automatically added to the `superusers` list and can be used to create additional users and configure ACLs after the cluster is deployed.
571
+
572
+
See also: xref:manage:kubernetes/security/authentication/k-authentication.adoc#bootstrap[Bootstrap superuser at cluster formation]
573
+
548
574
=== Resources
549
575
550
576
By default, the resources allocated to Redpanda are for a development environment. In a production cluster, the resources you allocate should be proportionate to your machine type. You should determine and set these values before deploying the cluster.
When deploying a new Redpanda cluster with authentication enabled, you can configure a bootstrap user that is created automatically at cluster formation time. This ensures that your cluster is "secure by default" with authentication enforced from the first startup, without any window where the cluster is accessible without credentials.
404
+
405
+
The `auth.sasl.bootstrapUser` configuration creates an initial superuser before the cluster accepts client connections. This user is automatically added to the `superusers` list and can be used to create additional users and configure ACLs.
406
+
407
+
==== When to use bootstrap user
408
+
409
+
Use the bootstrap user configuration when:
410
+
411
+
- Deploying a new cluster with authentication enabled from the start
412
+
- Automating cluster deployments where manual user creation is not feasible
413
+
- Ensuring security compliance requirements for "secure by default" configuration
414
+
- Following the principle of least privilege by eliminating any unauthenticated access window
415
+
416
+
NOTE: The bootstrap user is only created on the first startup of the cluster. The configuration is ignored on subsequent restarts. To create additional users after the cluster is running, use `rpk security user create` or update the `auth.sasl.users` list.
417
+
418
+
==== Configure bootstrap user
419
+
420
+
. Create a Kubernetes Secret to store the bootstrap user password:
TIP: Generate a strong random password using a tool like `openssl rand -base64 32` or your organization's password management system.
429
+
+
430
+
When using `auth.sasl.secretRef` with an empty `users` list (as shown in the examples below), you must also create the Secret referenced by `secretRef`, even if it contains no user data:
For complete "secure by default" configuration, combine the bootstrap user with xref:deploy:redpanda/manual/production/production-deployment.adoc#configure-a-bootstrap-file[cluster bootstrap configuration] to set `admin_api_require_auth: true` and other security settings at cluster formation time.
576
+
577
+
The operator automatically manages the `RP_BOOTSTRAP_USER` environment variable based on your `auth.sasl.bootstrapUser` configuration. This environment variable is read by Redpanda only on the first startup to create the initial user.
578
+
579
+
[NOTE]
580
+
====
581
+
Security best practices:
582
+
583
+
- Use strong, randomly generated passwords stored in Kubernetes Secrets
584
+
- The bootstrap user has full superuser privileges - use it only for initial setup
585
+
- Create dedicated users with appropriate ACLs for applications
586
+
- Consider rotating the bootstrap user password after initial cluster setup is complete
587
+
- Document the bootstrap user credentials in your organization's secret management system
0 commit comments