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

FI-3610 Add redirect_uri config to redirect test #19

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

alisawallace
Copy link
Collaborator

@alisawallace alisawallace commented Jan 6, 2025

Summary

This PR adds a configuration for the redirect_uri to the authorization code redirect test to fix an integration bug when the redirect test is reused in another test kit.

Prior to this change, the redirect_uri in the UDAP test kit was configured at the suite level but not at the test level. When the redirect test was reused in another test kit, that test kit needed to manually configure a redirect_uri, otherwise the URI would be blank and the test failed:

image

However, even if that configuration is set in the other test kit, the redirect URI used by the authorization code redirect test must match the value submitted in the dynamic client registration test's software statement, which is the constant UDAPSecurityTestKit::UDAP_REDIRECT_URI.

Therefore, the redirect_uri path must be set and properly exported by the UDAP redirect test in order for the collective set of UDAP tests to work when imported by another test kit.

Testing Guidance

To reproduce the bug present in the latest UDAP release (0.10.2):

  1. Clone the UDAP test kit and checkout main branch, which is currently aligned with the latest release
  2. Run git rev-parse --show-toplevel in the UDAP directory to get the path to the repo for use in step 4
  3. Clone the SMART-UDAP harmonization test kit and check out the branch FI-3502-update-redirect-test, which is in a draft PR here
  4. In the SMART-UDAP test kit repo, configure a local override for the UDAP test kit gem using the path from step 2: bundle config local.udap_security_test_kit </path/to/local/git/repository>
  5. In the SMART-UDAP Gemfile, update the branch value for udap_security_test_kit to be main
  6. Run bundle install in the SMART-UDAP repo
  7. Run the SMART-UDAP test kit as usual and navigate to localhost:4567
  8. Select the SMART-UDAP test suite, then group 1.3 UDAP Authorization Code Authorization & Authentication
  9. Run test 1.3.01 Authorization server redirects client to redirect URI. Put dummy inputs for all required inputs, except the authorization endpoint, which must be a valid URI
  10. The User Action Required window should show up and indicate that it is waiting to receive a request at `` (blank URI)

To demonstrate the bug fix in this branch:

  1. In the UDAP test kit repo, checkout this branch FI-3610-redirect-config-fix
  2. In the SMART-UDAP Gemfile, update the branch value for udap_security_test_kit to be FI-3610-redirect-config-fix
  3. Repeat steps 6-8 above
  4. When the User Action Required window shows up, the redirect URI should match the value set in the UDAP test kit, where the constant UDAPSecurityTestKit::UDAP_REDIRECT_URI resolves to #{Inferno::Application['base_url']}/custom/udap_security/redirect, and the displayed value should be http://localhost:4567/custom/udap_security/redirect

@alisawallace alisawallace merged commit 40c3266 into main Jan 7, 2025
3 checks passed
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.

2 participants