Rauthy as a compose profile: sign-in in Norwegian, off until asked for
dns / dns (push) Successful in 4s
dns / dns (push) Successful in 4s
A rauthy service under the profile of the same name, its config here without secrets, and rauthy.env written by the deploy from Actions secrets. OIDC_ISSUER moves portal's and the chat's sign-in to it, RAUTHY_API_KEY lets portal make accounts there. konto.tomtervel.no in DNS and kasse's Caddy, beside id. Nothing runs until RAUTHY_HOST, the three secrets and the profile are set. Tried locally: the config starts, the issuer is https://<host>/auth/v1/, and a Norwegian browser gets the pages in nb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
This commit is contained in:
8 files changed
+163
No files matched your search
@@ -21,6 +21,7 @@ on:
|
||||
- gdo/**
|
||||
- nats/nats.conf
|
||||
- kanidm/server.toml.tpl
|
||||
- rauthy/config.toml
|
||||
- deploy-tomtervel
|
||||
- .gitea/workflows/deploy.yml
|
||||
workflow_dispatch:
|
||||
@@ -63,6 +64,17 @@ jobs:
|
||||
# location field is two numbers).
|
||||
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
|
||||
MAPBOX_STYLE: ${{ vars.MAPBOX_STYLE }}
|
||||
# Optional: Rauthy beside or instead of Kanidm (README.md, "Rauthy").
|
||||
# RAUTHY_HOST and the three secrets run it (with `rauthy` in
|
||||
# COMPOSE_PROFILES); OIDC_ISSUER moves portal's and the chat's
|
||||
# sign-in to it; RAUTHY_API_KEY lets portal make accounts there.
|
||||
RAUTHY_HOST: ${{ vars.RAUTHY_HOST }}
|
||||
RAUTHY_ENC_KEY: ${{ secrets.RAUTHY_ENC_KEY }}
|
||||
RAUTHY_SECRET_RAFT: ${{ secrets.RAUTHY_SECRET_RAFT }}
|
||||
RAUTHY_SECRET_API: ${{ secrets.RAUTHY_SECRET_API }}
|
||||
OIDC_ISSUER: ${{ vars.OIDC_ISSUER }}
|
||||
RAUTHY_API_KEY: ${{ secrets.RAUTHY_API_KEY }}
|
||||
RAUTHY_LANGUAGE: ${{ vars.RAUTHY_LANGUAGE }}
|
||||
steps:
|
||||
# A missing value stops here, by name, before anything on the host
|
||||
# is touched. Only names are printed: the log is public.
|
||||
@@ -91,6 +103,8 @@ jobs:
|
||||
CNATS_TAG=$CNATS_TAG
|
||||
KRON_RELEASE=$KRON_RELEASE
|
||||
COMPOSE_PROFILES=$COMPOSE_PROFILES
|
||||
RAUTHY_HOST=$RAUTHY_HOST
|
||||
OIDC_ISSUER=$OIDC_ISSUER
|
||||
EOF
|
||||
cat > "$STAGE/portal.env" <<EOF
|
||||
NATS_URL=nats://portal:$NATS_PASSWORD@nats:4222
|
||||
@@ -115,6 +129,10 @@ jobs:
|
||||
GARAGE_UPLOADS_BUCKET=$GARAGE_UPLOADS_BUCKET
|
||||
MAPBOX_TOKEN=$MAPBOX_TOKEN
|
||||
MAPBOX_STYLE=$MAPBOX_STYLE
|
||||
OIDC_ISSUER=$OIDC_ISSUER
|
||||
RAUTHY_URL=${RAUTHY_HOST:+https://$RAUTHY_HOST}
|
||||
RAUTHY_API_KEY=$RAUTHY_API_KEY
|
||||
RAUTHY_LANGUAGE=$RAUTHY_LANGUAGE
|
||||
EOF
|
||||
# NATS itself (nats.conf reads NATS_PASSWORD), gdo and the chat.
|
||||
cat > "$STAGE/nats.env" <<EOF
|
||||
@@ -125,6 +143,22 @@ jobs:
|
||||
OAUTH2_CLIENT_ID=$CHAT_OAUTH2_CLIENT_ID
|
||||
OAUTH2_CLIENT_SECRET=$CHAT_OAUTH2_CLIENT_SECRET
|
||||
EOF
|
||||
# Rauthy's secrets, only where it runs. The first admin is the
|
||||
# vel's first person.
|
||||
if [ -n "$RAUTHY_ENC_KEY" ]; then
|
||||
for v in RAUTHY_HOST RAUTHY_SECRET_RAFT RAUTHY_SECRET_API; do
|
||||
[ -n "${!v}" ] || { echo "RAUTHY_ENC_KEY is set, but not $v"; exit 1; }
|
||||
done
|
||||
cat > "$STAGE/rauthy.env" <<EOF
|
||||
ENC_KEYS=$RAUTHY_ENC_KEY
|
||||
ENC_KEY_ACTIVE=${RAUTHY_ENC_KEY%%/*}
|
||||
HQL_SECRET_RAFT=$RAUTHY_SECRET_RAFT
|
||||
HQL_SECRET_API=$RAUTHY_SECRET_API
|
||||
BOOTSTRAP_ADMIN_EMAIL=$SEED_ADMIN_EMAIL
|
||||
RAUTHY_ADMIN_EMAIL=$SEED_ADMIN_EMAIL
|
||||
EVENT_EMAIL=$SEED_ADMIN_EMAIL
|
||||
EOF
|
||||
fi
|
||||
|
||||
- name: Pull and bring the stack up
|
||||
run: sudo /usr/local/bin/deploy-tomtervel
|
||||
Reference in new issue
Block a user