-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/webapi/ping
calls upstream dependencies on every request
#44121
Comments
I reckon that the simplest way to fix this would be to add a parameter to the proxy |
nklaassen
added a commit
that referenced
this issue
Apr 5, 2025
`/webapi/ping` and `/web/config.js` will currently try to fetch SAML metadata from an entity descriptor URL if one is configured. This can break these endpoints if the IdP goes down or has network issues. To make matters worse, we use the default HTTP client with no timeout on the request. This PR updates the ping and config.js to avoid fetching SAML metadata over the network and adds a timeout to the request when we do fetch the metadata. Closes #44121
nklaassen
added a commit
that referenced
this issue
Apr 5, 2025
`/webapi/ping` and `/web/config.js` will currently try to fetch SAML metadata from an entity descriptor URL if one is configured. This can break these endpoints if the IdP goes down or has network issues. To make matters worse, we use the default HTTP client with no timeout on the request. This PR updates the ping and config.js to avoid fetching SAML metadata over the network and adds a timeout to the request when we do fetch the metadata. Closes #44121
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 9, 2025
`/webapi/ping` and `/web/config.js` will currently try to fetch SAML metadata from an entity descriptor URL if one is configured. This can break these endpoints if the IdP goes down or has network issues. To make matters worse, we use the default HTTP client with no timeout on the request. This PR updates the ping and config.js to avoid fetching SAML metadata over the network and adds a timeout to the request when we do fetch the metadata. Closes #44121
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Calls to
/webapi/ping
endpoint do not depend on successful calls to third party dependenciesCurrent behavior
Successful response from
/webapi/ping
endpoint depends on successful response from configured SAML Provider.As result, any issues or slowness on the SAML Provider's side are causing failures or long response time on
/webapi/ping
as well.This is happening because
ValidateSAMLConnector
is called, which useshttp.Get(sc.GetEntityDescriptorURL())
. Because default default http client is used, it also has no client timeout set on the request, so it will wait for the response indefinitely.teleport/lib/services/saml.go
Lines 44 to 56 in fc3a7d9
Bug details
Teleport version - 15.4.7
Recreation steps
We noticed this issue, because our external healthcheck (which is configured test against
/webapi/ping
) was randomly failing with timeout from time to time. Debugging led to the conclusion that requests hang because of slow responses from the SAML provider.Debug logs
Every request to
/webapi/ping
endpoint produces log entry liketeleport/lib/services/saml.go
Line 66 in fc3a7d9
The text was updated successfully, but these errors were encountered: