aws-secrets-manager-rotation-lambdas
aws-secrets-manager-rotation-lambdas copied to clipboard
Postgres Multi User Rotation does not preserve grants
From: https://forums.aws.amazon.com/thread.jspa?threadID=322708
- We create an environment and apply a bunch of grants.
- A rotation occurs. This copies the grants over to the new user that's created.
- We continue to do dev work on the service, granting additional permissions on new tables.
- Another rotation occurs. Since the other user already exists, the lambda doesn't try to copy grants over (e.g. it follows the logic in the else here: https://github.com/aws-samples/aws-secrets-manager-rotation-lambdas/blob/master/SecretsManagerRDSPostgreSQLRotationMultiUser/lambda_function.py#L194)
- At this point, the grants applied as part of #3 aren't there, and we get permission denied errors.
I believe this issue goes much deeper than just the grants from the users, I have noticed it breaking our services due to permission errors for schemas created by user2 and not being to be accessible for user1
Have opened this: https://github.com/aws-samples/aws-secrets-manager-rotation-lambdas/issues/56
We have addressed this issue with updating the documentation on when to use single or Multi User rotation strategy.