Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for multiple IDP URLs (#2500)
IMPORTANT: Merging this PR without resolving the "alg" question below. The "alg" question will potentially be resolved by a follow-up PR. - Fix #912 This modifies the experimental JWT authentication support so that multiple JWKS urls are now supported. The implementation is draft; pending a review and feedback with product. In addition to adding multiple JWKS we need to resolve the following issue: ### Not all JWKS entries contain "alg". Currently, if the router can't find "alg" in the JWKS. Then it will fail the request. The JWKS spec notes that "alg" is optional, but if we don't know what the "alg" is, then we can't decode the JWT. Here are some alternatives: - Preserve the existing behaviour (i.e. fail if "alg" isn't specified) - Look for "alg" in the JWT header and use that value if not found in JWKSs - Allow "alg" (per IDP) to be specified in configuration either as - A fallback or - An override Which of the above would users prefer? **Checklist** Complete the checklist (and note appropriate exceptions) before a final PR is raised. ~- [ ] Changes are compatible[^1]~ - [x] Documentation[^2] completed - [x] Performance impact assessed and acceptable - Tests added and passing[^3] - [x] Unit Tests ~- [ ] Integration Tests~ ~- [ ] Manual Tests~ **Exceptions** The change is to experimental configuration and not compatible. **Notes** [^1]. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]. Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]. Tick whichever testing boxes are applicable. If you are adding Manual Tests: - please document the manual testing (extensively) in the Exceptions. - please raise a separate issue to automate the test and label it (or ask for it to be labeled) as `manual test`
- Loading branch information