Kafka: fix "awsiam" auth type name (#3286)
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
This commit is contained in:
parent
02c6b21ec6
commit
1aa44e925c
|
@ -147,10 +147,10 @@ authenticationProfiles:
|
|||
required: true
|
||||
description: |
|
||||
Authentication type.
|
||||
This must be set to "awsIAM" for this authentication profile.
|
||||
example: '"awsIAM"'
|
||||
This must be set to "awsiam" for this authentication profile.
|
||||
example: '"awsiam"'
|
||||
allowedValues:
|
||||
- "awsIAM"
|
||||
- "awsiam"
|
||||
- name: awsRegion
|
||||
type: string
|
||||
required: true
|
||||
|
|
|
@ -15,6 +15,7 @@ package kafka
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -91,7 +92,7 @@ func (k *Kafka) Init(ctx context.Context, metadata map[string]string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
switch k.authType {
|
||||
switch strings.ToLower(k.authType) {
|
||||
case oidcAuthType:
|
||||
k.logger.Info("Configuring SASL OAuth2/OIDC authentication")
|
||||
err = updateOidcAuthInfo(config, meta)
|
||||
|
|
|
@ -230,7 +230,7 @@ func (k *Kafka) getKafkaMetadata(meta map[string]string) (*KafkaMetadata, error)
|
|||
k.logger.Debug("Configuring root certificate authentication.")
|
||||
case awsIAMAuthType:
|
||||
if m.AWSRegion == "" {
|
||||
return nil, errors.New("missing AWS region property 'awsRegion' for authType 'awsIAM'")
|
||||
return nil, errors.New("missing AWS region property 'awsRegion' for authType 'awsiam'")
|
||||
}
|
||||
k.logger.Debug("Configuring AWS IAM authentication.")
|
||||
default:
|
||||
|
|
|
@ -141,10 +141,10 @@ authenticationProfiles:
|
|||
required: true
|
||||
description: |
|
||||
Authentication type.
|
||||
This must be set to "awsIAM" for this authentication profile.
|
||||
example: '"awsIAM"'
|
||||
This must be set to "awsiam" for this authentication profile.
|
||||
example: '"awsiam"'
|
||||
allowedValues:
|
||||
- "awsIAM"
|
||||
- "awsiam"
|
||||
- name: awsRegion
|
||||
type: string
|
||||
required: true
|
||||
|
|
Loading…
Reference in New Issue