BUG: `pass team role assign <role> <subj>` should fail if `<subj>` is not unambiguous
Summary
It is convenient to use the name or email address to assign subjects to a role via pass team role assign myrole alice
.
When using e.g. the name of a subject it is possible that multiple keys in the store match. Currently, the first match is used and all others are silently being ignored.
Expected Behavior
Fail with appropriate error when the key cannot be determined unambiguously.
Actual Behavior
Choose the first matching key and silently ignore all others.
Steps to Reproduce the Problem
- Add two keys to your gpg keystore with uids
alice@home.com
andalice@work.com
. - Add alice to a role with
pass team role assign employees alice
- Check which key has been used with
pass team role show employee
.
Specifications
- Pass Team Version: 0.1.0
- Installation Method: any
- Platform: any
Possible fixes
Refactor get_fingerprint to fail when there are multiple matches.