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 Non-PlainText Secret Format for Container Repository Login #900

Open
Bbuff101 opened this issue Oct 25, 2024 · 4 comments
Open

Support Non-PlainText Secret Format for Container Repository Login #900

Bbuff101 opened this issue Oct 25, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Bbuff101
Copy link

Hello, we are using this library to copy containers from a private container repository (Artifactory) to AWS ECS. We would like to re-use our existing secrets rather than creating something new for this functionality. Specifically, we already have secrets to allow for ECS to authenticate with a private registry based on the following documentation:

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html

This requires that the secret be a JSON object with "username" and "password" properties. Would it be possible to update the library to support reading a secret of this type, object, rather than plain-text?

{ "username" : "privateRegistryUsername", "password" : "privateRegistryPassword" }

@mrgrain mrgrain added enhancement New feature or request help wanted Extra attention is needed labels Oct 25, 2024
@cbentkowski
Copy link

@Bbuff101 Just to clarify, are you only wanting to be able to send a JSON string as credentials or are you wanting JSON support for the SecretsManager Secret?

@Bbuff101
Copy link
Author

@Bbuff101 Just to clarify, are you only wanting to be able to send a JSON string as credentials or are you wanting JSON support for the SecretsManager Secret?

Hi @cbentkowski , I would like to pass a secret name or ARN which contains as a secret value the JSON representation of a username and password, similar to how ECS functions to pull containers from a private registry. I do not want to pass the JSON secret value itself into the CDK resource. Does that help?

@cbentkowski
Copy link

Ok, similar to the ARN credentials that it already accepts, but the return from the ARN will be JSON formatted text. I've got a JSON parser built, but let me work on detecting JSON string formatted credentials from the ARN and see what I can come up with.

@Bbuff101
Copy link
Author

Ok, similar to the ARN credentials that it already accepts, but the return from the ARN will be JSON formatted text. I've got a JSON parser built, but let me work on detecting JSON string formatted credentials from the ARN and see what I can come up with.

Yes, thanks, @cbentkowski ! I did see your PR, so if I can be of any additional help, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants