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

fix: Update token.actions.githubusercontent.com thumbprint #355

Merged
merged 2 commits into from
Feb 11, 2022
Merged

fix: Update token.actions.githubusercontent.com thumbprint #355

merged 2 commits into from
Feb 11, 2022

Conversation

GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Jan 12, 2022

The recommendation to hard code this in cloudformation doesn't seem very good. This is going to break every few months when github rotates their cert. Are there any AWS best practices around this. Just updating it in cloudformation and re-deploying isn't going to cut it if your cloudformation file is itself deployed via github actions...

EDIT: GitHub have confirmed the new hash, validating this change - https://github.blog/changelog/2022-01-13-github-actions-update-on-oidc-based-deployments-to-aws/.

@GrahamCampbell GrahamCampbell changed the title Update token.actions.githubusercontent.com thumbprint fix: Update token.actions.githubusercontent.com thumbprint Jan 12, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 12, 2022

refresh

✅ Pull request refreshed

@jakejscott
Copy link

Nice I just ran into this issue myself :)

@jakejscott
Copy link

I get a different thumbprint 6938fd4d98bab03faadb97b34396831e3780aea1 which I just tested and works

@GrahamCampbell
Copy link
Contributor Author

I am unable to replicate that thumbprint. I did test the one I added in this PR, and it is working.

@jamesbrooks94
Copy link

I'm still getting the original thumbprint?!

@GrahamCampbell
Copy link
Contributor Author

It probably is cached. It may take a few hours for the rotation to propagate everywhere, I guess?

@GrahamCampbell
Copy link
Contributor Author

My build jobs were consistently failing against us-east-1 and us-east-2 with the old hash, and consistently passing with the new hash.

@jakejscott
Copy link

@GrahamCampbell How did you work out the Thumbprint?

@GrahamCampbell
Copy link
Contributor Author

It's the sha-1 hash of the cert.

image

@jakejscott
Copy link

@GrahamCampbell Cool thanks!

README.md Outdated Show resolved Hide resolved
Co-authored-by: Richard Clarke <[email protected]>
@GrahamCampbell
Copy link
Contributor Author

Thanks for the feedback, everyone. I have updated the thumbprint.

@IamFlowZ
Copy link

IamFlowZ commented Jan 13, 2022

Any updates from maintainers on getting this merged? My pipelines are broken atm.

@mkamioner
Copy link

mkamioner commented Jan 13, 2022 via email

@IamFlowZ
Copy link

Ope, my bad. Tyty @mkamioner

@GrahamCampbell
Copy link
Contributor Author

@liath
Copy link

liath commented Jan 19, 2022

FWIW, here's a snippet to retrieve the thumbprint:

HOST_NAME="token.actions.githubusercontent.com";
openssl s_client -servername "$HOST_NAME" -showcerts -verify 1 -connect "$HOST_NAME:443" </dev/null 2>/dev/null | \
awk '/-----BEGIN CERTIFICATE-----/  { rec = ""; flag = 1 }; { rec = rec $0 ORS; if (/-----END CERTIFICATE-----/) { out = rec; flag = 0 } } END { print out }' | \
openssl x509 -fingerprint -sha1 -noout -in /dev/stdin | \
cut -d '=' -f 2 | tr -d ':' | tr '[:upper:]' '[:lower:]'

@z0ph
Copy link

z0ph commented Feb 10, 2022

Maybe we should merge ? :)

@paragbhingre
Copy link
Contributor

LGTM

@paragbhingre paragbhingre merged commit f500e44 into aws-actions:master Feb 11, 2022
@GrahamCampbell GrahamCampbell deleted the patch-1 branch February 11, 2022 18:05
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

Successfully merging this pull request may close these issues.

10 participants