ADR 0013: Service access — one ingress, configured by domain and TLS mode
Status
Section titled “Status”Binding. The local root runs the ingress adapter and emits access.ingress
with routes for Dagster and Superset per stage, Trino, OpenMetadata when
governance is enabled, the portal landing page at the base domain, and auth.<base_domain> for the identity provider; the AWS and Azure roots still emit
access.kubectl_port_forward.
Context
Section titled “Context”Users reach Dagster, Superset, OpenMetadata, and Trino through
kubectl port-forward to fixed localhost ports. That needs a cluster
credential on every workstation, breaks on pod restart, and gives no stable
URL or trusted TLS. v0.4 (#20) replaces it for local and on-premises installs.
Decision
Section titled “Decision”-
One ingress everywhere. A local evaluation install and a real install run the same ingress and differ only in configuration. The Deployment Profile carries that configuration as
spec.access:Field Default Real install base_domainolf.localhoste.g. olf.example.comtlsnone(plain HTTP)external: your reverse proxy, tunnel or load balancer terminates HTTPStrusted_proxiesnone with external: the CIDR blocks of that proxy, the only peers whoseX-Forwarded-*headers are believedThe defaults need neither a purchased domain nor a public server, nor a certificate.
local-ca, a CA the platform creates, is opt-in HTTPS for an evaluation install (every browser must trust it);externalmeans the customer terminates HTTPS in front of OpenLakeForge, so Traefik serves HTTP while every generated URL, callback and cookie ishttps://, and it is refused on*.localhost, where nothing upstream can terminate TLS; the other providers’ default stayslocal-cabecause they do not read the block yet andnoneis local-only (decision 9).The block is the switch (#399). A profile with no
spec.accessis a quickstart: no Traefik, cert-manager, local CA, CoreDNS rewrite, portal or route Ingresses, andshared.accessis a port-forward contract (access.port_forward, no routes), whicholfclients andolf infra forwardserve overhttp://localhost:<port>. Declaring the block, even asaccess: {}for the defaults, turns the ingress on. Block presence was chosen over anaccess.exposurefield because a second field would let the block and the field disagree (access:present withexposure: none), and the defaults above already make an empty block meaningful. On the local providerspec.identityrequiresspec.access(the cloud roots do not readspec.access): sign-in redirects need the route hostnames, so the profile is rejected at validation otherwise. -
Routes sit one level under the base domain: a stage service is
https://<service>-<stage>.<base_domain>(dagster-dev.olf.localhost); a shared service (OpenMetadata, Trino) drops the stage suffix. One wildcard level is all that most client certificates and edge providers cover (#340), so a single*.<base_domain>certificate serves every route. Stage names are the fixed setdev,uat,prodand the stage services aredagsterandsuperset, so no<service>-<stage>host can equal a shared or reserved host (trino,openmetadata,auth,oauth2). The one exception is the portal (decision 7), which is the apex,https://<base_domain>. With one Trino per stage (ADR 0019 section 9), Trino is a stage service,trino-<stage>.<base_domain>, andtrinois no longer a shared host. The stage services aredagster,supersetandtrino, and the no-collision argument above is unchanged. Built for the local root (#976): the refs arestage/<stage>/queryandstage/<stage>/query_api(the/v1path). -
The provider contract carries the routes.
shared.accessgainsbase_domain,tls,tls_mode, androutes— declared together or not at all, so a port-forward contract still parses.routesis keyed by the service’s existing contract ref (stage/dev/orchestration,shared/governance_service,shared/portal, …), so a route for a disabled capability or an unknown service does not resolve and is rejected. Consumers read URLs from the contract, never from fixed ports. -
Internal endpoints cannot be user-facing. Only orchestration, reporting, governance, query, identity, and portal may be routed with
exposure: user-facing. Databases, object-store administration, the catalog service, and the registry may only beinternal; Dagster code servers have no ref and cannot be routed at all. -
Port-forward is an explicit development fallback, not an access path.
olf’s own clients (olf.infra.access.service_url) use a stage’s route when its contract has one, and port-forward when it has none (the AWS and Azure contracts today), whenOLF_PORT_FORWARDis set, or when the route is inshared.access.perimeter.protected_routesof an enabled perimeter (ADR 0014 seam 3), because the ingress answers a request with no session by redirecting to login. Only a caller that tests the ingress itself passesthrough_ingress=True. They resolve*.localhostto127.0.0.1in-process and, for thelocal-caissuer, verify against the CA read from the cluster — no/etc/hostsedit and no disabled verification. Users trust that CA once witholf infra access trust. -
Local adapter: Traefik terminates TLS, cert-manager issues. On kind, Traefik binds host ports 80/443 on
127.0.0.1through the control-plane node. cert-manager signs from alocal-caClusterIssuer whose root is self-signed once and never rotated by a re-deploy;olf infra deploywaits for a probe certificate from it.tls_modeis thereforeingress-terminatedfortls: local-ca(nonefor plain HTTP,edge-terminatedforexternal: Traefik serves onlyweb, with no TLS store, no certificate and no host port 443, and trustsX-Forwarded-Protoand-Hostonly fromforwardedHeaders.trustedIPs, set from the profile’sspec.access.trusted_proxies(required withexternal, refused otherwise, never0.0.0.0/0); Traefik discards those headers from any other peer, so a forged one is never read as HTTPS; the perimeter’s forward-auth middleware keeps them (trustForwardHeader) only in this mode, since otherwise it rebuilds them from its own HTTP connection and oauth2-proxy would send the browser back tohttp://). One wildcard certificate,*.<base_domain>plus the bare<base_domain>(a wildcard does not match the apex), is issued in the shared namespace by cert-manager’s ingress-shim and is Traefik’s default certificate (tlsStore.default). Traefik’s TLS store is global and keyed by SNI, so per-namespace copies of the same wildcard would leave one of them serving every route; stageIngressobjects carry an emptytlsblock, which enables TLS on the router and names no Secret. Routes are standardIngressobjects, which need no CRD at plan time. Traefik attaches middleware perIngress, so a namespace has oneIngressper access group (the role floor, ADR 0014 seam 3); only one in the shared namespace carries the issuer annotation and names the TLS Secret. TheIngresswithout a group holds the routes behind no middleware: the identity route and the perimeter’s login callback. -
The portal is a page at the base domain. It lists every route of
shared.access.routesthat is enabled anduser-facing, grouped by stage, plus an Admin link to the GitHub organisation’s teams when the issuer is GitHub. Terraform writes those links asroutes.jsonin a ConfigMap from the same route data that feeds the contract, so the page cannot list a service the contract does not route. The pinned openlakeforge-portal image renders it, and the page Logout lands on, from theolf-systemnamespace in the platform phase: the route set is static infrastructure (ADR 0002). Links are not filtered by role; the perimeter (#176) denies what a role cannot open and sends an unauthenticated request to login, and the portal sits behind it like every other route. Stage services sit under their stage; shared services (query, governance) sit under a final “Shared” heading. The page omits itself and the identity route: Dex has no account page and GitHub owns accounts, so when the issuer isgithubit links tohttps://<host>/orgs/<org>/teams(“Manage your account and teams on GitHub”) instead. -
Pods reach the issuer at its Service. The issuer’s public URL is the token’s
issand the browser’s login page; it is compared as a string. A service that validates a token fetches keys and redeems codes at theinternal_urlof theidentity.oidccontract (ADR 0014), Dex’s Service (http://dex.olf-system.svc.cluster.local:5556), over plain HTTP: the perimeter proxy, Polaris and the platform API do. Anexternalissuer has nointernal_urland is reached at its public, publicly trusted URL. Withtls: externalthe rewrite is not applied: the public name belongs to the customer’s edge, and Traefik behind it serves no TLS. The two callers below then reach the public name through the customer’s DNS and need a publicly trusted certificate; the e2e fixture keeps the rewrite, pointed at a TLS-terminating proxy that stands in for the edge. Two callers do not yet follow the contract and still call the public URL from inside the cluster, each for its own reason. OpenMetadata: its code exchange follows the discovery document, whose endpoints are public URLs, and 1.13.6’soidcClientConfighas no token-URL override. Superset: its Authlib discovery names public URLs, and moving it tointernal_urlneeds a change toimages/superset/olf_oidc.py, which the image source-drift guard (#1073) blocks until a release republishes the image (#1092). For them the local root keeps a CoreDNSrewritesending<base_domain>and every name under it to the Traefik Service, and publishes the local CA root as ConfigMapolf-local-ca(keyca.crt) inolf-systemand every stage namespace. Dex itself mounts the ConfigMap only to trust a GitHub Enterprise host (ADR 0014), which is not an issuer call. The rewrite replaces the cluster’sCorefilekey, so it is removed with the cluster.
The shape is provider-neutral. The AWS mapping (#274) is out of v0.4.
- Plain HTTP on
*.localhostis the local default:tls: none. The local provider acceptsspec.access.tls: noneonly for abase_domainending in.localhost, so a first-time user reaches every service, and tests sign-in, without trusting a certificate. Browsers resolve*.localhostto loopback and treat it as a secure context, so the perimeter cookie and the OIDC redirects work over HTTP, and Traefik’s127.0.0.1:80mapping is the only exposure. Routes and the contract usehttp://,tls_modeisnone(accepted exactly with this mode), Traefik serves thewebentrypoint with notlsblock and publishes no host port 443. cert-manager and the local CA stay deployed: the CA ConfigMap the pods mount is independent of the routes. Trino has no certificate since #983 (ADR 0016), and whether cert-manager is still needed with this mode is settled in #391;tls: externaldeploys cert-manager and the CA on the same terms (no route certificate). With this mode the CA is disposable: nothing outside the cluster trusts it and the pods mount it by path, so it is not backed up and a restore or rebuild keeps the platform’s own CA. Not for any other provider or a public domain; the validator rejects both, and public exposure (#340) must reject it too. A profile that wants browser HTTPS saystls: local-ca; the conformance profile does, so the nightly keeps exercising the TLS routes.
Consequences
Section titled “Consequences”-
olfrejects a contract whosebase_domainortlsdiffers from the resolved profile, so a contract and profile cannot silently diverge. -
Changing
base_domainchanges every user-facing URL; it is deployment configuration, not product intent, and stays out ofgovernance.yml. -
The ingress and portal add five pods to the local footprint, all in
olf-system:Pod CPU request Memory request / limit Traefik 50m 64Mi / 256Mi cert-manager controller 10m 64Mi / 256Mi cert-manager cainjector 10m 64Mi / 256Mi cert-manager webhook 10m 32Mi / 128Mi Portal (openlakeforge-portal) 5m 48Mi / 128Mi Platform API, with spec.identityonly (ADR 0021)10m 64Mi / 192Mi The platform API’s request is set from about 41 MiB resident, measured in Docker (read-only root filesystem, as
nobody, after 200 requests), not yet on kind. It answershttps://<base_domain>/api/behind the perimeter’s lowest role floor. -
Mapping 80/443 changed the kind cluster shape: an existing local cluster must be recreated (
olf infra destroythenolf infra deploy), and those host ports must be free;olf infra deploychecks both ports and the TLS mode before it creates the cluster.
History
Section titled “History”#989 renamed spec.access.issuer to spec.access.tls and added external: the customer
terminates HTTPS in front of OpenLakeForge, Traefik serves HTTP, and
shared.access.tls_mode is edge-terminated while every route URL is
https://. external is refused on *.localhost. v1alpha1 profiles that say
issuer are refused in v1beta1 (the profile migrates with olf project migrate); contracts already in state keep the old key and are
read the same way.
#990 built the local adapter for external (decisions 1, 6, 8): Traefik serves
HTTP behind the customer’s HTTPS and trusts forwarded headers only from a
range the profile names (spec.access.trusted_proxies), and every URL, callback and cookie is https://. The
end-to-end variant runs a TLS-terminating proxy in front of Traefik.
Decision 8 (#991): the perimeter proxy, Polaris and the platform API reach
Dex at its Service (internal_url) instead of through Traefik and the local
CA. OpenMetadata (1.13.6 has no token-URL override) and Superset (its image
change waits for #1092) still use the public URL, so the CoreDNS rewrite and
olf-local-ca stay until both move.
Decisions 2 and 9 (#960): Trino moved to a per-stage route with one Trino per stage (#965, built for the local root in #976). Its certificate and its Web UI’s OAuth2 sign-in were removed with its authentication (#983, ADR 0016).
The local CA is backed up only with tls: local-ca; with none it is disposable (decision 9).
tls: none became the local default; the other providers keep local-ca.
cert-manager, the CA and olf-local-ca are unchanged: they still serve Trino’s
certificate (ADR 0016), so only the routes’ scheme differs. The conformance
profile pins local-ca.
#666 added the platform API’s row to the footprint table: a path (/api) on
the portal’s host, deployed with spec.identity (ADR 0021).
The shared/identity route serves Dex since Keycloak was removed (#384, ADR 0014);
the entries below that name Keycloak describe the adapter that existed then.
#403 added decision 9 (tls: none).
New record (#264). No prior ADR covered service access. #265 added the local
Traefik/cert-manager adapter (decision 6) and fixed tls_mode’s values.
#266 added the local routes and wildcard certificates. #267 moved olf’s
clients onto the routes, added olf access trust, and lists the URLs in
olf status. #268 added the deploy preflight, the not-Ready Certificate
section in olf status, and the e2e Traefik restart and renewal drills.
#24 added the shared/identity route (auth.<base_domain>, then Keycloak, now Dex) to the
local routes; it is never behind the perimeter (ADR 0014). Decision 8 (in-cluster
resolution of the routes and the CA ConfigMap) was added with it.
#330 added the portal (decisions 2, 3, 4, 6 and 7): the apex route, its
certificate name, and the landing page; a follow-up split out the Shared
section and dropped the identity link.
The portal then moved from a BusyBox-served Terraform page to the
openlakeforge-portal image, with the GitHub teams page as its Admin link.
#176 put every route except the identity route behind the perimeter (ADR 0014
seam 3): decision 6 now renders one Ingress per namespace and access group,
and olf’s clients port-forward to a protected route instead of taking its
ingress URL (decision 5). The login callback host oauth2.<base_domain> is
answered by the proxy and is not a contract route.
#389 flattened stage hostnames to <service>-<stage>.<base_domain> (decisions 2 and
6): every namespace’s certificate is now *.<base_domain>.
The flat-hostname change also replaced the per-namespace certificates with one shared
wildcard served as Traefik’s default certificate (decision 6).
Synced from openlakeforge @ v0.6.0-alpha.3 (882b426), docs/adr/0013-service-access-and-ingress.md.