Skip to content

Local dev: allow http OIDC authority + local compose - #297

Open
xiduzo wants to merge 1 commit into
mainfrom
feat/local-dev-stack
Open

Local dev: allow http OIDC authority + local compose#297
xiduzo wants to merge 1 commit into
mainfrom
feat/local-dev-stack

Conversation

@xiduzo

@xiduzo xiduzo commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What

Adds local-development support so the ODPC server can boot and be exercised outside a fully-provisioned OIDC environment.

  • ODPC.Server/Authentication/AuthenticationExtensions.cs — new OIDC_REQUIRE_HTTPS env toggle. Defaults to requiring HTTPS metadata (unchanged production behaviour); set OIDC_REQUIRE_HTTPS=false to allow an http:// OIDC authority.
  • docker-compose.local.yml (new) — placeholder OIDC_* values so the server starts and serves the SPA.

Why

The demo compose expects a real OpenID Connect IdP (via user-secrets / Azure AD), so the server would not boot locally. During the integrated-stack / E2E work we run against a local Keycloak on plain http://, which the OIDC middleware rejects by default (RequireHttpsMetadata=true). The env toggle lets local/CI point at a local Keycloak without weakening the production default; the compose override supplies bootable placeholder config.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xiduzo
xiduzo requested a review from felixcicatt August 10, 2026 20:09
options.Authority = authOptions.Authority;
// Local/dev only: allow an http OIDC authority (e.g. a local Keycloak).
// Defaults to requiring HTTPS; set OIDC_REQUIRE_HTTPS=false to relax.
options.RequireHttpsMetadata =

@felixcicatt felixcicatt Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather follow the approach we use for the other properties: get the value from configuration in Program.cs, pass it on here. We do the same in PABC:
https://github.com/Platform-Autorisatie-Beheer-Component/PABC-API/blob/08bd25888f7256175ad19fd1111137a0687e49ff/PABC.Server/Program.cs#L52

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants