Repository navigation
fix(oidc): start without the OIDC provider and retry discovery - #1866
Open
stalingino wants to merge 2 commits into
Open
stalingino wants to merge 2 commits into
stalingino wants to merge 2 commits into
Conversation
ParseableServer::start awaited OIDC discovery with `?`, so an unreachable identity provider at startup made Parseable exit. Starting Parseable before its provider (common with docker compose and Kubernetes) or a provider outage kept Parseable down entirely, including ingestion and basic-auth logins that do not need OIDC, and crash-looped it under a restart policy. A failed discovery is now logged and retried in the background with capped exponential backoff (1s doubling to 60s). Everything except OIDC login works meanwhile. Login answers 503 with a clear message while discovery is pending, instead of redirecting as if OIDC were not configured, and starts working as soon as the provider answers, with no restart.
Contributor
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
The retry task installs the client before clearing OIDC_PENDING. Reading the flag first means a login racing with recovery sees either the installed client or "pending", never a false "OIDC not configured" redirect.
Author
|
I have read the CLA Document and I hereby sign the CLA |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1863.
Description
ParseableServer::startawaited OIDC discovery with?, so an unreachable provider at startup made Parseable exit. Starting Parseable before its provider, or a provider outage, kept Parseable down entirely, including ingestion and basic-auth logins that don't need OIDC.Now:
/api/v1/o/loginreturns503with a clear message instead of redirecting as if OIDC were not configured (newOIDCError::ProviderUnavailable, tracked by anOIDC_PENDINGflag).Testing
Ran the patched binary (
local-store) withP_OIDC_ISSUERpointing at a port with nothing listening:/api/v1/liveness200; basic-auth API 200;/api/v1/o/login→503 The OIDC provider is not reachable yet; try again shortly;OIDC provider discovered; OIDC login is enabled, and/api/v1/o/loginnow returns307to Dex's/auth.Also in a docker compose stack (Parseable + Dex): restarted Parseable with Dex stopped → it stayed up (no crash loop), API 200, login 503; started Dex → login redirected to Dex without restarting Parseable.
cargo clippy --lib -- -D warningsandcargo fmt --checkare clean.This PR has:


Confidence Score: 5/5
The PR appears safe to merge.Summary
Parseable can start when OIDC discovery fails and enable OIDC login once the provider recovers.
No new actionable issues found.
Reviews (7) · Last reviewed commit: "fix(oidc): read the pending flag before ..." · Reviewed by Greptile