simplesamlphp / simplesamlphp/simplesamlphp-module-radius
RADIUS authentication is retried at secondary server even if first server returned Auth Failure
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- PHP
- Estrelas
- 2
- Forks
- 2
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece por src/Auth/Source/Radius.php por volta da linha 167 e inspecione os caminhos de retorno referenciados em src/Radius.php de dapphp/radius por volta da linha 1752. Confirme como as falhas de autenticação e os erros de protocolo são representados e, em seguida, adicione cobertura mostrando que uma negação primária confirmada não é repetida, enquanto um erro ainda pode acionar o failover.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- php
- Domínio
- authentication, backend
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 55/100