Allow openid for integration tests - #449
Conversation
|
AI-generated review comment: This observation was produced with AI assistance and should be validated and discussed by the team before deciding on an implementation. The backend validation override alone does not make SARA usable with an arbitrary OIDC provider in local orchestration. The frontend still builds Audience and authorization claims also need an explicit contract. Different providers and test servers derive Possible directions are to expose provider-neutral authority, authorization endpoint, token endpoint, client ID, and scopes through runtime config; derive endpoints from discovery where practical; omit provider-specific parameters unless configured; and define explicit audience/role mappings for test tokens. If MSAL cannot cleanly support the desired providers, a provider-neutral OIDC browser client may be more maintainable. Please add an end-to-end authorization-code-with-PKCE test and a service-token test that verifies exact audience and required-role behavior. Scores
|
| options.Authority = authority; | ||
| options.Audience = audience; | ||
| // The mock issuer is plain HTTP on the test network. | ||
| options.RequireHttpsMetadata = false; |
There was a problem hiding this comment.
AI-generated review comment: This observation was produced with AI assistance and should be validated and discussed by the team before deciding on an implementation.
RequireHttpsMetadata is disabled for every generic provider. This is convenient for a local HTTP test issuer, but it combines provider selection with weakening the transport protection for discovery metadata and JWKS. If generic OIDC becomes usable in local, staging, or other deployments, a configuration mistake could allow signing keys to be fetched over HTTP and permit key substitution.
I recommend keeping HTTPS metadata required by default and making insecure HTTP a separate, explicit opt-in such as AllowInsecureHttpMetadata=false. Local/integration orchestration can enable that setting, while other deployments should reject it at startup. Tests should verify that HTTP metadata is rejected by default, accepted only with the explicit opt-in, and that HTTPS providers continue using strict metadata validation.
Scores
- Overall importance: 8/10
- Correctness-related: 7/10
- Security-related: 10/10
- Interoperability-related: 5/10
- Flexibility-related: 6/10
- Confidence: 9/10
|
Superseded by #456, which uses Keycloak instead of oauth2-mock-server. Leaving this open as the fallback — close it if that one lands. |
Ready for review checklist: