Conjur Kubernetes/OpenShift Follower Operator - the /health Endpoint via curl returns "401 Unauthorized"
Question
It was observed that the Kubernetes/OpenShift Follower Operator doesn't allow users to access the /health endpoint via curl, even though it was expected to see the returned HTTP 200
curl -kv https://conjur-follower.conjur-follower.svc.cluster.local/health
* Host conjur-follower.conjur-follower.svc.cluster.local:443 was resolved.
* IPv6: (none)
* IPv4: 172.30.118.170
* Trying 172.30.118.170:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Request CERT (13):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / x25519 / RSASSA-PSS
* ALPN: server accepted http/1.1
* Server certificate:
* subject: CN=conjur-follower.conjur-follower.svc.cluster.local
* start date: Mar 20 14:22:13 2025 GMT
* expire date: Mar 18 14:22:13 2035 GMT
* issuer: O=conjur; OU=Conjur CA; CN=conjur-lb.ampm.internal
* SSL certificate verify result: self-signed certificate in certificate chain (19), continuing anyway.
* Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Connected to conjur-follower.conjur-follower.svc.cluster.local (172.30.118.170) port 443
* using HTTP/1.x
> GET /health HTTP/1.1
> Host: conjur-follower.conjur-follower.svc.cluster.local
> User-Agent: curl/8.11.0
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Fri, 18 Apr 2025 12:42:34 GMT
< Content-Type: text/plain
< Content-Length: 21
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: 4730c348-a147-453c-b0a8-6853b562c7fb
< X-Runtime: 0.000497
<
* Connection #0 to host conjur-follower.conjur-follower.svc.cluster.local left intact
Authorization missing
At the same time, the Follower status is "OK" (the /status endpoint returns "OK"), testing it using SUMMON and External Secrets Operator succeeded (secrets retrieved successfully).
On the other side, the /info endpoint returns the following data:
curl -k https://conjur-follower.conjur-follower.svc.cluster.local/info
{
"authenticators": {
"configured": [
"authn",
"authn-k8s/follower-oc123"
],
"enabled": [
"authn",
"authn-k8s/follower-oc123"
],
"installed": [
"authn",
"authn-azure",
"authn-gcp",
"authn-grpc",
"authn-iam",
"authn-jwt",
"authn-k8s",
"authn-ldap",
"authn-oidc"
]
},
"config": {
"conjur": {
"account": "conjur",
"hostname": "conjur-follower.conjur-follower.svc.cluster.local",
"master_host": "conjur-lb.ampm.internal",
"role": "follower"
}
},
"database": {
"logical_replication_status": {
"subscriptions": [
{
"name": "follower_2a50cb_conjur-follower-795f956786-jcszh",
"enabled": "true",
"received_lsn": "0/75E5F38",
"last_msg_send_time": "2025-04-18T12:43:01.939988Z",
"last_msg_receipt_time": "2025-04-18T12:43:01.940625Z",
"apply_error_count": "0",
"sync_error_count": "0",
"replication_sets": [
"default",
"full"
]
}
]
},
"ok": true
},
"feature_flags": {
"selective_replication": "enabled"
},
"release": "13.5.0",
"role": "follower",
"version": "2.5.0-655"
}Environment
Conjur
Answer
The Kubernetes/OpenShift Operator doesn't have a /health endpoint. Rather, we depend on the K8s monitoring of health probes on the internal services.
With this, the health is visible using the kubectl/oc get pod ... or kubectl/oc describe pod ... commands.
This has been true for all versions of the Kubernetes Follower.
With regards to the /info endpoint, it is implemented on the Kubernetes Follower, since its information is more about versioning and configuration.
The main distinction is that we need /health to govern the load balancer and system monitoring with the Appliance. In Kubernetes, this is handled on a per-service basis, as the Kubernetes Follower is multi-container.
This is handled with per-service health probes, rather than an overall health API.
Please also note that the /info response in the Kubernetes Follower is not identical to the Appliance /info response, because these are effectively different products providing the same Conjur API service