Giter Site home page Giter Site logo

Comments (8)

FiloSottile avatar FiloSottile commented on May 20, 2024 5

Yup, same with gpg-agent, seems to be a PCSC limitation. We'll definitely document this. There's also go-piv/piv-go#47 upstream to look into ways to make this better.

The interface is released on SIGHUP, so you can use killall -HUP yubikey-agent.

from yubikey-agent.

ryan-gerstenkorn-sp avatar ryan-gerstenkorn-sp commented on May 20, 2024

FYI, this workaround seems to fix a similar issue when using ykman oath code --single ... as well.

Just so it's searchable here's the error you get when trying this when yubikey-agent is running:

Error: Failed connecting to YubiKey 5 [FIDO+CCID]. Make sure the application have the required permissions.

from yubikey-agent.

FiloSottile avatar FiloSottile commented on May 20, 2024

Interestingly, my YubiKey 5 seems to persist the PIN cache across sessions, and even yubikey-agent restarts (but not unplug-replug cycles, as expected). In this case it would be far more acceptable to just drop the session every time.

I bet using a different applet will still trash the PIN cache, but that's probably ok.

from yubikey-agent.

FiloSottile avatar FiloSottile commented on May 20, 2024

Huh, it might be that PIN caching has always spanned sessions, but on older firmwares getting the serial number requires switching applets, so effectively we were dropping it at every session. Maybe there's an argument for not taking an exclusive lock, and just not reading the serial on older firmwares.

from yubikey-agent.

WhyNotHugo avatar WhyNotHugo commented on May 20, 2024

Hi! I want to use yubikey-agent for a very few SSH keys. Mostly, the ones for sites that don't support ed25519-sk keys.

This issue is a a big pain, especially because I use the yubikey as a FIDO device a lot too as well as for GPG.

I wouldn't mind having to type the PIN each time I use yubikey-agent if that's the price for it to not lock my yubikey the rest of the time.

Is this approach somehow possible? I think it could be a useful solution for some until upstream unblocks this issue.

from yubikey-agent.

smlx avatar smlx commented on May 20, 2024

Wouldn't #44 essentially solve this? launchd also supports socket activation. Here's the launchd config and associated socket activation code I use in piv-agent. It's only lightly tested on macOS since I don't use that OS regularly, but it does work:
https://github.com/smlx/piv-agent/blob/main/deploy/launchd/com.github.smlx.piv-agent.plist
https://github.com/smlx/piv-agent/blob/main/internal/sockets/get_darwin.go

from yubikey-agent.

ezekiel avatar ezekiel commented on May 20, 2024

I may not fully understand the context here, but it might be more worthwhile overall to place some efforts on this PR on the upstream piv-go library: go-piv/piv-go#100

This will allow yubikey-agent and piv-agent to Open SHARED access to the key, and avoid blocking other applications which do the same ( like ssh-agent, p11-kit, etc ).

from yubikey-agent.

cedws avatar cedws commented on May 20, 2024

go-piv/piv-go#47 (comment)

Looks like the PR for piv-go is stuck.

Would it make sense to build a broker that could be used by this project and others? Though it would be difficult to get projects to adopt it.

from yubikey-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.