DavHau
ca614af0d4
vars/fix: mention machine in error message for fix
2024-12-19 17:39:02 +07:00
Michael Hoang
34b2b40222
vars: fix running generators on macOS
2024-12-19 00:16:22 +11:00
DavHau
7b3b1018aa
vars: commit files for clan vars set
...
fixes #2601
2024-12-17 15:56:08 +07:00
lassulus
74cec1d102
cli vars generate: quote generate name
2024-12-15 13:23:11 +01:00
lassulus
e0f95a7a16
cli vars generate: mount test_store into bwrap
2024-12-14 17:05:27 +01:00
lassulus
c888f01823
vars: eval finalScript lazy
2024-12-14 13:38:51 +01:00
Qubasa
ec54a6a978
clan-cli: Replace log.info to machine.info if applicable
2024-12-12 15:36:17 +01:00
Jörg Thalheim
7d7e0c0714
fix clan vars for public vars
2024-12-11 16:39:54 +01:00
Jörg Thalheim
85676bc44f
improve error message if sops secret contains unknown key
2024-12-11 16:18:18 +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
Qubasa
3cc7511764
clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C
2024-12-09 18:07:23 +01:00
lassulus
ceaeb2f1f6
vars migration: raise error on incomplete migration, commit migrated files
2024-12-06 11:25:17 +01:00
lassulus
9572a73fe8
vars password-store: create tarball dir if not for users
2024-12-04 23:30:39 +01:00
lassulus
19a251d6fc
vars: add file mode
2024-12-04 23:30:39 +01:00
clan-bot
1511b14b3c
Merge pull request 'fix vars migration prompts. add secretsForUsers to vars interface and implement that for pass' ( #2551 ) from lassulus/clan-core:vars-stuff into main
2024-12-04 09:03:24 +00:00
DavHau
37ad4eaad5
vars: print() -> log.info()
2024-12-04 14:08:50 +07:00
DavHau
f5226ec7ff
vars: Improve logging for migration
2024-12-04 12:42:03 +07:00
lassulus
c6a713d393
cli vars generate: log in global context what is global
2024-12-03 22:29:25 +01:00
lassulus
d89ee46d7f
vars password-store: add neededForUsers option
2024-12-03 22:28:39 +01:00
lassulus
2916798e84
vars generate: show prompts only if not migrating
2024-12-03 22:25:16 +01:00
Qubasa
164c621dc0
clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts
2024-12-03 16:01:51 +01:00
lassulus
1b83fd27a8
cli vars: remove get_all from baseclass
2024-12-02 11:30:09 +01:00
DavHau
681c671391
vars/migration: remove useless check
2024-11-29 17:23:31 +07:00
DavHau
66ce80c096
vars: rename: invalidation -> validation
2024-11-29 17:23:31 +07:00
DavHau
03bcf6bba3
vars: generate docs for cli and module
2024-11-29 17:23:31 +07:00
lassulus
513431148e
vars: make upload actually upload
2024-11-28 21:00:12 +01:00
lassulus
d4fb4efd1f
cli vars upload: fix sops
2024-11-28 17:52:04 +01:00
clan-bot
a97d719a52
Merge pull request 'remove secretsUploadDirectory from common module' ( #2509 ) from lassulus/clan-core:no-secrets-upload-dir into main
2024-11-28 15:46:51 +00:00
lassulus
c00ac4a246
vars: remove secretsUploadDirectory from common module
2024-11-28 16:38:06 +01:00
Qubasa
d2719f3179
clan-cli: cmd.run now has its options extracted to a dataclass
2024-11-28 15:26:37 +01:00
Louis Opter
1ba27196d8
clan-cli: rebase sops changes on top of vars changes
...
vars changes in question are from commit: 54b8f5904e
With this changeset the age specific sops logic that was added is now
generic.
To keep things simple, this changeset modifies `SopsKey` so that
`username` is ignored when comparing different keys. I don't really see
us relying on `username` and this makes `SopsKey` hashable, and usable
in a `set`, which is nice when you check that you have a particular key.
2024-11-27 06:27:53 +00:00
Jörg Thalheim
45dfbf54db
vars: make interface more type-safe
2024-11-26 17:08:26 +01:00
Jörg Thalheim
8eb37903e0
test_vars: mock ask function instead of sys.stdin
2024-11-26 11:56:38 +00:00
DavHau
173436632d
vars: fix migration - secrets end up in public store
2024-11-26 17:02:11 +07:00
Qubasa
27b40849d1
clan-cli: Refactor ssh classes to dataclasses
2024-11-25 19:47:17 +01:00
Qubasa
41a84f5970
docs: Fix nix flake check problem with diskId
2024-11-25 18:39:16 +01:00
lassulus
19dce7694f
cli password-store: upload generators folder only if it has secrets
2024-11-22 22:34:09 +01:00
lassulus
045c9119f3
password-store: include filenames in manifest for upload check
2024-11-22 22:34:09 +01:00
lassulus
13b7d3c7ec
cli password-store: skip uploading non secret files
2024-11-22 22:34:09 +01:00
Qubasa
8866a85765
clan-cli: Refactor ssh part 2, Refactor custom_logger
2024-11-22 22:08:50 +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
Jörg Thalheim
a4e03a85eb
vars: don't print stack trace if generator fails
2024-11-19 09:46:14 +00:00
Jörg Thalheim
9c6e04fa3f
vars: introduce ensure_machine_has_access method for sops
...
this should help avoiding overriding existing shared secrets by not
triggering vars regeneration if a machine has no access.
wip
2024-11-19 09:46:14 +00:00
lassulus
8e1697a089
password-store owner & group support
2024-11-16 01:18:59 +01:00
Qubasa
250eed0798
clan-cli: upload.py -> Replace rsync with native ssh command
2024-11-15 22:03:47 +07:00
Jörg Thalheim
c98055c781
vars: introduce ensure_machine_has_access method for sops
...
this should help avoiding overriding existing shared secrets by not
triggering vars regeneration if a machine has no access.
wip
2024-11-14 15:37:55 +00:00
Jörg Thalheim
8f1e5ed1eb
vars/get: use machine_name as variable name
2024-11-14 15:37:55 +00:00
Jörg Thalheim
4a389b0fb3
vars/sops: simplify conditional in exists
2024-11-14 15:37:55 +00:00