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

Cleanup secret name before use #59

Merged
merged 1 commit into from
Mar 2, 2023
Merged

Conversation

carolynvs
Copy link
Member

@carolynvs carolynvs commented Feb 27, 2023

Azure Key Vault only allows a limited set of characters in secret names, alphanumeric with hyphens. I have updated the plugin to replace any invalid characters with a hyphen before storing or retrieving. I've also added more logging so that we can track down when the value was cleaned and what the originally requested key was.

Fixes #51

Azure Key Vault only allows a limited set of characters in secret names, alphanumeric with hyphens with 127 characters max. I have updated the plugin to replace any invalid characters with a hyphen before storing or retrieving. When too long, I keep as much of the key as possible and then append the md5 sum of the original key to the end.

I've also added more logging so that we can track down when the value was cleaned and what the originally requested key was.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Copy link
Contributor

@anatbal anatbal left a comment

Choose a reason for hiding this comment

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

Looks really good! I have tested it on our environment where the problem used to reproduce and it seems that with this change the plugins now support snake case. Thank you so much!

@carolynvs carolynvs merged commit 0e6527f into getporter:main Mar 2, 2023
@carolynvs carolynvs deleted the snakes branch March 2, 2023 14:51
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.

Sensitive snake_case porter parameters fails to deploy when using azure.keyvault plugin
3 participants