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

feat: use GetByIDS for secret fetching #17

Merged
merged 1 commit into from
Aug 20, 2024
Merged

feat: use GetByIDS for secret fetching #17

merged 1 commit into from
Aug 20, 2024

Conversation

tangowithfoxtrot
Copy link
Contributor

Problem Statement

Using the Secrets().Get() method makes individual requests to the Bitwarden API for each secret. This increases load on the server and makes it more likely that rate-limiting occurs.

Related Issue

Fixes #...

Proposed Changes

Use the Secrets.GetByIDS() method, which accepts multiple secret IDs and can return the secret data for multiple secrets with a single API request, and therefore reduce the potential for rate-limiting for the Bitwarden server.

This implementation adds a secrets-by-ids endpoint to avoid introducing any breaking changes to the operator. Ideally, using Secrets().GetByIDS() could become the default for the /rest/api/1/secrets or /rest/api/1/secret endpoint, but this would likely break the current usage of the operator.

Checklist

  • I have read the contribution guidelines
  • All commits are signed with git commit --signoff
  • My changes have reasonable test coverage
  • All tests pass with make test
  • I ensured my PR is ready for review with make reviewable

Signed-off-by: tangowithfoxtrot <[email protected]>
@tangowithfoxtrot tangowithfoxtrot changed the title feat: add get-by-ids endpoint feat: use GetByIDS for secret fetching Aug 20, 2024
Copy link
Collaborator

@Skarlso Skarlso left a comment

Choose a reason for hiding this comment

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

Nice! Thanks!

@Skarlso Skarlso merged commit 4abbe86 into external-secrets:main Aug 20, 2024
3 of 4 checks passed
@tangowithfoxtrot tangowithfoxtrot deleted the add-get-by-ids-endpoint branch August 20, 2024 10:12
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.

2 participants