Commit Graph

3 Commits (main)

Author SHA1 Message Date
Amir Alexander Abdelbaki e5d58622fe Revert "feat(freeipa-ansible): gateway-wide Basic Auth in front of the ansipa portal"
This reverts commit 4730f89e82.
2026-07-22 16:24:31 +02:00
Amir Alexander Abdelbaki 4730f89e82 feat(freeipa-ansible): gateway-wide Basic Auth in front of the ansipa portal
Adds a deliberate extra sign-in layer covering the entire nginx gateway
(portal page + every proxied web UI) via a shared htpasswd credential
generated on the FreeIPA container and published to nginx through a new
portal-auth volume. FreeIPA, CheckMK and Keycloak still each enforce their
own login behind it — two prompts beats one attacker who only had to beat
one lock. Healthcheck updated to treat 401 as healthy accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 16:08:10 +02:00
Amir Alexander Abdelbaki be757fda5a feat(ansipa): nginx gateway — reverse proxy + portal start-page
Add an nginx service that fronts all three web UIs on a single hostname/port
and serves a portal landing page, designed to sit behind the operator's own
TLS-terminating reverse proxy.

- Each backend is proxied at the path it already serves natively — FreeIPA
  /ipa, CheckMK /cmk, Keycloak under a configured /auth relative path — so no
  fragile path rewriting is needed and one upstream proxy line exposes
  everything. FreeIPA's strict Host/Referer anti-CSRF checks are satisfied by
  pinning Host to the IPA hostname and rewriting Referer.
- Honors incoming X-Forwarded-Proto/For so it works behind a second reverse
  proxy (double-proxy verified: portal, FreeIPA, CheckMK and Keycloak all
  reachable through two layers, and a CheckMK login POST completes to an
  authenticated session through the gateway).
- Keycloak: KC_HTTP_RELATIVE_PATH=/auth + KC_PROXY_HEADERS=xforwarded so it
  builds correct URLs behind the gateway; deliberately not forwarding
  X-Forwarded-Port (this gateway is :80 internally; the public port is the
  upstream proxy's) to avoid https://host:80 redirects.
- .env.example documents ANSIPA_HTTP_PORT and gives the exact upstream
  reverse-proxy snippet (nginx location block + Caddy one-liner).

Portal is a static cyberqueer-themed page linking to /ipa/ui/, /cmk/, /auth/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUhrcFU8J1Hnf7vNqNxZNi
2026-07-02 12:36:28 +02:00