4 ms·
I saw this (in the article): To get started, you need the following packages: ykpers (library and tools to program Yubikeys) yubico-piv-tool (Yubico P
by chiefalchemist 8y ago
I saw this (in the article):
To get started, you need the following packages:
ykpers (library and tools to program Yubikeys)
yubico-piv-tool (Yubico Personal Identity Verification (PIV) Tool)
pcsc-lite (resource manager for PC/SC)
opensc (set of libraries and utilities to access smart cards)
And the first thing I thought was "sure to be a guaranteed cluster fuck."
Can't there be a better way already? We all know sec is a big deal. Don't we?
- ak217 8y agoYes, I agree Yubico's libraries and tools leave a lot to be desired. A lot of the functionality in these tools is broken, or requires unnecessary extra configuration, or is encumbered with dependencies that are broken. The specific "smartcard" protocol that Yubico uses for this functionality is well-supported by the three major operating systems, though (winscard is a standard library on Windows, PCSC.framework is standard on Mac OS, and libpcsclite is available on Linux by installing pcscd/pcsc-lite). I recently implemented a library (https://github.com/pyauth/exile https://github.com/pyauth/exile) to use Yubikeys to sign AWS API requests, which required writing a Python ctypes API to talk to these libraries. It turned out to be fairly easy once I threw away the idea that I should rely on any of the libraries you listed, and just started talking via the winscard/PCSC protocol directly. If anyone wants to write something similar for this application, the ctypes bindings are in https://github.com/pyauth/exile/tree/master/exile/scard https://github.com/pyauth/exile/tree/master/exile/scard, and https://github.com/pyauth/exile/blob/master/exile/ykoath https://github.com/pyauth/exile/blob/master/exile/ykoath contains an example of how to use them.