-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Voor lokaal ontwikkelen (en voor onze integratietesten, ook op GitHub) gebruiken we een Docker Compose setup inclusief Keycloak waarbij alles op HTTP draait (en niet HTTPS). Dit omdat HTTPS in deze context alleen maar onnodige ballast en complexiteit met zich mee zou brengen.
De PABC API (vanaf versie 0.0.1-rc5) lijkt op dit moment echter te vereisen dat de connectie van de PABC naar de OIDC/OAuth provider via HTTPS loopt. Wanneer wij namelijk in onze Docker Compose omgeving een connectie gebruiken tussen de PABC en Keycloak m.b.v. deze setting:
Oidc__Authority: "http://keycloak:8080/realms/zaakafhandelcomponent/"
En vervolgens de PABC UI proberen te benaderen dan zien wij in de PABC UI enkel een generieke 500 error en in de PABC API logs:
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HNH5PHHVCKHA", Request id "0HNH5PHHVCKHA:00000001": An unhandled exception was thrown by the application.
System.InvalidOperationException: The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectPostConfigureOptions.PostConfigure(String name, OpenIdConnectOptions options)
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsMonitor`1.<>c.<Get>b__10_0(String name, IOptionsFactory`1 factory)
at Microsoft.Extensions.Options.OptionsCache`1.<>c__DisplayClass3_1`1.<GetOrAdd>b__2()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd[TArg](String name, Func`3 createOptions, TArg factoryArgument)
at Microsoft.Extensions.Options.OptionsMonitor`1.Get(String name)
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Dit is op dit moment blocking om in onze Docker Compose omgeving de nieuwe versie van de PABC te kunnen gebruiken.
Voor meer details zie: infonl/dimpact-zaakafhandelcomponent#4731