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: allow custom secret keys for database credentials retrieval #843

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

massimiliano96
Copy link

Description

This pull request introduces two new parameters:

  • secrets_manager_secret_username
  • secrets_manager_secret_password

These parameters allow users to specify custom keys for retrieving credentials from a secret JSON.

For example, given the following secret:

{
  "custom_username_key": "the database username",
  "custom_password_key": "the database password"
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Massimiliano Riva and others added 4 commits March 11, 2025 11:37

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
self._mock_client.get_secret_value.assert_called_once()
self._mock_func.assert_called_once()
assert self._TEST_USERNAME == self._properties.get("user")
assert self._TEST_PASSWORD == self._properties.get("password")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
assert self._TEST_PASSWORD == self._properties.get("password")
assert self._TEST_PASSWORD == self._properties.get("password")

@karenc-bq
Copy link
Contributor

Thank you for the PR, this is a great suggestion. We will port the changes to other drivers as well.

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.

None yet

3 participants