constellation/internal
Moritz Sanft 744a605602
cli: state file validation (#2523)
* re-use `ReadFromFile` in `CreateOrRead`

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* [wip]: add constraints

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* [wip] error formatting

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* wip

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* formatted error messages

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* state file validation

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* linter fixes

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* allow overriding the constraints

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* dont validate on read

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* add pre-create constraints

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* [wip]

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* finish pre-init validation test

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* finish post-init validation

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* use state file validation in CLI

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* fix apply tests

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* Update internal/validation/errors.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* use transformator for tests

* tidy

* use empty check directly

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* conditional validation per CSP

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* tidy

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* fix rebase

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* add default case

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* validate state-file as last input

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

---------

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
2023-11-03 15:47:03 +01:00
..
api api: for Azure attestationconfigapi use TCB values from SNP report instead of MAA token (#2429) 2023-10-17 17:36:50 +02:00
atls attestation: add awsSEVSNP as new variant (#1900) 2023-06-09 15:41:02 +02:00
attestation image: update measurements and image version 2023-11-03 09:04:06 +01:00
cloud Support internal load balancers (#2388) 2023-10-17 15:46:15 +02:00
compatibility helm: fix upgrade command unintentionally skipping all service upgrades (#1992) 2023-06-30 16:46:05 +02:00
config cli: fix invalid upper case name on AWS (#2546) 2023-11-03 10:09:43 +01:00
constants cli: refactor terraform code to be update/create agnostic (#2501) 2023-10-26 10:55:50 +02:00
containerimage cli: use Bazel container images 2023-04-18 15:35:15 +02:00
crypto joinservice: cache certificates for Azure SEV-SNP attestation (#2336) 2023-09-29 14:29:50 +02:00
cryptsetup disk-mapper: set LUKS2 token to allow reusing unintialized state disks (#2083) 2023-07-18 16:20:03 +02:00
file cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
grpc cdbg: make endpoint deployment failure more transparent (#1883) 2023-06-12 13:45:34 +02:00
imagefetcher api: add functions to transparently handle signatures upon API interaction (#2142) 2023-08-01 16:48:13 +02:00
installer go: remove redefinitions of builtins 2023-03-20 08:41:01 -04:00
kms docs: refer to apply command instead of init or upgrade apply (#2487) 2023-10-27 08:30:59 +02:00
kubernetes cli: refactor kubernetes package (#2232) 2023-08-21 16:15:32 +02:00
license bazel: set integration go build tag 2023-08-17 10:46:45 +02:00
logger deps: update grpc-middleware to v2 (#2286) 2023-08-29 14:07:19 +02:00
maa ci: add e2e test for self-managed infrastructure (#2472) 2023-10-27 09:37:26 +02:00
nodestate bazel: add build files for go (#1186) 2023-03-09 15:23:42 +01:00
osimage image: allow toggling secure boot in image upload 2023-09-27 17:58:19 +02:00
retry bazel: add build files for go (#1186) 2023-03-09 15:23:42 +01:00
role terraform: azure node groups (#1955) 2023-06-22 16:53:40 +02:00
semver cli: parse image and k8s versions as semver (#2235) 2023-08-23 14:37:53 +02:00
sigstore api: refine signature types 2023-09-04 11:20:13 +02:00
staticupload staticupload: correctly set invalidation timeout 2023-09-04 11:20:13 +02:00
validation cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
verify api: for Azure attestationconfigapi use TCB values from SNP report instead of MAA token (#2429) 2023-10-17 17:36:50 +02:00
versions deps: update Kubernetes versions (#2491) 2023-10-25 10:13:42 +02:00