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

SecretsManager: list_secrets() now properly splits words when filtering #8469

Merged

Conversation

bblommers
Copy link
Collaborator

Fixes #8421

The documentation states that when filtering by e.g. name or description, the search happens by Prefix match.
When filtering by all (that is, name and description and tags), search approach is:

Breaks the filter value string into words and then searches all attributes for matches.

Until now Moto would split values by spaces (my test -> [my, test]), but AWS uses upper case letters to recognize words (MyTest -> [My, Test]).

Testing this feature showed that filtering by description would also break it into words - it is not a prefix match, as the docs state.

Also introduces proper case insensitivity for the description and all filters.

All new tests are verified against AWS.

@bblommers bblommers added this to the 5.0.26 milestone Jan 5, 2025
@bblommers bblommers marked this pull request as ready for review January 5, 2025 20:08
@bblommers bblommers merged commit e9991da into getmoto:master Jan 5, 2025
50 of 51 checks passed
@bblommers bblommers deleted the secrets-manager/improve-list-filter branch January 5, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SecretsManager List Secrets Filter with Key all deviated from boto3
1 participant