@@ -116,6 +116,35 @@ sed \
116116 " $cluster_config " > " $signed_worker_config "
117117go run ./cmd/stacyvm config lint --production --file " $signed_worker_config "
118118
119+ echo " ==> Linting signed-token worker identity migration warnings"
120+ mixed_worker_config=" $tmpdir /stacyvm.signed-worker-mixed.yaml"
121+ sed \
122+ -e ' /worker_tokens:/,/admin_fallback_enabled:/c\
123+ worker_token: "shared-worker-token-with-at-least-32-bytes"\
124+ worker_signing_key: "worker-signing-key-with-at-least-32-bytes"\
125+ admin_fallback_enabled: false' \
126+ " $cluster_config " > " $mixed_worker_config "
127+ mixed_lint_output=" $( go run ./cmd/stacyvm config lint --production --file " $mixed_worker_config " ) "
128+ if [[ " $mixed_lint_output " != * " shared worker token still configured with signed worker tokens" * ]]; then
129+ echo " $mixed_lint_output "
130+ echo " expected signed-token migration warning for shared worker token" >&2
131+ exit 1
132+ fi
133+
134+ invalid_rotation_config=" $tmpdir /stacyvm.invalid-rotation.yaml"
135+ sed \
136+ -e ' /worker_tokens:/,/admin_fallback_enabled:/c\
137+ worker_signing_key: "worker-signing-key-with-at-least-32-bytes"\
138+ worker_signing_keys: ["worker-signing-key-with-at-least-32-bytes"]\
139+ admin_fallback_enabled: false' \
140+ " $cluster_config " > " $invalid_rotation_config "
141+ rotation_lint_output=" $( go run ./cmd/stacyvm config lint --production --file " $invalid_rotation_config " ) "
142+ if [[ " $rotation_lint_output " != * " rotation keys include the active worker signing key" * ]]; then
143+ echo " $rotation_lint_output "
144+ echo " expected signed-token migration warning for invalid rotation keys" >&2
145+ exit 1
146+ fi
147+
119148echo " ==> Linting production-aligned Postgres cluster config"
120149postgres_config=" $tmpdir /stacyvm.postgres.yaml"
121150sed \
0 commit comments