simplesamlphp / simplesamlphp/simplesamlphp-module-oidc

We always throw if `id_token_hint` is missing when `post_logout_redirect_uri` is used

Aberta
#321 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

prepared
Linguagem predominante
PHP
Estrelas
50
Forks
28
Merge médio
1min
PRs com merge (30d)
2

Descrição

The spec RP-Initiated Logout https://openid.net/specs/openid-connect-rpinitiated-1_0.html says:

  1. Redirection to RP After Logout
    In some cases, the RP will request that the End-User's User Agent to be redirected back to the RP after a logout has been performed. Post-logout redirection is only done when the logout is RP-initiated, in which case the redirection target is the post_logout_redirect_uri parameter value sent by the initiating RP. An id_token_hint carring an ID Token for the RP is also RECOMMENDED when requesting post-logout redirection; if it is not supplied with post_logout_redirect_uri, the OP MUST NOT perform post-logout redirection unless the OP has other means of confirming the legitimacy of the post-logout redirection target. The OP also MUST NOT perform post-logout redirection if the post_logout_redirect_uri value supplied does not exactly match one of the previously registered post_logout_redirect_uris values. The post-logout redirection is performed after the OP has finished notifying the RPs that logged in with the OP for that End-User that they are to log out the End-User.

Currently we always throw, that is, stop the execution when id_token_hint is missing when post_logout_redirect_uri is used: https://github.com/simplesamlphp/simplesamlphp-module-oidc/blob/4c254afa8a80eb869351bc6dc161479f1f4d54a2/src/Server/RequestRules/Rules/PostLogoutRedirectUriRule.php#L59

Reading the spec, since id_token_hint is RECOMMENDED, we should not stop the execution, but simply not redirect to the post_logout_redirect_uri. We could show our own "you are logged out" page instead.

  • TODO mivanci check how conformance tests handle this situation

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece por src/Server/RequestRules/Rules/PostLogoutRedirectUriRule.php na regra vinculada e leia a seção da especificação RP-Initiated Logout sobre o redirecionamento pós-logout. Verifique como os testes de conformidade lidam com a ausência de um id_token_hint, conforme observado no TODO. Considera-se concluído quando a solicitação não é interrompida somente pela ausência do hint e o redirecionamento pós-logout é impedido, a menos que a especificação o permita.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
php
Domínio
authentication
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.