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

bug: The secretsmanager list-secrets command filters incorrectly #4820

Closed
1 task done
hairyhenderson opened this issue Oct 30, 2021 · 1 comment
Closed
1 task done
Assignees
Labels
aws:secretsmanager AWS Secrets Manager status: resolved/fixed Resolved via a fix or an implementation type: bug Bug report

Comments

@hairyhenderson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

It seems that filters on the Secrets Manager ListSecrets method is incorrectly interpreted by localstack. A filter like Key=name,Values=/ should mean "any secret where the name starts with /. However, localstack seems to interpret this as "any secret where the name contains /".

Expected Behavior

I get the following behaviour on AWS, and I expect localstack to behave the same way:

$ aws secretsmanager create-secret --name 'testing1/one' --secret-string 'testing1' --query 'Name'
testing1/one
$ aws secretsmanager create-secret --name '/testing2/two' --secret-string 'testing2' --query 'Name'
/testing2/two
$ aws secretsmanager list-secrets --filters Key=name,Values='/' --query 'SecretList[*].Name'
/testing2/two
$ aws secretsmanager list-secrets --filters Key=name,Values='!/' --query 'SecretList[*].Name'
testing1/one

How are you starting LocalStack?

With the localstack script

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

localstack start

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

$ aws --endpoint-url=http://localhost:4566 secretsmanager create-secret --name 'testing1/one' --secret-string 'testing1' --query 'Name'
testing1/one
$ aws --endpoint-url=http://localhost:4566 secretsmanager create-secret --name '/testing2/two' --secret-string 'testing2' --query 'Name'
/testing2/two
$ aws --endpoint-url=http://localhost:4566 secretsmanager list-secrets --filters Key=name,Values='/' --query 'SecretList[*].Name'
testing1/one    /testing2/two
$ aws --endpoint-url=http://localhost:4566 secretsmanager list-secrets --filters Key=name,Values='!/' --query 'SecretList[*].Name'

Environment

- OS: macOS 12.0.1 (Monterey)
- LocalStack: 0.12.19.1

Anything else?

No response

@hairyhenderson hairyhenderson added type: bug Bug report status: triage needed Requires evaluation by maintainers labels Oct 30, 2021
@thrau thrau added the aws:secretsmanager AWS Secrets Manager label Oct 30, 2021
@dominikschubert dominikschubert removed their assignment Sep 2, 2022
@ackdav ackdav added status: confirmed Bug report was confirmed and removed status: triage needed Requires evaluation by maintainers labels Jul 31, 2023
@macnev2013 macnev2013 self-assigned this Mar 22, 2024
@macnev2013
Copy link
Contributor

Hello, we are pleased to inform you that we have implemented changes that should resolve your reported issue. Kindly update to the latest LocalStack container image and let us know if your issue has been resolved. Thank you!

@macnev2013 macnev2013 added status: resolved/fixed Resolved via a fix or an implementation and removed status: confirmed Bug report was confirmed labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:secretsmanager AWS Secrets Manager status: resolved/fixed Resolved via a fix or an implementation type: bug Bug report
Projects
None yet
Development

No branches or pull requests

5 participants