os-tailscale: pre-auth key is not used when tailscaled.state is missing or holds a stale profile
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start by reading the rc.conf.d/tailscaled logic described in the issue and compare its state-file check with the proposed tailscale status --json check after the daemon starts. Trace how service startup builds the tailscale up arguments for missing state and a logged-out profile. Done means a configured pre-auth key is used in both cases, while an already logged-in node does not reuse it.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
Since #5047, rc.conf.d/tailscaled passes --auth-key only when tailscaled.state exists and has no "_current-profile":
if [ -f /var/db/tailscale/tailscaled.state ]; then
if ! grep -q '"_current-profile"' /var/db/tailscale/tailscaled.state; then
tailscaled_up_args_ext="--auth-key=..."
fi
fi
That fixed the key being reused at boot (#4661), but leaves two cases where a valid, unused pre-auth key is never passed to tailscale up:
- No state file yet. The rc script reads its config before tailscaled creates
tailscaled.state, so the first start runstailscale upwithout--auth-key. It prints a login URL and times out ("timeout waiting for Tailscale service to enter a Running state"). A second start then passes the key and joins. - Stale profile. Removing the plugin leaves
/var/db/tailscalein place. If the node was then deleted from the tailnet, the old profile is still intailscaled.state. After reinstalling the plugin and setting a new pre-auth key, the key is never passed;tailscale statusshowsLogged out., and Services start/restart returnsError (1). Recovery needs a shell: stop tailscaled, movetailscaled.stateandprofile-dataaside, then start twice (case 1).
To Reproduce
Case 2:
- Install os-tailscale, set a pre-auth key, enable, and let the node join.
- Delete the node from the tailnet in the admin console.
- Remove the os-tailscale plugin, then install it again.
- Generate a new, unused pre-auth key, set it under VPN › Tailscale › Authentication, enable and apply.
tailscale statusshowsLogged out.; the node never joins.
Case 1:
- With tailscaled stopped, move
/var/db/tailscale/tailscaled.stateaside. - Start the service:
tailscale upruns without--auth-keyand prints a login URL. - Start it again: it joins with the configured key.
Expected behavior
When a pre-auth key is configured and tailscaled is not logged in, tailscale up uses the key. That includes a missing state file, and a profile that is logged out or whose node no longer exists. For example, decide on tailscale status --json (BackendState = NeedsLogin) after tailscaled starts, instead of grepping the state file before it starts.
Describe alternatives you considered
- Keep the grep, but also pass the key when the state file does not exist (fixes case 1 only).
- Remove
/var/db/tailscalewhen the plugin is removed, or offer a "reset node state" action (helps case 2).
Environment
OPNsense 26.1.11_10 (amd64)
os-tailscale 1.4
tailscale 1.98.5_1
- Lenguaje dominante
- PHP
- Estrellas
- 1.2k
- Forks
- 932
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de opnsense/plugins
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
www/squid: configctl proxy stop returns before Squid exits, so stop+start (e.g. Monit restart) failsAbiertosupport
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
opnsense/plugins#5983 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directivePosiblemente ocupada @fraenki la tomó hace 6 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
opnsense/plugins#5973 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Posiblemente ocupada @bringha1 la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
Todos los issues de opnsense/plugins
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#7881 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
iruzen-dono/workless#117 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
magicsunday/webtrees-docker#285 ·
Los mantenedores suelen responder en 1 día
-
Flaky browser test: AreaHeadersTest 'shows Counting on the way while deferred tab counts load'Abiertoarea/tests type/bug when/soon
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
WP-CLI 3.0 fixes the cron lock and core download bugs described in the handbookPosiblemente ocupada @mayankmajeji la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
WordPress/hosting-handbook#521 ·