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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

step-cli doesn't support gpg-agent #825

Open
weaversam8 opened this issue Jan 10, 2023 · 1 comment
Open

step-cli doesn't support gpg-agent #825

weaversam8 opened this issue Jan 10, 2023 · 1 comment
Labels
enhancement needs triage Waiting for discussion / prioritization by team

Comments

@weaversam8
Copy link

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

When using step CLI's SSH certificate functionality (namely proxycommand) with a non-vanilla SSH agent, like gpg-agent, step CLI fails to read the certificate from the agent, forcing the CLI to request a new certificate every authentication attempt.

Why is this needed?

Some users use gpg-agent instead of the default ssh-agent (usually for smartcard support.)

Potential workaround

I worked around this issue by taking the following approach:

  • Configure my shell to start a vanilla ssh-agent process on launch (or find the existing one) and,
  • Store the socket for that agent in an environment variable different from SSH_AUTH_SOCK (like SSH_AUTH_SOCK_VANILLA)
  • Configure my SSH config to use that environment variable during proxycommand invocation:
    ProxyCommand bash -c "SSH_AUTH_SOCK=$SSH_AUTH_SOCK_VANILLA step ssh proxycommand [...]"
    
  • Configure my SSH config to use that environment variable for the IdentityAgent parameter:
    IdentityAgent $SSH_AUTH_SOCK_VANILLA
    
@weaversam8 weaversam8 added enhancement needs triage Waiting for discussion / prioritization by team labels Jan 10, 2023
@maraino
Copy link
Collaborator

maraino commented Jan 10, 2023

Hi @ weaversam8, AFAIK gpg-agent does not support ssh certificates, there might be some workarounds, but I'm not sure if they work. See https://dev.gnupg.org/T1756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

No branches or pull requests

2 participants