From 426fc24d66a36db2a21af955fd78bc3436362604 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Fri, 13 Nov 2026 21:06:43 -0500 Subject: [PATCH] apps(osint): pin the auth build and wire the single-admin Secret MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit osint-dashboard master d8113b37b8ac adds app/auth.py: deny-by-default on /api/* with a public read allowlist, so visitors get the map + news and only the admin gets keys/settings/mutations. Pin the amd64 image (:amd64-d8113b37b8ac) on app, camera-service and ingester, and feed ADMIN_USER / ADMIN_PASSWORD_HASH / ADMIN_SESSION_SECRET from Secret osint-admin. The refs are optional: true on purpose — a missing Secret must not stop the pod; the app then fails closed (admin routes 403) while the public HUD serves. --- apps/base/osint/app-deployment.yaml | 26 ++++++++++++++++++++++-- apps/base/osint/camera-deployment.yaml | 2 +- apps/base/osint/ingester-deployment.yaml | 2 +- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/apps/base/osint/app-deployment.yaml b/apps/base/osint/app-deployment.yaml index 5378408..6761ef5 100644 --- a/apps/base/osint/app-deployment.yaml +++ b/apps/base/osint/app-deployment.yaml @@ -24,7 +24,7 @@ spec: initContainers: # Wait for Postgres before alembic runs (the entrypoint migrates). - name: wait-for-db - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-c48788d4b614 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-d8113b37b8ac imagePullPolicy: IfNotPresent command: - python @@ -42,7 +42,7 @@ spec: sys.exit("postgres did not become reachable in 300s") containers: - name: app - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-c48788d4b614 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-d8113b37b8ac imagePullPolicy: IfNotPresent ports: - containerPort: 8000 @@ -56,6 +56,28 @@ spec: secretKeyRef: name: osint-db key: password + # Single-admin auth (app/auth.py). optional: true on purpose — a + # missing Secret must not block startup; the app then fails closed + # (admin routes 403 "admin auth not configured") while the public + # read-only HUD still serves. + - name: ADMIN_USER + valueFrom: + secretKeyRef: + name: osint-admin + key: ADMIN_USER + optional: true + - name: ADMIN_PASSWORD_HASH + valueFrom: + secretKeyRef: + name: osint-admin + key: ADMIN_PASSWORD_HASH + optional: true + - name: ADMIN_SESSION_SECRET + valueFrom: + secretKeyRef: + name: osint-admin + key: ADMIN_SESSION_SECRET + optional: true readinessProbe: httpGet: path: /api/health diff --git a/apps/base/osint/camera-deployment.yaml b/apps/base/osint/camera-deployment.yaml index a5dc6ad..a2ee69d 100644 --- a/apps/base/osint/camera-deployment.yaml +++ b/apps/base/osint/camera-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: camera-service - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-c48788d4b614 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-d8113b37b8ac imagePullPolicy: IfNotPresent command: ["python", "app/run_camera_service.py"] envFrom: diff --git a/apps/base/osint/ingester-deployment.yaml b/apps/base/osint/ingester-deployment.yaml index 0af6aab..5f0ddc5 100644 --- a/apps/base/osint/ingester-deployment.yaml +++ b/apps/base/osint/ingester-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: ingester - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-c48788d4b614 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-d8113b37b8ac imagePullPolicy: IfNotPresent command: ["python", "app/run_ingester.py"] envFrom: