Description
There is no way to remove a user. Taking him out of .auth.yaml does not touch the
.gpg-id files, so he stays a recipient of every secret, and the next time anybody runs
any command the tool reads the .gpg-id files and puts him back into .auth.yaml. The
revocation is silently undone and the diff looks like the tool meant it.
Steps to reproduce
pass_collaborate group add-users alice@example.org it, she is now in .auth.yaml
and in foo/.gpg-id
- edit
.auth.yaml by hand and remove her users: entry and her group membership
- run any command,
pass_collaborate group list is enough
grep alice .auth.yaml
Current behavior
She is back in .auth.yaml, as a users: entry and as a literal key in the access:
of every directory whose .gpg-id still had her fingerprint. A reencrypt then writes
her back into the .gpg-id files.
_load_gpg_id_files() is append only, anything in a .gpg-id gets promoted to
access: and nothing is ever removed, and _load_missing_users_from_keystore()
recreates the users: entry from the local keyring. So .auth.yaml can only grow.
What works today is doing it in this order, .auth.yaml first (the users: entry and
every literal fingerprint in access:), then the .gpg-id files, then reencrypt,
then check with gpg --list-packets that no .gpg is still encrypted to that key.
Cleaning the .gpg-id files without cleaning .auth.yaml first does not work.
Desired behavior
A user remove that cleans .auth.yaml and the .gpg-id files in one shot, or making
the reconciliation subtractive so .auth.yaml is the source of truth and the .gpg-id
files are generated from it. The second one is what i expected the tool to do, but it is
a bigger change.
I can send a PR, tell me which one you prefer. I saw #7 so no rush.
Environment
pass_collaborate: 0.2.2
Python: 3.14.6
Platform: Linux-7.1.5-arch1-2-x86_64-with-glibc2.44
Description
There is no way to remove a user. Taking him out of
.auth.yamldoes not touch the.gpg-idfiles, so he stays a recipient of every secret, and the next time anybody runsany command the tool reads the
.gpg-idfiles and puts him back into.auth.yaml. Therevocation is silently undone and the diff looks like the tool meant it.
Steps to reproduce
pass_collaborate group add-users alice@example.org it, she is now in.auth.yamland in
foo/.gpg-id.auth.yamlby hand and remove herusers:entry and her group membershippass_collaborate group listis enoughgrep alice .auth.yamlCurrent behavior
She is back in
.auth.yaml, as ausers:entry and as a literal key in theaccess:of every directory whose
.gpg-idstill had her fingerprint. Areencryptthen writesher back into the
.gpg-idfiles._load_gpg_id_files()is append only, anything in a.gpg-idgets promoted toaccess:and nothing is ever removed, and_load_missing_users_from_keystore()recreates the
users:entry from the local keyring. So.auth.yamlcan only grow.What works today is doing it in this order,
.auth.yamlfirst (theusers:entry andevery literal fingerprint in
access:), then the.gpg-idfiles, thenreencrypt,then check with
gpg --list-packetsthat no.gpgis still encrypted to that key.Cleaning the
.gpg-idfiles without cleaning.auth.yamlfirst does not work.Desired behavior
A
user removethat cleans.auth.yamland the.gpg-idfiles in one shot, or makingthe reconciliation subtractive so
.auth.yamlis the source of truth and the.gpg-idfiles are generated from it. The second one is what i expected the tool to do, but it is
a bigger change.
I can send a PR, tell me which one you prefer. I saw #7 so no rush.
Environment