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

Replace django-scim2 filtering code #2049

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Replace django-scim2 filtering code #2049

merged 1 commit into from
Feb 19, 2025

Conversation

rhysyngsun
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/6730

Description (What does it do?)

The django-scim2 library has a bug where it can't handle more than some arbitrary number of filters in the same search request. It errors in their parser because it ends up deeply recursing until it hits a RecursionError. This PR implements replacement parsing code that avoids the recursion. It includes code that maps these filters to a django query, however I have not done a full implementation of this but for now just implemented what we need to scim-for-keycloak to be functional with large (1000) batches.

How can this be tested?

You can checkout this branch and perform a sync from Keycloak. Be sure to select "email" for the user attribute and "search/bulk" as the strategy. It should succeed with no errors.

@rhysyngsun rhysyngsun added the Needs Review An open Pull Request that is ready for review label Feb 14, 2025
@cp-at-mit cp-at-mit self-assigned this Feb 18, 2025
@cp-at-mit cp-at-mit removed the Needs Review An open Pull Request that is ready for review label Feb 18, 2025
@rhysyngsun rhysyngsun merged commit 5a85eed into main Feb 19, 2025
11 checks passed
@rhysyngsun rhysyngsun deleted the nl/scim-search branch February 19, 2025 16:11
@odlbot odlbot mentioned this pull request Feb 19, 2025
14 tasks
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