Kafka: fix "awsiam" auth type name (#3286)

Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
This commit is contained in:
Fabian Martinez 2023-12-22 18:32:16 +01:00 committed by GitHub
parent 02c6b21ec6
commit 1aa44e925c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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