diff --git a/bindings/kafka/metadata.yaml b/bindings/kafka/metadata.yaml index cb2d327f0..f493279f9 100644 --- a/bindings/kafka/metadata.yaml +++ b/bindings/kafka/metadata.yaml @@ -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 diff --git a/common/component/kafka/kafka.go b/common/component/kafka/kafka.go index 0d75ab244..ca8fbffa5 100644 --- a/common/component/kafka/kafka.go +++ b/common/component/kafka/kafka.go @@ -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) diff --git a/common/component/kafka/metadata.go b/common/component/kafka/metadata.go index 4858f5c3f..57e5561ca 100644 --- a/common/component/kafka/metadata.go +++ b/common/component/kafka/metadata.go @@ -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: diff --git a/pubsub/kafka/metadata.yaml b/pubsub/kafka/metadata.yaml index ad06bf266..764665633 100644 --- a/pubsub/kafka/metadata.yaml +++ b/pubsub/kafka/metadata.yaml @@ -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