[go: up one dir, main page]

Skip to content

Add Support for .gpg-id Files in Subfolders

If I got the code right prs only makes use of the .gpd-id file at the root directory of the password store.

The original pass implementation by zx2c4 allows to set different keys for sub folders by putting additional .gpg-id files there.

- .password-store/
     .gpg-id (key a, key b)
     subdir1/
       subsubdir1/
         secret-a (encrypted for key a + b)
       subsubdir2/
         .gpg-id (key c)
         secret-b (encrypted for key c)
       secret-c (encrypted for key a + b)
     subdir2/
       subsbudir1/
         secret-d (encrypted for key b, key c)
       .gpg-id (key b, key c)
       secret-e (encrypted for key b, key c)
     subdir3
       subsubdir1/
         secret-f (encrypted for key a, key b)
       secret-g (encrytped for key a, key b)

My use case is a folder for critical secrets that uses a hardware backed key where other directories also use a local key(s). Another use case would be password sharing with different users per sub folder.

Maybe add a notice that this is currently not supported by prs. I guess in my case prs would have re-encrypted the critical secrets for the weak keys.