Skip to content

Create guide for GPG agent forwarding [ch15007] #497

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

Merged
merged 7 commits into from
Aug 26, 2021
Merged

Conversation

mterhar
Copy link
Contributor

@mterhar mterhar commented Jul 19, 2021

One of the recent major pushes for government contractors and other software-supply-chain sensitive organizations is to sign all commits to be sure they're coming from the right people and going through the right process to get integrated into the codebase.

Adding GPG injection in the same way as Coder does SSH key management may work for some users but if they're using a smart card or yubikey, GPG forwarding is needed.

Configuration of GPG forwarding is fragile and has a lot of moving pieces so this guide is intended to help users line up those pieces effectively.

ch-15007

Things to be addressed:

  • Pinentry doesn't prompt from remote side.
  • Need to perform a local-side gpg action to unlock the socket
  • Highlight risk of leaving socket open for long
  • Fix SSH forwarding (once GPG is forwarded, the injected SSH agent socket stops working)

SSH workaround, put IdentityFile ~/.ssh/coder into the .ssh/config file... but that's not really the intended use.

@mterhar mterhar marked this pull request as draft July 19, 2021 17:14
@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2021

✨ Coder.com for PR #497 deployed! It will be updated on every commit.

@mterhar mterhar changed the title Create guide for GPG agent forwarding Create guide for GPG agent forwarding [ch15007] Jul 19, 2021
@mterhar
Copy link
Contributor Author

mterhar commented Jul 22, 2021

The fix for pinentry is to add .gnupg/gpg.conf on the remote system which says pinentry-mode loopback

Mike Terhar added 2 commits July 22, 2021 14:43
Also added some troubleshooting. Needs cleanup.
Added security considerations
Added code-server ux issue
@mterhar mterhar marked this pull request as ready for review July 22, 2021 20:18
@mterhar
Copy link
Contributor Author

mterhar commented Jul 22, 2021

Can you take a look at this and clean it up so it'll deploy a preview site?

## Making the connection

On your local device, ensure the gpg-agent is running and that it works when
you attempt to perform a GPG action such as `echo "test" | gpg --clearsign".`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a quote is imbalanced here

@khorne3
Copy link
Contributor

khorne3 commented Jul 22, 2021

@mterhar
Copy link
Contributor Author

mterhar commented Aug 12, 2021

@khorne3 This is validated and I've tested it with my yubikey and made some troubleshooting tips for the next version. I did apparently ruin the linting though :-(

@khorne3 khorne3 merged commit b9ecf19 into main Aug 26, 2021
@khorne3 khorne3 deleted the guide-gpg-forwarding branch August 26, 2021 00:52
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.

3 participants