Commit Graph

16 Commits

Author SHA1 Message Date
Jörg Thalheim
7392570859 use machine.{secrets,public}_{vars,fact}_store everywhere 2025-04-22 18:20:35 +02:00
Qubasa
ec54a6a978 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
lassulus
91118745de vars: remove intermediate classes 2024-12-10 14:04:31 +01:00
lassulus
3337d7bce6 vars: move ensure_consistent_state into health_check, move into store classes 2024-12-10 11:54:52 +00:00
DavHau
66ce80c096 vars: rename: invalidation -> validation 2024-11-29 17:23:31 +07:00
Jörg Thalheim
45dfbf54db vars: make interface more type-safe 2024-11-26 17:08:26 +01:00
Jörg Thalheim
5bf2afdf0e vars: add VarStatus dataclass to make return type more readable 2024-11-20 10:20:06 +00:00
DavHau
3f62e143ec vars: implement invalidation mechanism
This adds options `invalidationData` to generators.

`invalidationData` can be used by an author of a generator to signal if a re-generation is required after updating the logic.

Whenever a generator with invalidation data is executed, a hash of that data is stored by the respective public and/or secret backends.

The stored hashes will be checked on future deployments, and a re-generation is triggered whenever a hash doesn't match what's defined in nix.
2024-11-20 16:27:22 +07: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
DavHau
6fafafa064 vars/password-store: use standard paths; fix share flag 2024-09-09 21:20:03 +02:00
DavHau
8efcd65bed vars: global metadata paths for all store backends
This also changes the paths where sops stores teh secret -> all sops secrets will have to be re-generated
2024-09-03 16:30:01 +02:00
Jörg Thalheim
357b619068 add SIM lint 2024-09-02 16:39:30 +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
2ec3abb24c vars: improve check command and add tests 2024-09-01 16:45:09 +02:00
DavHau
3447a98bee vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
9ff0045698 WIP: vars: copy python code from facts 2024-07-09 12:42:29 +07:00