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

feat: cross device integration test #259

Merged
merged 5 commits into from
Sep 6, 2024

Conversation

Zicchio
Copy link
Collaborator

@Zicchio Zicchio commented Sep 2, 2024

This includes an initial implementation of cross device test, which closes #247

This is a brief description of the proposed solution:

  1. overall approach is similar to same device test
  2. cookies and responses are updated to reflect the expectations of the cross device flow
  3. after each authentication step in the flow, a second request.Session check(s) that the status endpoint yields the expected status code and message

Step 3 is non trivial as it requires obtaining somehow the status endpoint and its query parameters. This is done by parsing the Qr code page (pre authn endpoint), which is, frankly put, bad design... but I can't think of a better solution. Alternatives and proposals are welcomed
https://github.com/Zicchio/eudi-wallet-it-python/blob/bcd4593cf69070a649ba8573c407bc111a6e7628/example/satosa/integration_test/cross_device_integration_test.py#L46-L57

This is NOT in scope of this PR:

  1. unified design/code for both tests; a minor refactoring that involves the same device flow should follow this PR; this was not done here in order to minimize possible conflicts with other concurrent PRs that are validated with the same device flow (paraphrasing: by design there are no changes to https://github.com/Zicchio/eudi-wallet-it-python/blob/bcd4593cf69070a649ba8573c407bc111a6e7628/example/satosa/integration_test/main.py).
  2. possible invocation with an automated testing tool
  3. integration of the test in the CI pippeline (afaik same device flow is also not involved in the CI pipeline)

@Zicchio Zicchio requested a review from peppelinux September 2, 2024 12:24
@peppelinux peppelinux merged commit 28cd720 into italia:dev Sep 6, 2024
4 checks passed
@Zicchio Zicchio deleted the dev_0.9.0_cross_device_test branch September 6, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Satosa] Remote Flow integration tests are defined only for the same device flow
3 participants