OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.13k stars 572 forks source link

SSO should not use application/json on request to JWK #28344

Closed barbj closed 1 week ago

barbj commented 1 week ago

Describe the bug
When the Content-Type of a request to a JWK endpoint is set to application/json, a server that has a JSON threat protection policy applied might reject the request.

The Content-Length of the request is 0 so the Content-Type shouldn't matter. However, such servers are still emitting errors. It is best to just have the code not set a Content-Type header at all for JWK requests.