-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rotate Linux builder PAT for HRA2 and upgrade runner software #86
Merged
steveej
merged 1 commit into
develop
from
rotate-linux-builder-pat-and-upgrade-runner-software
May 7, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,21 @@ | ||
gh_hra2_pat3: ENC[AES256_GCM,data:UkBtRQgM55xhRdLxk7ltphXYkl+JbQ4DsxxXCI4T2CclsAIty504pQ==,iv:9AQlv13e15/Sg+6WD/J4JBLstFap5bni2/XYYj1uVpE=,tag:CHA7uRqvwHWdx11fRP6SuQ==,type:str] | ||
gh_hra2_pat5: ENC[AES256_GCM,data:m6UB6irVbsOcXzJiwTu/mSSIIr05LN/HleqH2ZOt3/PaURu3doTTEA==,iv:WqNNk/SkJbNcJVfhfxVirGw5VWamZXXt+FZYlHIkUoc=,tag:g2Ap+6pnIGNmG3SW0VVk2w==,type:str] | ||
sops: | ||
kms: [] | ||
gcp_kms: [] | ||
azure_kv: [] | ||
hc_vault: [] | ||
age: | ||
- recipient: age1kxkr407jz77ljrhgsfwfmv2yvqjprc6unvx389xp2f48xj8r0vqq2wew5r | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVYXhtc3d0REVwekdJS1h4 | ||
cnlzOU14cVVRTU9iN2lzTWZCK1dleXpCRmhFCkMyZnloNFcvby9PQkRJS2p1U1B3 | ||
bkJHR0g5aCtUTnRKSHhvcDVIZVJGQzQKLS0tIDNjSFlXY0RGeFRFbktTU2IvVUY4 | ||
YlZ5Q2RvYmpFZDVHbU5BWDZNUlc0YlUKBRDyVNOh3WLHCPnmk3HzexDxtu5jAvsc | ||
PE62iYCawOhKwDb2xbXH+JLZdz4VamyUbA8MsNcPjHGW2qifiiaF6g== | ||
-----END AGE ENCRYPTED FILE----- | ||
lastmodified: "2023-07-21T18:49:10Z" | ||
mac: ENC[AES256_GCM,data:xKGYmbdrEFTpAsu0xA8F9Q63FDQaASelGBNF4qVWMbsG9hG3hoogDwOB22jsCrXgF+b8A26El233hVFoI0LD+iWZtXi/cAgPRsjeVS5XnAsgrnFIKEMe+gJfx0PhUVqKUohN5hM1mC2xwHA4yYu3Wg4C2olfTiPio4au1D7mZLo=,iv:iLAG8UnVYXmYxNk6pR4J222+qaQhuG2vRj7wlOs9kM4=,tag:Oxfn8ps46A1jLB2LgzfE2w==,type:str] | ||
pgp: | ||
- created_at: "2023-07-21T18:48:32Z" | ||
enc: |- | ||
-----BEGIN PGP MESSAGE----- | ||
|
||
wcBMA0SHG/zF3227AQf/dpQdlD/Ag8AIbo+FWhbHzgiZYpYJ4k+R+2ltFyUvFi5s | ||
mwL6DC7uuDB3NPiBfuDFkh0sYoS0n0PinXqezZaZeGncIf4gf5K+wY9Aa2GhIXdo | ||
ldVkamidwU9BDOZIhixiBNIVJztzregjDKpqj0Nc1E8KB3DgJczaWPpZkk4lxi42 | ||
iuDq+rg+qh3z5LYN8yWhTs8XlpXqKokXOJqtqnn62PxtTl66bVCYJwMEUTl7DVey | ||
Xd4rK7JJ5IKUjs4RVM+ueZkNOnNmC40TG9PKhLoUlDsDjwd6qfVtLZWU+rT78qoB | ||
NfcICEqdCij3PrQx33peHPwKq9vGt9D++mxoXU0gQ9JRAdiNso6FigsQLnBZRxSZ | ||
RMSzRYnjCCl3NO0Euze48TNb5gwICGaNuxh74s8R2XTDMK+HUqE5VxvujpsSq+Qp | ||
RR+MrN9Xvg41l2bOZbWLQDoz | ||
=YvPf | ||
-----END PGP MESSAGE----- | ||
fp: 6F7069FE6B96E894E60EC45C6EEFA706CB17E89B | ||
unencrypted_suffix: _unencrypted | ||
version: 3.7.3 | ||
kms: [] | ||
gcp_kms: [] | ||
azure_kv: [] | ||
hc_vault: [] | ||
age: | ||
- recipient: age1kxkr407jz77ljrhgsfwfmv2yvqjprc6unvx389xp2f48xj8r0vqq2wew5r | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjL1lCY1RBcFJNZXVnM3Fo | ||
RkltaWRuaG5XTS85akI1VDQ5N2gxMnBabzNFCjJMbmh2dU5CRzdIUmNyMkJFNUxJ | ||
bVUxNmM1c3RhU3pQTGZiNnUxS1ByblEKLS0tIDRTZUk2VHIwR3RRSjlpdzErSGFH | ||
R09NU2VzZkpZUm92VEpZbTRsTXB6b28KmZg12nSwqdQCJJg4EsVAAe76nYzc8tNG | ||
0t0k4zNHN+Dcd2JF+RjmqdpUAHHxqH9Gwi2tJAcVLavrxnEEhRdzag== | ||
-----END AGE ENCRYPTED FILE----- | ||
lastmodified: "2024-05-03T10:49:03Z" | ||
mac: ENC[AES256_GCM,data:JrtBIQsJTrT95UsLChI3JGRORhuZCMjf96/dmGiLqkZ1oFNOqh4Mr7eJjPX/PUpGntzjkU0GCPeZnqOj69P/AZEkJ7wa79/F/Roy4yd9gy7sYPnxHY6BmNjSV3AzhiGcHdLppr9c90yhUcDGuVB0NKPE9Yc97PqCnnS6rxD9qUo=,iv:5TDvy7KaBIgkKLI5danB+svNlDV6Zs1/VmonXQWSk1U=,tag:Sp7RNb/TJeWq5nadUiL8Ng==,type:str] | ||
pgp: [] | ||
unencrypted_suffix: _unencrypted | ||
version: 3.8.1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this needed? We can always make a new token if we need to.
Don't want to have to set up GPG on my system if I can avoid it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably stating the obvious: it allows decrypting and viewing the secret with the given public key.
did you get an error at some point? if you use the
sops
from withinnix develop
the required binaries to encrypt the keys should be there. i'd prefer having the keys readable on my machine so it'd be good to have this back with the new secret as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't enter a dev shell and there's no docs to tell me how to fix that:
I don't see that the Nix shell sets up GPG anyway though? I would still need to import your public key to be able encrypt with it. It's not like
age
where the public key is just a string. The GPG identifiers are just fingerprints so I won't be able to do anything with that.I get that being able to decrypt is useful for debugging but we really shouldn't need to have access to these tokens beyond doing the job of transferring them GitHub to the builder. That's why I'm questioning the need to retain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, that error is noisy however it won't actually prevent the shell from spawning. despite that it's not a good long-term solution anyway to have that secret decrypted to the filesystem permanently. i'll clean that up in the near-term, i created an issue for tracking that.
sops transparently retrieves publicly available keys automatically so it should've just worked to encrypt the secret towards my public key. in the case of my key lookup by fingerprint works. would you mind giving this a try?
the
sops updatekeys
command requires temporarily decrypting the secrets. maybe in a perfect set up we'd never update and generate new secrets instead and re-deploy all relevant machines. it seems like a leap from here and i'd like to keep the convenience of re-encrypting existing keys until we have the better solution. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThetaSinner PTAL at my comments above. given your changes are already deployed, i'd like to resolve this one way or another to get your PR merged to develop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to update keys would mean that the SSH key of the Linux builder has changed. Given that these tokens expire anyway, I don't see the problem with needing to issue a new PAT if the machine's identity changes. It doesn't seem like a lift to me, it just works and is something to be aware of if the SSH key for the Linux builder changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also that we've added another machine. agreed that it works to create a new PAT. it does make (disaster recovery) deployment slightly slower as i've had issues with new PATs in the past with missing permissions. i think i'm getting clarity that the quick and reliably generation of a minimally scoped PAT is the crux here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I relied on the GH UI to tell me what permissions the new token needed - it shows you what was available to the previous token even though you can't get at the token value. E.g. one of my tokens