Set gpg login attribute as separate argument instead of $IDENTITY#535
Set gpg login attribute as separate argument instead of $IDENTITY#535jbagnara wants to merge 2 commits into
Conversation
|
The disclaimer is prudent, however I think we should not include an explicit step to set a new |
|
Currently the disclaimer recommends that the user set this field to a non-attributable value. I think that the behavior of the script should the consistent with the disclaimer's recommendation. I'd prefer to err on caution and make the script not not use However if we do still want this value to default to export GPG_LOGIN_ATTR=$IDENTITY
gpg --command-fd=0 --pinentry-mode=loopback --edit-card <<EOF
admin
login
$GPG_LOGIN_ATTR
$ADMIN_PIN
quit
EOFWhich is your preference? |
Followup from #529
ISSUE
brief - the README instructs the user to populate a pgp attribute with possible PII without indicating that this field is public.
Suppose a user wants to generate subkeys for pgp encryption/decryption using subkeys and upload those public keys to a public repository. They set up their yubikey by running
export IDENTITY="YubiKey User <yubikey@example.domain>"with their public email so it's easy to look up. This subkey will be different than the keys stored on the yubikey. After initial setup, the$IDENTITYfield is not accessible from the card itself on an unauthorized system.This guide indicates that the user MUST set the login field in order to use subkeys. The problem is that the guide defaults this paramater to use

$IDENTITY, which in this example contains the user's name and email address. This enables anybody with physical access to the card to pull the name and email of the individual. Below is the printout fromgpg --card-statuswith my yubikey connected without any prior authentication through the pgp subsystem. This is using a live debian disk:The "Login data" field is displayed. (I set this to "N/A", but following the guide as it's written, this will display "YubiKey User yubikey@example.domain", or whatever name and email the user filled in.
Unless I am mistaken, with no other context, this pgp parameter is the only PII attribute on the card thats accessible without any authentication. In the case that the key is lost, anyone who finds the key can identify the owner. This is an unneccessary security risk. Please let me know if i'm wrong or my understanding of the expectation of privacy using the pgp subsystem is incorrect.
Changes