- Newest
- Most votes
- Most comments
When you associate a secret with an Amazon MSK cluster for SASL/SCRAM authentication, MSK automatically modifies the resource policy of the secret to ensure it has the necessary permissions to access the secret. This is part of the normal operation when using AWS Secrets Manager for sign-in credentials authentication with MSK.
The modification you're seeing in CloudTrail is Amazon MSK service updating the resource policy to ensure it has the proper access to the secret. MSK specifically needs the secretsmanager:GetSecretValue permission to retrieve the credentials stored in the secret.
The service removes the AWS account root principal and the secretsmanager:DescribeSecret permission because MSK only requires the minimum permissions necessary to function properly, which is retrieving the secret value. This follows the principle of least privilege.
When using Secrets Manager with MSK, the service periodically syncs credential data from the secret to the MSK cluster. This automatic synchronization requires the service to have access to the secret, which is why it modifies the resource policy to ensure it has the necessary permissions.
If you need to maintain additional permissions in the resource policy, you might need to implement a solution that restores your desired policy after MSK makes its changes, but be careful not to remove the permissions that MSK requires to function properly.
Sources
Sign-in credentials authentication with AWS Secrets Manager - Amazon Managed Streaming for Apache Kafka
Resource-based policies - AWS Secrets Manager
Relevant content
- asked 4 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 10 months ago
