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

Support secrets other than in json format #2

Open
techgaun opened this issue May 21, 2023 · 1 comment
Open

Support secrets other than in json format #2

techgaun opened this issue May 21, 2023 · 1 comment

Comments

@techgaun
Copy link

techgaun commented May 21, 2023

AWS secrets manager does not mandate JSON or key-value pair value for the secrets value (although recommended). However, in the implementation, there's explicit json decoding at https://github.com/gordalina/hush_aws_secrets_manager/blob/a76776d/lib/provider.ex#L33

This causes issues with cases where one would like to store non-json values such as plaintext string or TOML, etc. Is it possible to remove that or support passing a custom function to execute for parsing/decoding instead?

A better approach might be to just retrieve the data in provider and not handle the data format at all. The transformers then can be implemented to handle the data accordingly.

@gordalina
Copy link
Owner

JSON decoding should definitely be removed from the provider and used as a transformer. Feel free to submit a PR! If not I'll work on this in a couple of weeks.

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

No branches or pull requests

2 participants