You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merged PR 10182: Don't resolve jku claim by default
Don't resolve jku claim by default
----
#### AI-Generated Description
This pull request introduces the following changes:
- It adds a new constructor for the `SignedHttpRequestHandler` class that sets the default timeout for the internal HTTP client to 10 seconds.
- It adds a new unit test for the `SignedHttpRequestHandler` constructor in the `SignedHttpRequestUtilityTests` class.
- It changes the visibility of the `_defaultHttpClient` field in the `SignedHttpRequestHandler` class from private to internal, presumably for testing purposes.
- It adds a new validation logic for the `jku` claim in the `SignedHttpRequestHandler` class, which checks if resolving a PoP key from the `jku` claim is allowed and if the `jku` claim value belongs to a trusted domain.
- It adds several new unit tests for the `jku` claim validation logic in the `PopKeyResolvingTests` class.
- It adds two new properties to the `SignedHttpRequestValidationParameters` class: `AllowResolvingPopKeyFromJku` and `AllowedDomainsForJkuRetrieval`, which control the behavior of the `jku` claim validation.
- It adds two new constants to the `ResolvePopKeyTheoryData` class: `_defaultJkuUri` and `_defaultJkuDomain`, which are used in the unit tests for the `jku` claim validation.
Copy file name to clipboardExpand all lines: src/Microsoft.IdentityModel.Protocols.SignedHttpRequest/LogMessages.cs
+2
Original file line number
Diff line number
Diff line change
@@ -46,5 +46,7 @@ internal static class LogMessages
46
46
publicconststringIDX23034="IDX23034: Signed http request signature validation failed. SignedHttpRequest: '{0}'";
47
47
publicconststringIDX23035="IDX23035: Unable to resolve a PoP key from the 'jku' claim. Multiple keys are found in the referenced JWK Set document and the 'cnf' claim doesn't contain a 'kid' value.";
48
48
publicconststringIDX23036="IDX23036: Signed http request nonce validation failed. Exceptions caught: '{0}'.";
49
+
publicconststringIDX23037="IDX23037: Resolving a PoP key from the 'jku' claim is not allowed. To allow it, set AllowResolvingPopKeyFromJku property on SignedHttpRequestValidationParameters to true and provide a list of trusted domains via AllowedDomainsForJkuRetrieval.";
50
+
publicconststringIDX23038="IDX23038: Resolving a PoP key from the 'jku' claim is not allowed as '{0}' is not present in the list of allowed domains for 'jku' retrieval: '{1}'. If '{0}' belongs to a trusted domain, add it to AllowedDomainsForJkuRetrieval property on SignedHttpRequestValidationParameters.";
0 commit comments