Skip to content

Add tests for IdentityLinker#process_ial logic#10644

Merged
jmhooper merged 1 commit intomainfrom
jmhooper-add-process-ial-tests
May 17, 2024
Merged

Add tests for IdentityLinker#process_ial logic#10644
jmhooper merged 1 commit intomainfrom
jmhooper-add-process-ial-tests

Conversation

@jmhooper
Copy link
Contributor

@jmhooper jmhooper commented May 16, 2024

The IdentityLinker seems to be setting the following attributes on ServiceProviderIdentities for reporting purposes:

  • last_ial2_authenticated_at
  • last_ial1_authenticated_at
  • verified_at

These fields seems to be queried for a number of reports and aren't used by any business logic in the IdP.

This behavior is untested without this commit. You could remove this entire method and the test suite would still be green. This commit tests the current behavior. The current behavior does not appear to account for a number of edge cases e.g. users who sign in with IALMax or users who are signing into multiple service providers. This commit addresses none of those edge cases because I do not understand the ramifications of addressing those edge cases for our reporting.

The `IdentityLinker` seems to be setting the following attributes on `ServiceProviderIdentities` for reporting purposes:

- `last_ial2_authenticated_at`
- `last_ial1_authenticated_at`
- `verified_at`

These fields seems to be queried for a number of reports and aren't used by any business logic in the IdP.

This behavior is currently untested. You could remove this entire method and the test suite would still be green. This commit tests the current behavior. The current behavior does not appear to account for a number of edge cases e.g. users who sign in with IALMax or users who are signing into multiple service providers. This commit addresses none of those edge cases because I do not understand the ramifications of addressing those edge cases for our reporting.

[skip changelog]
@jmhooper jmhooper requested review from a team, Sgtpluck and zachmargolis May 16, 2024 18:48
@jmhooper jmhooper changed the title Add tests for IdentityLinker#process_ial logic Add tests for IdentityLinker#process_ial logic May 16, 2024
@jmhooper jmhooper merged commit 7ec7182 into main May 17, 2024
@jmhooper jmhooper deleted the jmhooper-add-process-ial-tests branch May 17, 2024 13:41
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding tests to this code!

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.

3 participants