feat(auth): isolate harness secret artifact
CI / test (push) Failing after 34s

This commit is contained in:
m
2026-09-01 23:14:31 +03:00
parent 81ce8dfdb2
commit c831ee1260
3 changed files with 14 additions and 3 deletions
+5 -1
View File
@@ -22,7 +22,11 @@ func main() {
if flag.NArg() != 1 {
fail("usage: secret-control-plane [ensure|rotate]")
}
store, err := platformsecrets.NewLocalMachineCredentialStore(defaultRoot, defaultRuntimeUID, defaultRuntimeGID, nil)
root := os.Getenv("SECRET_CONTROL_PLANE_ROOT")
if root == "" {
root = defaultRoot
}
store, err := platformsecrets.NewLocalMachineCredentialStore(root, defaultRuntimeUID, defaultRuntimeGID, nil)
if err != nil {
fail("control-plane credential store unavailable")
}
+1
View File
@@ -266,6 +266,7 @@ services:
command: ["ensure"]
volumes:
- assistant_control_plane_service_secrets:/run/control-plane-secrets
- assistant_core_secrets:/run/core-secrets
cognitive-worker:
build: { context: .., dockerfile: deploy/images/runtime.Dockerfile, args: { TARGET: cognitive-worker, SOURCE_REVISION: "${ASSISTANT_SOURCE_REVISION:-unknown}" } }
+8 -2
View File
@@ -10,6 +10,12 @@ COMPOSE_FILE="$REPO_DIR/deploy/docker-compose.prod.yml"
VOLUME="assistant_control_plane_service_secrets"
ACTION="${1:-ensure}"
CREDENTIAL="${MACHINE_CREDENTIAL:-control-plane}"
SECRET_ROOT="/run/control-plane-secrets"
VOLUME="assistant_control_plane_service_secrets"
if [[ "$CREDENTIAL" == "acceptance-harness" ]]; then
SECRET_ROOT="/run/core-secrets"
VOLUME="assistant_core_secrets"
fi
case "$ACTION" in
ensure|rotate) ;;
@@ -33,7 +39,7 @@ if [[ "$ACTION" == "rotate" ]]; then
owner-requested-rotation|exposure-detected) ;;
*) echo "invalid rotation reason" >&2; exit 2 ;;
esac
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps secret-control-plane -credential "$CREDENTIAL" -reason "$reason" rotate
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps -e "SECRET_CONTROL_PLANE_ROOT=$SECRET_ROOT" secret-control-plane -credential "$CREDENTIAL" -reason "$reason" rotate
else
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps secret-control-plane -credential "$CREDENTIAL" ensure
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps -e "SECRET_CONTROL_PLANE_ROOT=$SECRET_ROOT" secret-control-plane -credential "$CREDENTIAL" ensure
fi