Commit Graph

31 Commits

Author SHA1 Message Date
Louis Opter
5a6038f742 clan-cli: secrets machines remove: update secrets after removing the key
Quick follow up to PR #2781, this commit does the same kind of logic but
for machines instead of users and groups.

Note that this only affects the `clan secrets machines remove`
sub-command, and that `clan machines delete` still leaves unusable
secrets & vars behind. This can be addressed in a different change.
2025-02-13 03:53:23 +00:00
Louis Opter
e88c8a8f2d clan-cli: do not skip secrets.update_secrets when a group is removed
We need to remove all keys that were in the group from affected secrets.

With this change we now take `group_name` as an argument in
`{add,remove}_member`, which is a little bit more readable than
`group_folder.parent.name`, and helps DRY the code a bit.
2025-02-04 03:13:20 +00:00
Louis Opter
67f26a3abe clan-cli: secrets: commit changes when group members are added or removed 2025-02-04 03:13:20 +00:00
Jörg Thalheim
7466445653 updating groups/machines/users keys now also update vars secrets 2024-12-17 19:24:30 +01:00
DavHau
54b8f5904e vars: allow re-encrypting secrets when recipient keys were added.
When the users of a secret change, when for example a new admin user is added, an error will be thrown when generating vars, prompting the user to pass --fix to re-encrypt the secrets
2024-11-13 18:49:30 +07:00
Jörg Thalheim
659e5b37dd use pathlib everywhere 2024-09-02 18:26:13 +02:00
Jörg Thalheim
15ff74f7c2 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
Jörg Thalheim
e9a266001c enable comprehensions linting rules 2024-09-02 13:35:52 +02:00
Jörg Thalheim
af4b9cc2d5 make all same-module imports relative, the rest absolute
This makes sorting more consitent.
2024-09-02 13:00:19 +02:00
DavHau
ac5d421f84 sops/refactor: lay groundwork for secrets with arbitrary paths 2024-07-24 18:12:19 +07:00
Jörg Thalheim
5b606c035f move FlakeId to flake id
move FlakeId to flake id
2024-07-03 18:28:55 +02:00
a-kenji
533ed97fc1 clan: add dynamic completion for clan secret groups 2024-06-04 13:30:38 +02:00
a-kenji
4e95030e55 clan: clan secrets groups add machine completions 2024-06-04 13:30:11 +02:00
a-kenji
2923051a12 clan: fix help message 2024-06-04 10:28:34 +00:00
DavHau
cf67de2f69 secrets: ensure all added/deleted files get committed 2024-04-24 17:26:32 +07:00
lassulus
7b3d3e20b4 clan-cli secrets: flake_name -> flake_dir 2023-11-05 16:58:48 +01:00
Qubasa
d02acbe04b nix fmt 2023-10-27 19:19:45 +02:00
Qubasa
8482bc79f6 Secrets tests passing. nix fmt doesn't complain 2023-10-27 19:18:45 +02:00
Qubasa
8cc1c2c4bd Fixed cyclic dependencie AND swapped pytest-parallel for pytest-xdist to fix deadlock in tests 2023-10-27 19:18:45 +02:00
Qubasa
2ca54afe7f Added new type FlakeName 2023-10-27 19:18:45 +02:00
Qubasa
32e60f5adc Added flake_name:str argument everywhere, nix fmt doesn't complain anymore 2023-10-27 19:15:40 +02:00
lassulus
6f7109dab6 clan_cli.secrets.groups: update keys if members are added/removed 2023-10-03 16:15:36 +00:00
Jörg Thalheim
10e4db7c19 clan-cli: fix error message 2023-08-30 16:40:42 +02:00
Jörg Thalheim
c5b16124ef add machine subcommand 2023-08-24 16:58:22 +02:00
Jörg Thalheim
1f79a610d4 groups: add more api 2023-08-09 15:30:50 +02:00
Jörg Thalheim
e103a4186c add api for secret groups and decrypting secrets 2023-08-09 15:17:43 +02:00
Jörg Thalheim
5ee620b77b only print names when listing existing users 2023-08-08 19:07:38 +02:00
Jörg Thalheim
504adb4f6d make error message nicer when members are not found 2023-08-08 19:05:32 +02:00
Jörg Thalheim
efa0546da5 sops: make symlinks relative 2023-08-08 17:24:40 +02:00
Jörg Thalheim
0533948085 fix rotating keys with sops 2023-08-08 13:44:15 +02:00
Jörg Thalheim
658c76336f add secrets integration
clan-cli: also depend on age for secrets
2023-08-02 09:19:14 +00:00