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

fix: Add secretsmanager:ListSecrets to external-secrets policy #305

Merged
merged 2 commits into from
Nov 9, 2022

Conversation

Stasmo
Copy link
Contributor

@Stasmo Stasmo commented Nov 8, 2022

External secrets uses ListSecrets when searching for secrets by tag.

external-secrets/external-secrets#1443

Description

Add secretsmanager:ListSecrets to external-secrets policy.

Motivation and Context

Allows external secrets controller list all secrets when searching for secrets by tag.

Breaking Changes

No breaking changes.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects

I tested it by manually updating the policy in AWS.

Before updating it:

{"level":"error","ts":1667943642.1480799,"logger":"controllers.ExternalSecret","msg":"could not get secret data from provider","ExternalSecret":"test/linkinbio-api","SecretStore":"test/later-test-store","error":"AccessDeniedException: User: arn:aws:sts::795986403160:assumed-role/ExternalSecretStore20221107234613050800000003/external-secrets-provider-aws is not authorized to perform: secretsmanager:ListSecrets because no identity-based policy allows the secretsmanager:ListSecrets action\n\tstatus code: 400, request id: 31a64aaf-8436-4008-9faf-cd27a56122b2","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227"}

After updating:

{"level":"info","ts":1667943672.3597736,"logger":"controllers.ExternalSecret","msg":"reconciled secret","ExternalSecret":"test/linkinbio-api","SecretStore":"test/later-test-store"}

External secrets uses ListSecrets when searching for secrets by tag.
external-secrets/external-secrets#1443
@Stasmo Stasmo changed the title Add secretsmanager:ListSecrets to external-secrets policy fix: Add secretsmanager:ListSecrets to external-secrets policy Nov 8, 2022
@bryantbiggs bryantbiggs changed the title fix: Add secretsmanager:ListSecrets to external-secrets policy fix: Add secretsmanager:ListSecrets to external-secrets policy Nov 9, 2022
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @Stasmo !

@bryantbiggs bryantbiggs merged commit d3fb017 into terraform-aws-modules:master Nov 9, 2022
antonbabenko pushed a commit that referenced this pull request Nov 9, 2022
### [5.5.7](v5.5.6...v5.5.7) (2022-11-09)

### Bug Fixes

* Add `secretsmanager:ListSecrets` to `external-secrets` policy ([#305](#305)) ([d3fb017](d3fb017))
@antonbabenko
Copy link
Member

This PR is included in version 5.5.7 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants