@@ -113,22 +113,41 @@ Then create a `.env.local` file to set secrets for your local setup.
113113
114114### OpenID Connect
115115
116- All users access is controlled by OpenID Connect. For local development you must
117- add the following to your ` .env.local ` file:
116+ All user access is controlled by OpenID Connect. Locally the login runs against a
117+ mock identity provider, defined as the ` idp ` service in ` docker-compose.override.yml `
118+ — the real provider has no redirect URI registered for a developer machine.
119+
120+ Start it with the rest of the stack:
121+
122+ ``` shell
123+ docker compose up --detach
124+ ```
125+
126+ Then log in as ` admin ` or ` editor ` : the mock shows a form where you type the subject,
127+ and hands back the claims for it. Both identities are defined in the compose file, and
128+ their claims must include ` name ` and ` upn ` , which ` AzureOIDCAuthenticator ` reads.
129+
130+ ` .env.dev ` carries the settings, so there is nothing to add to ` .env.local ` for an
131+ ordinary setup. To develop against a real provider instead, override them there:
118132
119133``` dotenv
120134###> itk-dev/openid-connect-bundle ###
121135AZURE_AZ_OIDC_METADATA_URL=<value>
122136AZURE_AZ_OIDC_CLIENT_ID=<value>
123137AZURE_AZ_OIDC_CLIENT_SECRET=<value>
124138AZURE_AZ_OIDC_REDIRECT_URI=https://itksites.local.itkdev.dk/openid-connect/generic
139+ AZURE_AZ_OIDC_ALLOW_HTTP=false
125140###< itk-dev/openid-connect-bundle ###
126141```
127142
128143> [ !NOTE]
129- > In the ` dev ` environment the main firewall security is disabled
130- > (` security.yaml ` → ` when@dev ` ), so authentication is not required.
131- > This is because the current AAK OIDC setup doesn't support ` itksites.local.itkdev.dk ` .
144+ > ` AZURE_AZ_OIDC_ALLOW_HTTP=true ` in ` .env.dev ` is what lets the application talk to
145+ > the mock over http inside the docker network. It must never be true anywhere else:
146+ > since ` itk-dev/openid-connect ` 5.1 it governs every endpoint the discovery document
147+ > announces, not only the metadata URL.
148+
149+ The mock accepts the PKCE challenge the bundle sends but does not verify it, so a
150+ successful login here does not prove PKCE works against Azure.
132151
133152### Fixtures
134153
0 commit comments