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

Cannot honor AWS_PROFILE env var #273

Open
gfzabarino opened this issue Jul 19, 2022 · 2 comments
Open

Cannot honor AWS_PROFILE env var #273

gfzabarino opened this issue Jul 19, 2022 · 2 comments

Comments

@gfzabarino
Copy link

gfzabarino commented Jul 19, 2022

Hello, first of all, thanks for providing this great tool!

I was trying to find a way to not to have to enter credentials for the KMSConfig, and it seems that if I don't enter the credentials key, the default local access/secret are applied. I wanted to do that so my team doesn't mistakenly push credentials to the project repository, since the idea was to version control config.json.

Having the default local value applied to access/secret makes it impossible for aws-sdk to pick the credentials from the local aws-cli configuration (i.e. ~/.aws) when about to consume the KMS service. If the tool wouldn't apply those values, a standard env var such as AWS_PROFILE could be honored.

Maybe cognito-local could allow one extra config in KMSConfig, probably "omitDefaultCredentials": true/false or similar naming, and then don't apply those defaults if that's true?

@jagregory
Copy link
Owner

Hey @gfzabarino, I don't personally use this bit of functionality but I think the intent was for it to be combined with a local KMS emulator so committing credentials wouldn't be a problem.

Just so I understand how your use case: you have cognito-local with local lambda functions but want to use the real KMS service to encrypt/decrypt the code?

@gfzabarino
Copy link
Author

gfzabarino commented Aug 2, 2022

Just so I understand how your use case: you have cognito-local with local lambda functions but want to use the real KMS service to encrypt/decrypt the code?

hey @jagregory, that’s exactly what I’m doing, we have a dev kms that seems to be easier to get via aws vs setting up a local KMS emulator.

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