Skip to content
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

Headscale should retry gracefully when the OIDC provider is unavailable #1873

Open
korfuri opened this issue Apr 16, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@korfuri
Copy link

korfuri commented Apr 16, 2024

Why

In some setups, there is a cyclic dependency between headscale and its OIDC backend. This could be because e.g. the OIDC provider is located through the tailnet (e.g. the OIDC provider is configured via magicDNS). In those cases, if the system boots cold, the machine running headscale can't join the tailnet without headscale being up, and headscale can't come up without its OIDC provider, unless only_start_if_oidc_is_available is false. But setting this to false means that headscale will simply not use OIDC unless it is restarted later for some reason.

Description

When starting headscale, if only_start_if_oidc_is_available is false and the OIDC provider is not available, headscale gives up on OIDC until it is restarted. This shouldn't be the case: headscale should keep trying to connect to the OIDC backend so it is used once it becomes available.

This should probably extend to failures of the OIDC provider while serving: if the OIDC provider becomes unavailable and only_start_of_oidc_is_available is false, headscale should degrade gracefully to use non-OIDC authentication until it detects that the OIDC provider is back up.

@korfuri korfuri added the enhancement New feature or request label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant