fix(deploy): prepare server auth projection root
This commit is contained in:
@@ -83,15 +83,21 @@ else
|
|||||||
original_task13_run_logged="$(declare -f task13_run_logged)"
|
original_task13_run_logged="$(declare -f task13_run_logged)"
|
||||||
ownership_calls="$fixture/server-auth-ownership.calls"
|
ownership_calls="$fixture/server-auth-ownership.calls"
|
||||||
task13_run_logged() {
|
task13_run_logged() {
|
||||||
printf '%s\n' "$*" >"$ownership_calls"
|
printf '%s\n' "$*" >>"$ownership_calls"
|
||||||
}
|
}
|
||||||
task13_prepare_server_auth_canonical_root
|
task13_prepare_server_auth_roots
|
||||||
grep -Fxq -- \
|
grep -Fxq -- \
|
||||||
"prepare server authentication canonical root sudo -n -- install -d -o 0 -g 0 -m 0700 -- $TASK13_AUTH_ROOT" \
|
"prepare server authentication canonical root sudo -n -- install -d -o 0 -g 0 -m 0700 -- $TASK13_AUTH_ROOT" \
|
||||||
"$ownership_calls" || {
|
"$ownership_calls" || {
|
||||||
echo "server auth fixture does not prepare a root-owned private canonical directory" >&2
|
echo "server auth fixture does not prepare a root-owned private canonical directory" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
grep -Fxq -- \
|
||||||
|
"prepare server authentication runtime root sudo -n -- install -d -o 10001 -g 10001 -m 0700 -- $TASK13_AUTH_RUNTIME_ROOT" \
|
||||||
|
"$ownership_calls" || {
|
||||||
|
echo "server auth fixture does not prepare the private runtime projection directory" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
unset -f task13_run_logged
|
unset -f task13_run_logged
|
||||||
eval "$original_task13_run_logged"
|
eval "$original_task13_run_logged"
|
||||||
compose_files=(
|
compose_files=(
|
||||||
|
|||||||
@@ -944,14 +944,19 @@ task13_configure_server_oidc_authentication() {
|
|||||||
--authentik-base-url "https://task13-fake-oidc:9443" --user-group task13-users --admin-group task13-admins
|
--authentik-base-url "https://task13-fake-oidc:9443" --user-group task13-users --admin-group task13-admins
|
||||||
}
|
}
|
||||||
|
|
||||||
task13_prepare_server_auth_canonical_root() {
|
task13_prepare_server_auth_roots() {
|
||||||
[[ "${TASK13_PROFILE:-}" == server \
|
[[ "${TASK13_PROFILE:-}" == server \
|
||||||
&& "$TASK13_AUTH_ROOT" == "$TASK13_TMP/auth" \
|
&& "$TASK13_AUTH_ROOT" == "$TASK13_TMP/auth" \
|
||||||
&& ! -L "$TASK13_AUTH_ROOT" \
|
&& ! -L "$TASK13_AUTH_ROOT" \
|
||||||
&& ( ! -e "$TASK13_AUTH_ROOT" || -d "$TASK13_AUTH_ROOT" ) ]] \
|
&& ( ! -e "$TASK13_AUTH_ROOT" || -d "$TASK13_AUTH_ROOT" ) \
|
||||||
|| task13_fail "refusing to prepare an unexpected server authentication root"
|
&& "$TASK13_AUTH_RUNTIME_ROOT" == "$TASK13_TMP/auth-runtime" \
|
||||||
|
&& ! -L "$TASK13_AUTH_RUNTIME_ROOT" \
|
||||||
|
&& ( ! -e "$TASK13_AUTH_RUNTIME_ROOT" || -d "$TASK13_AUTH_RUNTIME_ROOT" ) ]] \
|
||||||
|
|| task13_fail "refusing to prepare unexpected server authentication roots"
|
||||||
task13_run_logged "prepare server authentication canonical root" sudo -n -- \
|
task13_run_logged "prepare server authentication canonical root" sudo -n -- \
|
||||||
install -d -o 0 -g 0 -m 0700 -- "$TASK13_AUTH_ROOT"
|
install -d -o 0 -g 0 -m 0700 -- "$TASK13_AUTH_ROOT"
|
||||||
|
task13_run_logged "prepare server authentication runtime root" sudo -n -- \
|
||||||
|
install -d -o 10001 -g 10001 -m 0700 -- "$TASK13_AUTH_RUNTIME_ROOT"
|
||||||
}
|
}
|
||||||
|
|
||||||
task13_prepare_local_auth_runtime() {
|
task13_prepare_local_auth_runtime() {
|
||||||
@@ -2854,7 +2859,7 @@ task13_server_smoke_main() {
|
|||||||
task13_write_server_fixture_files
|
task13_write_server_fixture_files
|
||||||
task13_seed_registry
|
task13_seed_registry
|
||||||
task13_build_tht
|
task13_build_tht
|
||||||
task13_prepare_server_auth_canonical_root
|
task13_prepare_server_auth_roots
|
||||||
task13_configure_server_oidc_authentication
|
task13_configure_server_oidc_authentication
|
||||||
task13_start_server_stack
|
task13_start_server_stack
|
||||||
task13_record_project_image_evidence
|
task13_record_project_image_evidence
|
||||||
|
|||||||
Reference in New Issue
Block a user