Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Secrets Manager component fails to get secret with fine-grained policy after 1.13. #3516

Closed
rochabr opened this issue Aug 29, 2024 · 1 comment
Assignees
Labels
kind/bug Something isn't working

Comments

@rochabr
Copy link

rochabr commented Aug 29, 2024

In what area(s)?

/area runtime

What version of Dapr?

1.13.0+

Expected Behavior

The AWS Secrets Manager component should work with fine grained authorization policies that allow for reading only a specific secret. This behaviour was present on Dapr 1.12.

Policy example:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "secretsmanager:GetSecretValue",
            "Resource": "<SECRET_ARN>"
        }
    ]
}

Actual Behavior

Starting on Dapr 1.13, the policy above won't work anymore, requiring a "Resource": "*" to function correctly. This removes the fine-grained security control and fails in regression testing.

Steps to Reproduce the Problem

  • On Dapr 1.13+
  • Create an AWS Secrets manager resouce
  • Create a new secret
  • Create a policy with the information above, setting the resource to the secret ARN.
  • Create a new AWS Secrets Manager component in Dapr
  • Try to read the secret
  • See error:
FATA[0000] Fatal error from runtime: process component awssecretmanager error: [INIT_COMPONENT_FAILURE]: initialization error occurred for awssecretmanager (secretstores.aws.secretmanager/v1): [INIT_COMPONENT_FAILURE]: initialization error occurred for awssecretmanager (secretstores.aws.secretmanager/v1): error validating access to the aws.secretmanager secret store: AccessDeniedException: User: is not authorized to perform: secretsmanager:GetSecretValue on resource:  because no identity-based policy allows the secretsmanager:GetSecretValue action
	status code: 400, request id:  app_id=go-secret instance=diagrid.local scope=dapr.runtime type=log ver=1.14.1
❌  The daprd process exited with error code: exit status 1

Release Note

RELEASE NOTE:

@rochabr rochabr added the kind/bug Something isn't working label Aug 29, 2024
@artursouza artursouza transferred this issue from dapr/dapr Aug 29, 2024
@artursouza artursouza modified the milestone: v1.14 Aug 29, 2024
@elena-kolevska
Copy link
Contributor

This was fixed and backported into the 1.13 and 1.14 release branches. It will be released with the next patch version.
The issue can now be closed.

@rochabr rochabr closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants