aws / aws-msk-iam-auth

Enables developers to use AWS Identity and Access Management (IAM) to connect to their Amazon Managed Streaming for Apache Kafka (Amazon MSK) clusters.
Apache License 2.0
138 stars 65 forks source link

Allow users to pass awsAccessKeyId awsSecretAccessKey. They can spec… #139

Open limithot opened 10 months ago

limithot commented 10 months ago

Issue #, if available:

Description of changes: Allow users to pass awsAccessKeyId awsSecretAccessKey. They can specify awsAccessKeyId=access-key-id awsSecretAccessKey=secret-access-key as an option on the sasl.jaas.config

add AwsBasicCredentialsProvider.java and add MSKCredentialProvider.ProviderBuilder.getAwsBasicCredentialProvider() method to MSKCredentialProvider.java

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sankalpbhatia commented 10 months ago

Hi @limithot, Thanks for the PR. May we know what use case are you trying to solve with this PR? It seems that one of the existing mechanisms (either awsProfileName or the "no jaas config option" mechanism) would work for your use case?

limithot commented 10 months ago

Hi, @sankalpbhatia , We need to use multiple credentials in our application(service). Each of credentials could be applied and switched by user's selection in runtime . And sometimes new credentials could be add. The way of using 'awsProfileName' mechanism could not meet with our requirements.