Skip to content

0.17c Production identity: production realm, admin MFA, auth event logging #121

Closed

Description

@mpcs2013

Split from #29 (Marco, 2026-10-04). Agent: identity-dev. Depends on: #120.

Scope

  • C-03, production realm (0.05 Keycloak realm export + bff client + seeded users #17 F-1; keycloak-realm T-01, T-02, T-18 and T-20; T77-09):
    • no seeded users, with a check that no dev- user or .test email exists;
    • sslRequired: all and KC_HOSTNAME;
    • the admin console is not published (or sits on a separate host);
    • realm values written as ${VAR:?};
    • a realm migration strategy;
    • F-77-2: mount exactly one realm file, never the directory.
  • 0.13 Modules.Admin API #25 C-5 (MFA for platform admins): every holder of platform-admin must use MFA, and /api/admin requires an MFA acr/amr value in the access token, not only the role.
  • C-02, MFA and password checks: MFA for every user, and checks against common, context-specific and breached passwords (ASVS V6.3.3, V6.2.4, V6.2.11, V6.2.12).
    • Trigger: before the first non-synthetic user.
    • The private Phase 0 VPS has synthetic users only, so this issue designs and configures it, and enforcement may be switched on at the first real user (G1 records which).
  • C-10, authentication event logging (ASVS V16.3.1, V16.3.2):
    • Keycloak login and admin events on, with retention;
    • fixed-text BFF events for sign-in success and failure, and for sign-out;
    • an Api Warning for a rejected bearer token, with a reason code and no token data.

Sources: the #29 comments from #25 and #27.

Tier

Full: auth.

Done when

  • The production realm imports with no seeded users.
  • /api/admin refuses a token without MFA.
  • The authentication events are emitted and tested.
  • The C-02 enforcement point is decided and documented.

Activity

  1. mpcs2013 commented on Oct 5, 2026

    @mpcs2013
    OwnerAuthor

    Hosting decisions for this issue (#124, ADR-0016, accepted by Marco on 2026-10-04 and 2026-10-05).

    • Host: Phase 0 runs on Marco's Synology DS918+ NAS (x86-64-v2, 8 GB), LAN only, with QuickConnect disabled. The rented EU VPS is the go-live target and the fallback (triggers F1 to F6).
    • Names: app.p0.home.arpa and id.p0.home.arpa (Caddy on 8443), and nas.home.arpa for DSM.
    • TLS: Caddy's internal CA. .home.arpa cannot get public certificates.
    • Sources: docs/adr/0016-phase-0-hosting.md and docs/architecture/phase-0-hosting.md ("Ripple into the downstream issues"), on main once 0.17-pre Hosting decision for the private Phase 0 VPS (ADR-0016) #124 merges. Combined review: docs/security/reviews/124.md.

    What this issue receives:

    KC_HOSTNAME=https://id.p0.home.arpa:8443; realm redirect URIs and web origins on https://app.p0.home.arpa:8443; KC_PROXY_HEADERS=xforwarded from Caddy only, Keycloak not published. Back-channel trust: the BFF (OIDC discovery, token endpoint) and the Api (JWKS, issuer validation) reach https://id.p0.home.arpa:8443 through Caddy's alias on the back-channel network, so the issuer is identical on front and back channel, and they validate Caddy's certificate against the mounted root; no disabled validation, no KC_HOSTNAME_BACKCHANNEL_DYNAMIC needed. Admin console not on the app-facing path (C-03): /admin/* and /realms/master/* from Marco's workstation only, unrouted if source addresses are not kept; management port 9000 never routed. Healthcheck start_period sized to the measured F1. Names and port are variables, so the VPS changes configuration only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase-0Phase 0 – Platform Foundations

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions