The remove flow ran 'sops updatekeys' but never edited .sops.yaml first, so the removed client stayed a recipient on every shared secret — exactly the opposite of what 'remove' should do. Adds the _remove_recipient_from_sops_policy / _revoke_shared_secrets helpers (inverse of the grant-side ones from the previous commit); cmd_client_remove now resolves the pubkey from inventory before deletion and feeds it through that pipeline. Also adds the sudo re-exec pattern so 'homelab client remove' works from a non-root user (matching cmd_secret / cmd_refresh_creds / cmd_client_add). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 KiB
Executable File
28 KiB
Executable File