Skip to content

Decrypting with multiple identities #178

@kukovecz

Description

@kukovecz

Hello,

Thanks for this plugin!

My scenario is:

  • I am encrypting a secret with 2 recipients (returned by age-plugin-yubikey --list-all)
  • I would like it to be decryptable by either one of the identities (returned by age-plugin-yubikey --identity)

For this, I am using https://github.com/ryantm/agenix and I realized it does the following:

age --decrypt -i <identity-1> -i <identity-2> FILE

The problem is:
If I have the yubikey with <identity-1> plugged in, it works, but if I have the one with <identity-2> it does not.
Executing the above command manually brings up a popup to choose between skipping the yubikey or inserting it and trying it again, so I got this error:

age: warning: could not read value for age-plugin-yubikey: standard input is not a terminal, and /dev/tty is not available: open /dev/tty: no such device or address
age: error: yubikey plugin: Could not open YubiKey with serial <serial>

If I change the order to (still: yubikey with <identity-2> is plugged in), it works:

age --decrypt -i <identity-2> -i <identity-1> FILE

Could this be handled to make the decryption successful if any of the provided identities are ok? Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-thoughtStatus: There are aspects of this issue that need some thought.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions