-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(api): list secrets filter by metadata #3060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good.
One small thought process was I felt OR
would be more appropriate than AND
when multiple combo of key=key1,value=value1:key=key2,value=value2
I felt in above [ key1 and value1 ] or [ key2 and value2 ]
than [ key1 and value1 ] and [ key2 and value2 ]
. But it may be subjective.
Description 📣
This PR adds support for filtering secrets by their metadata. If multiple metadata fields are passed in, the operation will work as an
AND
operator, which means the secrets returned will match all the metadata fields.The format for the
secretMetadata
query parameter iskey1:value1,key2:value2
.The metadata filter is limited to max 10 metadata key-value pairs. This is to avoid overloading the backend, and to avoid bad actors passing into a list with millions of key-value pairs, which could result in a DoS attack.
Type ✨