Skip to content

Conversation

@rhysyngsun
Copy link
Contributor

@rhysyngsun rhysyngsun commented Jan 23, 2025

What are the relevant tickets?

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

Description (What does it do?)

This adds functionality to expose a /Bulk endpoint per the SCIM specification. This is implemented by internally using Django's url dispatcher to determine which view will get called for a given batch operation, calling that view, and then generating an appropriate result given the response.

Additionally, I had to patch the upstream scim_filter_parser transpiler implementation because the way they implemented variable substitution it maxed out at 26 variables (which mean a max of 26 filters), so when the SCIM plugin was calling the search endpoint trying to find more than 26 users by email it was throwing an error. I fixed this by converting the index to a base26 string. You can see the upstream implementation here. I'll probably look into upstreaming this but this work has taken long enough to just get to the point of being reviewable I don't want to be blocked on that.

How can this be tested?

Follow the setup instructions in scim/README.md. The synchronization should succeed without error.

@rhysyngsun rhysyngsun force-pushed the nl/scim-bulk-endpoint branch 3 times, most recently from 887794d to 333d675 Compare January 29, 2025 21:42
@rhysyngsun rhysyngsun force-pushed the nl/scim-bulk-endpoint branch 3 times, most recently from 8dbefe1 to 701de48 Compare February 4, 2025 19:56
@rhysyngsun rhysyngsun changed the title First pass on scim /Bulk API SCIM /Bulk API Feb 4, 2025
@rhysyngsun rhysyngsun force-pushed the nl/scim-bulk-endpoint branch from 67bbf17 to eba00f9 Compare February 4, 2025 21:16
@rhysyngsun rhysyngsun marked this pull request as ready for review February 4, 2025 21:16
@rhysyngsun rhysyngsun added the Needs Review An open Pull Request that is ready for review label Feb 4, 2025
@rhysyngsun rhysyngsun force-pushed the nl/scim-bulk-endpoint branch 3 times, most recently from efda53d to 966cfdf Compare February 4, 2025 22:44
Copy link

@cp-at-mit cp-at-mit left a comment

Choose a reason for hiding this comment

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

Nice

@cp-at-mit cp-at-mit removed the Needs Review An open Pull Request that is ready for review label Feb 6, 2025
@rhysyngsun rhysyngsun force-pushed the nl/scim-bulk-endpoint branch from 286b8a6 to e9dcc9a Compare February 6, 2025 20:57
@rhysyngsun rhysyngsun force-pushed the nl/scim-bulk-endpoint branch from e9dcc9a to b3a8f9a Compare February 6, 2025 21:22
@rhysyngsun rhysyngsun merged commit 73ec984 into main Feb 6, 2025
11 checks passed
@rhysyngsun rhysyngsun deleted the nl/scim-bulk-endpoint branch February 6, 2025 22:27
@odlbot odlbot mentioned this pull request Feb 10, 2025
12 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.

3 participants