Skip to content

Commit d025f0d

Browse files
authored
docs(redpanda): update sasl authentication option to use scram sha 256 (#3126)
* Update options.go Highlight that the sasl authentication uses scram sha 256 (I spent some time trying to connect with 512 until I realize my mistake) * update docs
1 parent d042367 commit d025f0d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/modules/redpanda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ E.g. `WithSuperusers("superuser-1", "superuser-2")`.
9999
100100
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
101101
102-
The `WithEnableSASL()` option enables SASL scram sha authentication. By default, no authentication (plaintext) is used.
102+
The `WithEnableSASL()` option enables SASL scram sha 256 authentication. By default, no authentication (plaintext) is used.
103103
When setting an authentication method, make sure to add users as well and authorize them using the `WithSuperusers()` option.
104104
105105
#### WithEnableKafkaAuthorization

modules/redpanda/options.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type options struct {
1515
KafkaEnableAuthorization bool
1616

1717
// KafkaAuthenticationMethod is either "none" for plaintext or "sasl"
18-
// for SASL (scram) authentication.
18+
// for SASL (scram sha 256) authentication.
1919
KafkaAuthenticationMethod string
2020

2121
// SchemaRegistryAuthenticationMethod is either "none" for no authentication
@@ -78,6 +78,9 @@ func (o Option) Customize(*testcontainers.GenericContainerRequest) error {
7878
return nil
7979
}
8080

81+
// WithNewServiceAccount includes a new user with username (key) and password (value)
82+
// that shall be created, so that you can use these to authenticate against
83+
// Redpanda (either for the Kafka API or Schema Registry HTTP access).
8184
func WithNewServiceAccount(username, password string) Option {
8285
return func(o *options) {
8386
o.ServiceAccounts[username] = password
@@ -92,7 +95,7 @@ func WithSuperusers(superusers ...string) Option {
9295
}
9396
}
9497

95-
// WithEnableSASL enables SASL scram sha authentication.
98+
// WithEnableSASL enables SASL scram sha 256 authentication.
9699
// By default, no authentication (plaintext) is used.
97100
// When setting an authentication method, make sure to add users
98101
// as well as authorize them using the WithSuperusers() option.

0 commit comments

Comments
 (0)