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

CredentialProvider fails with Default .env vars #1367

Open
nuggie opened this issue Jan 30, 2023 · 0 comments
Open

CredentialProvider fails with Default .env vars #1367

nuggie opened this issue Jan 30, 2023 · 0 comments

Comments

@nuggie
Copy link

nuggie commented Jan 30, 2023

Hi.

For our local development we define AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
On AWS we use the ContainerCredentials to define permissions.
To not forget it in local development we preset the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as empty variables in our default .env.

After deploying our application to AWS we found out that for accessing SQS via Symfony Messenger the ContainerCredentials are not taken into account.

I think the issue is this type safe null check in the CredentialProvider Class, because $accessKeyId and $secretAccessKeyId are of type "string(0)" when set to empty in the environment.

if (null === $accessKeyId || null === $secretAccessKeyId) {
return null;
}

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

1 participant