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

[Satosa] Richiesta chiarimento identificazione flusso same device vs cross device #268

Open
Zicchio opened this issue Sep 13, 2024 · 0 comments
Assignees
Labels
help wanted Need help to resolve this
Milestone

Comments

@Zicchio
Copy link
Collaborator

Zicchio commented Sep 13, 2024

Quando il satosa backend deve provare a distinguere tra flusso cross device e same device, nel pre-auth endpoint fa questa cosa
(1)

if is_smartphone(context.http_headers.get('HTTP_USER_AGENT')):
# Same Device flow
res_url = f'{self.config["authorization"]["url_scheme"]}://authorize?{url_params}'
return Redirect(res_url)
# Cross Device flow
res_url = f'{self.client_id}?{url_params}'

mentre nel response endpoint si fa questa cosa
(2)
if stored_session['session_id'] == context.state["SESSION_ID"]:
# Same device flow
cb_redirect_uri = f"{self.registered_get_response_endpoint}?response_code={response_code}"
return JsonResponse({"redirect_uri": cb_redirect_uri}, status="200")
else:
# Cross device flow
return JsonResponse({"status": "OK"}, status="200")

Mi chiedo:
a. C'è un motivo per la quale le due strategie son diverse? Non si potrebbe usare il metodo (1) in entrambi gli endpoint?
b. Come fa (2) a funzionare? Se non ho capito male, (2) verifica che l'ID di sessione di satosa di inizio autenticazione (sessione aperta con il browser e recuperabile dai cookie) sia uguale alla sessione della chiamata HTTP della wallet instance (chiamata proveniente da un backend) ma mi verrebbe da dire che queste due sessioni sono sempre diverse (sia cross device che same device). È così? Purtoppo non mi viene in mente un metodo per verificare questa ipotesi.

@peppelinux tu sai qualcosa in merito?

@Zicchio Zicchio added the help wanted Need help to resolve this label Sep 13, 2024
@peppelinux peppelinux added this to the 0.9.1 milestone Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need help to resolve this
Projects
Status: Todo
Development

No branches or pull requests

2 participants