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
As it's described in the documentation, the hydrator mutator works by sending a POST request containing a JSON representation of AuthenticationSession to the URL you configure (it's also possible to customize the authentication headers if needed). However, the rest of headers to use on that POST request can't be customized.
It seems that Oathkeeper is accepting gzip-encoding but then it's unable to handle it.
Reproducing the bug
I have an Golang API that uses chi's as router and uses the "Compress" middleware (see https://github.com/go-chi/chi#core-middlewares), this middleware compress the HTTP responses using gzip when the requester adds the header Accept-Encoding: gzip. This API exposes an endpoint that accepts POST requests including a AuthenticationSession (as described in the docs).
Run Oathkeeper configuring a Hydrator mutator that uses the API mentioned above.
Test the Hydrator mutator by accessing a resources protected by Oathkeeper.
Oathkeeper is sending the POST accepting gzipped encoding, but then it's unable to decode the response (see relevant logs).
Relevant log output
{
"error": {
"message": "invalid character '\\x1f' looking for beginning of value"
},
(...)
"level": "warning",
"msg": "The mutation handler encountered an error",
"mutation_handler": "hydrator",
"reason_id": "mutation_handler_error",
(...)
}
Preflight checklist
Describe the bug
As it's described in the documentation, the hydrator mutator works by sending a POST request containing a JSON representation of AuthenticationSession to the URL you configure (it's also possible to customize the authentication headers if needed). However, the rest of headers to use on that POST request can't be customized.
It seems that Oathkeeper is accepting gzip-encoding but then it's unable to handle it.
Reproducing the bug
Accept-Encoding: gzip
. This API exposes an endpoint that accepts POST requests including a AuthenticationSession (as described in the docs).Relevant log output
Relevant configuration
Version
v0.38.25-beta.1
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
If I disable the Compress middleware in my API, it works as expected.
The text was updated successfully, but these errors were encountered: