Basic Key Management

We assume shared directories have been created as shown in shared_password_directories.md

List keys in the password store:

pass team key list
1D9A D308 ED7A A062 8DE0 1502 F21B AFFE 76D9 88AE ── passt-user2
3F60 5759 2037 90BD 1532 6267 4A18 F7BE 3FCF 8A88 ── passt-manager1 (it's you!)
4BE4 3D05 98FD F9C3 C977 B6A2 7569 483E 0293 F574 ── passt-user1 (it's you!)

Show details about a key:

pass team key show passt-user1
4BE4 3D05 98FD F9C3 C977 B6A2 7569 483E 0293 F574 ── passt-user1 (it's you!)
├── Assigned Roles:
│   └── developer
└── Readable Directories:
    ├── /
    └── my_team/development

You can easily spot keys which are missing from your gpg key store.

 # 1. Create an unknown key. We need to bypass
 # the `pass team role assign` command, because
 # it would not allow us to do so:
echo "0123456789ABCDEF0123456789ABCDEF01234567" >> $PASSWORD_STORE_DIR/.team/role/dummy_role
 # 2. Now list the keys again:
pass team key list
0123 4567 89AB CDEF 0123 4567 89AB CDEF 0123 4567 ── (key is missing)
1D9A D308 ED7A A062 8DE0 1502 F21B AFFE 76D9 88AE ── passt-user2
3F60 5759 2037 90BD 1532 6267 4A18 F7BE 3FCF 8A88 ── passt-manager1 (it's you!)
4BE4 3D05 98FD F9C3 C977 B6A2 7569 483E 0293 F574 ── passt-user1 (it's you!)

(exit 99)

Show details about a missing key

pass team key show 0123456789
0123 4567 89AB CDEF 0123 4567 89AB CDEF 0123 4567 ── (key is missing)
├── Assigned Roles:
│   └── dummy_role
└── Readable Directories: -None-

(exit 84)

Both commands, list and show, will also inform you when keys are past their expiration date or when they are not validated (in the gpg meaning of validation).

Generated from basic_key_management.sh