SCIM Test Cases
This page contains the tests that are done by Edupass for SCIM onboarding.
It should cover:
- What resources are created during the test
- What is being tested in the test
- What is expected from each request in the test
Overview
The suite runs two groups of tests against the RP's SCIM base URL:
- JWT Authentication – the RP correctly rejects invalid/missing tokens.
- SCIM Operations – the RP correctly implements User and Group CRUD, membership (including full replace), concurrency, error handling, and SCIM discovery endpoints (
ResourceTypes,ServiceProviderConfig).
Every request is authenticated with a signed Edupass JWT (issuer = the configured Edupass issuer, audience = the RP's appCode, TTL 900s), except the authentication tests which deliberately send missing/invalid tokens.
Group and Group-membership tests only run if the RP exposes the Group schema at GET /Schemas.
Resources created during the test
All test resources use fixed identifiers so they are recognisable in RP logs. Every resource is deleted before the run finishes (nothing should persist if the run completes). The suite also pre-cleans these identifiers before it starts, so a previous interrupted run cannot block the next one.
<APPCODE> is the RP's app code (e.g. RBS).
Request payloads
The exact request bodies sent when creating each resource. Which optional fields appear depends on what the RP advertises at GET /Schemas – fields the RP does not declare are omitted. The bodies below show the full schema variant (core User schema plus the Edupass User extension).
User 1 – POST /Users
User 2 – POST /Users
The concurrent-duplicate user (999900000099) uses an identical body to User 1 with userName / externalId set to 999900000099.
Group – POST /Groups
1. JWT Authentication tests
Each test calls GET /Users with a different token. All are expected to return HTTP 401.
2. SCIM Operation tests
Tests are run in the order below. All tests are run if possible.
Setup
GET /Schemas– read advertised schemas; determines whether Group tests run.GET /ResourceTypes– read the resource types the RP advertises; expectUserpresent (andGroupif the Group schema is exposed).GET /ServiceProviderConfig– read the RP’s service provider configuration; expectpatch.supported == true.- Pre-clean – for each fixed identifier,
GETbyuserName/displayNameandDELETEany match left over from a prior run.
Test 1a – Concurrent duplicate user
- Two simultaneous
POST /Usersfor user999900000099(identical body). - Expected: exactly one succeeds (2xx) and one returns 409 Conflict. Not both success (duplicate accepted); not both failed.
- Cleanup:
DELETE /Users/{id}for whichever succeeded.
This tests whether the RP’s server is safe under concurrent / duplicate requests, which may occur in the event of network retries or issues.
Test 1 – Create User
POST /Usersfor999900000001→ expect 2xx.POST /Usersfor999900000002→ expect 2xx.GET /Users?filter=userName eq "999900000001"→ expect exactly 1 result with matchingexternalId.- Same GET for
999900000002.
Test 2 – Update User
PUT /Users/{user1Id}setting the full name to "Test User 001 Updated" → expect 2xx.GET /Users/{user1Id}→ expectname.formatted == "Test User 001 Updated".
This is not run if the user was not found by GET /Users?filter=userName eq "999900000001" above.
Test 2a – Patch User
PATCH /Users/{user1Id}withop: replace,path: name.formatted, value "Test User 001 Patched" → expect 2xx/204.GET /Users/{user1Id}→ expectname.formatted == "Test User 001 Patched".
Test 2b – Get non-existent User
GET /Users/non-existent-user-id→ expect 404.
Test 2c – Update non-existent User
PUT /Users/non-existent-user-id→ expect 404.
The following group tests only run if the RP exposes the Group schema:
Test 3a – Concurrent duplicate group
- Two simultaneous
POST /GroupsforX_<APPCODE>_DUP. - Expected: exactly one 2xx and one 409. Cleanup: delete the winner.
Test 3 – Create Group
POST /GroupsforX_<APPCODE>_TEST1andX_<APPCODE>_TEST2→ expect 2xx each.GET /Groups?filter=displayName eq "..."for each → expect exactly 1 result with matchingexternalId.
Test 3b – Get non-existent Group
GET /Groups/non-existent-group-id→ expect 404.
Test 3c – Update memberships for non-existent Group
PATCH /Groups/non-existent-group-id(add member) → expect 404.
Test 4 – Add Group membership
PATCH /Groups/{group1Id}withop: add,path: members, adding both users → expect 2xx.- Verified bidirectionally via
GETon each user and the group:- Each user's
groupsarray containsgroup1Id. - The group's
membersarray contains bothuser1Idanduser2Id.
- Each user's
Test 5 – Remove Group membership
PATCH /Groups/{group1Id}withop: remove,path: members[value eq "{user1Id}"](remove user 1 only) → expect 2xx.- Expected: user 1 no longer in group and no longer in
members; user 2 still in group and still inmembers(removing one member must not drop the other). - Then
PATCHremove user 2 → expect 2xx (cleanup).
Test 5a – Replace Group membership (full replace)
PATCH /Groups/{group2Id}withop: replace,path: members, setting the full member list to[user1Id, user2Id]in one call → expect 2xx/204.- Expected:
GET /Groups/{group2Id}shows exactly user 1 and user 2 as members (group 2 had no members beforehand – this is a full replace, not an incremental add). PATCH /Groups/{group2Id}withop: replace,path: members, value[]→ expect 2xx/204.- Expected:
GET /Groups/{group2Id}shows an emptymemberslist – confirms areplacecan clear membership.
Test 6 – Delete Group
DELETE /Groups/{group1Id}→ expect 2xx.GET /Groups→ expect group 1 absent, group 2 still present.DELETE /Groups/{group2Id}→ expect 2xx.
Test 7 – Delete User (Runs at the end)
DELETE /Users/{user1Id}→ expect 2xx.GET /Users→ expect user 1 absent, user 2 still present.DELETE /Users/{user2Id}→ expect 2xx.