Hi,
We’ve been using Pomerium for a couple of years with Azure AD as the IDP. Up until recently we were running Pomerium 0.25.2 on Ubuntu 20.04. We recently updated to 0.27.2, and then replaced the VM with Ubuntu 24.04.
Since the Ubuntu update, after a few hours of use Pomerium has stopped forwarding connections. Envoy logs an “ext_authz_error” after about 10 seconds, and the browser sees an HTTP 500 error.
Here’s an example pair of logs for a single request. In the first log, from the authorize
service, it looks like the user has already authenticated. In the second log, from envoy
, the duration is ~10 sec and there’s an unspecified ext_authz_error
.
2024-11-01T13:11:26.902863+00:00 pomeriumhost pomerium[56016]: {"level":"info","service":"authorize","request-id":"fd9a7bb7-3145-4538-a66e-ef6a89a23b07","check-request-id":"fd9a7bb7-3145-4538-a66e-ef6a89a23b07","method":"GET","path":"/some/url","host":"targethost.pomerium.example.com","ip":"1.2.3.4","session-id":"e5b74232-02d3-4a8a-b238-c837bb57cb41","user":"uuid-here","email":"legituser@example.com","allow":true,"allow-why-true":["claim-ok"],"deny":false,"deny-why-false":[],"time":"2024-11-01T13:11:26Z","message":"authorize check"}
2024-11-01T13:11:37.385182+00:00 pomeriumhost pomerium[56016]: {"level":"info","service":"envoy","upstream-cluster":"","method":"GET","authority":"targerthost.pomerium.example.com","path":"/some/url","user-agent":"Mozilla/5.0 ...,"referer":"...","forwarded-for":"1.2.3.4","request-id":"fd9a7bb7-3145-4538-a66e-ef6a89a23b07","duration":10000.525646,"size":0,"response-code":500,"response-code-details":"ext_authz_error","time":"2024-11-01T13:11:37Z","message":"http-request"}
Restarting the service fixes it for another few hours.
I checked a few things:
- In tcpdump, it doesn’t look like Pomerium is contacting the IdP (Microsoft) when connections come in. I didn’t watch for very long - it’s possible it doesn’t do this on demand, or caches it, so that may also be why.
- I didn’t see any obvious failures when I ran
strace -fp
on the Pomerium process. - I didn’t see external connections stuck in SYN_SENT in
ss -ant
I think the problem is between envoy and pomerium, but am not sure how to dig deeper.
What’s your environment like?
- Pomerium version (retrieve with
pomerium --version
): 0.27.2 - Server Operating System/Architecture/Cloud: Ubuntu 24.04, amd64, Azure
What’s your config.yaml?
address: :443
authenticate_service_url: https://pomerium.example.com
autocert: true
autocert_ca: ...
autocert_eab_key_id: ...
autocert_eab_mac_key: ...
idp_provider: azure
idp_provider_url: ...
idp_client_id: ...
idp_secret_id: ...
idp_request_params:
domain_hint: example.com
routes:
# just a couple of example routes
- from: https://targethost.pomerium.example.com
to: https://internalhost:8443
preserve_host_header: true
set_request_headers:
X-Forwarded-Port: 443
policy:
- allow:
or:
- claim/groups: "uuid-here"
- from: tcp+https://targethost2.pomerium.example.com:12345
to: tcp://internalhost2:12345
policy:
- allow:
or:
- claim/groups: "uuid-here"