-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(codebuild): Secret manager env vars get the wrong arn on grant #12703
Labels
@aws-cdk/aws-codebuild
Related to AWS CodeBuild
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Comments
JFox
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jan 26, 2021
skinny85
added
effort/medium
Medium work item – several days of effort
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Jan 26, 2021
2 tasks
skinny85
added a commit
to skinny85/aws-cdk
that referenced
this issue
Mar 19, 2021
…riables In the SecretsManager-typed environment variables in CodeBuild, the code in the Project class assumed those would be passed as names. As it turns out, CodeBuild also allows passing there entire ARNs of secrets (both partial, and full), and also optional qualifiers, separated by colons, that specify SecretsManager attributes like the JSON key, or the secret version. Add handling of all of these cases. Fixes aws#12703
mergify bot
pushed a commit
that referenced
this issue
Mar 26, 2021
…riables (#13706) In the SecretsManager-typed environment variables in CodeBuild, the code in the Project class assumed those would be passed as names. As it turns out, CodeBuild also allows passing there entire ARNs of secrets (both partial, and full), and also optional qualifiers, separated by colons, that specify SecretsManager attributes like the JSON key, or the secret version. Add handling of all of these cases. Fixes #12703 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Mar 31, 2021
…riables (aws#13706) In the SecretsManager-typed environment variables in CodeBuild, the code in the Project class assumed those would be passed as names. As it turns out, CodeBuild also allows passing there entire ARNs of secrets (both partial, and full), and also optional qualifiers, separated by colons, that specify SecretsManager attributes like the JSON key, or the secret version. Add handling of all of these cases. Fixes aws#12703 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Aug 26, 2021
…riables (aws#13706) In the SecretsManager-typed environment variables in CodeBuild, the code in the Project class assumed those would be passed as names. As it turns out, CodeBuild also allows passing there entire ARNs of secrets (both partial, and full), and also optional qualifiers, separated by colons, that specify SecretsManager attributes like the JSON key, or the secret version. Add handling of all of these cases. Fixes aws#12703 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-codebuild
Related to AWS CodeBuild
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
When adding environment variables to codebuild Projects, cdk adds the grant read for the secret. However, when adding a secret using the
<secretName>:<secretKey>
format, the generated arn includes thesecretKey
causing the arn to be wrong (aws::secretsmanager:eu-central-1:00000000000:secret:secretName:secretKey-??????
)Reproduction Steps
Create a codebuild Project using a secret env var with the
<secretName>:<secretKey>
formatWhat did you expect to happen?
the arn on the policy not to include the secretKey
What actually happened?
the arn on the policy included the secretKey
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: