Changes in Authentication Requirement for Readiness Endpoint in v0.11.0 Upgrade

Original Slack Thread

My team is upgrading to v0.11.0 and we have found that the readiness endpoint (/health/check/ready) now requires authentication. However health endpoint doesn’t.
Is that expected behavior?

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 401 Unauthorized to perform this action.</title>
<body><h2>HTTP ERROR 401 Unauthorized to perform this action.</h2>
<tr><th>MESSAGE:</th><td>Unauthorized to perform this action.</td></tr>
&lt;hr/&gt;&lt;a href="<>"&gt;Powered by Jetty:// 9.4.46.v20220331&lt;/a&gt;&lt;hr/&gt;

$ curl --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.....FpZJ23BEIILrDOseYGd7qxckaMxe9t1poQHIykq-zYw' <http://demo-datahub-gms:8080/health/check/ready>
$ curl -vvv <http://demo-datahub-gms:8080/health>
*   Trying
* Connected to demo-datahub-gms ( port 8080
&gt; GET /health HTTP/1.1
&gt; Host: demo-datahub-gms:8080
&gt; User-Agent: curl/8.4.0
&gt; Accept: */*
&lt; HTTP/1.1 200 OK
&lt; Date: Thu, 19 Oct 2023 14:07:20 GMT
&lt; Content-Length: 0
&lt; Server: Jetty(9.4.46.v20220331)
* Connection #0 to host demo-datahub-gms left intact
demo-datahub-gms-95cf697f8-cskr7:/$ ```

Hey Sergio! <@U03MF8MU5P0> might be able to help you here

I see that it is because the

endpoint is part of the OpenAPI stack and not a standalone servlet. The standalone servlet only serves the health check and doesn’t include the AuthorizationFilter. That part is by design so that load balancers, both external and internal to k8, can check the status. I think that the AuthenticationFilter needs some updates to allow specific endpoints unauthenticated since this/health/check/ready endpoint doesn’t seem to return any sensitive data.

> is by design so that load balancers, both external and internal to k8, can check the status
We were using /health for liveness probe and /health/check/ready for rediness probe in k8s.
Although adding the required authentication for the rediness probe is possible, now we are using /health for both, until fixed.

Just created the bug so you can keep track of this

Thanks David and Maggie!

<@U027ZS25RFS> how did you override readiness probe effectively as it’s not supported by values :confused:

i’m facing the same issue!

You can’t overwrite, instead you need to fix in the deployment template here|[…]/charts/datahub/subcharts/datahub-gms/templates/deployment.yaml

I’ve reverted the template to use the old health check endpoint