simplesamlphp / simplesamlphp/simplesamlphp-module-radius
RADIUS authentication is retried at secondary server even if first server returned Auth Failure
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- PHP
- Estrellas
- 2
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
We have configured two RADIUS servers for failover. Recently, I noticed that failed authentications from the primary are immediately re-asked at the secondary server (which still generates and Auth failure, so the end result is consistent and no harm done).
But there's really no point in asking the failover server if the primary is sure that the auth failed.
Looking at the code, I found a logic error here:
The code considers the RADIUS query successful only if it returns not-false.
The underlying library returns sth not-false only in case the authentication succeeded. Notably, a failed authentication is as "false" as a protocol error. See the return paths of its function: they are either outright "false" or compare whether the authentication was a success:
https://github.com/dapphp/radius/blob/master/src/Radius.php#L1752
I.e. error conditions and a negative outcome both have the same result; and the calling module in SSP will loop over all configured servers in both cases. Only a positive result breaks out of the loop.
Ideally, a confirmed negative result from the primary authentication server should be taken as-is.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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.
Línea de trabajo
Comience con src/Auth/Source/Radius.php alrededor de la línea 167 e inspeccione las rutas de retorno referenciadas en src/Radius.php de dapphp/radius alrededor de la línea 1752. Confirme cómo se representan los fallos de autenticación y los errores de protocolo, y después añada cobertura que demuestre que una denegación primaria confirmada no se reintenta, mientras que un error todavía puede provocar un failover.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php
- Área
- authentication, backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 55/100