Commit Graph

11 Commits

Author SHA1 Message Date
Sacha Al Himdani
a622c610d7 Fix SCIM bridge PUT loop and pagination
Two bugs caused SCIM sync failures:

1. buildUserPayload conditionally omitted empty fields. When a field was
   cleared in the identity provider, the PUT payload didn't include it,
   so the SCIM handler never cleared the stored value. The bridge kept
   detecting a mismatch every sync cycle, causing a perpetual PUT loop.
   Fix: always include all fields unconditionally.

2. ListUsers ignored the startIndex parameter — the cursor always started
   from nil, so every page returned the same first N users. Organizations
   with more than 100 SCIM-managed users never got a full listing; users
   beyond the first page appeared missing, causing CreateUser calls that
   failed with 409 (uniqueness conflict) and eventually disabled the
   bridge. Fix: replace cursor-based pagination with OFFSET/LIMIT to
   honor SCIM's 1-based startIndex.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-21 16:54:20 +02:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Bryan Frimin
728804b559 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 09:40:44 +01:00
Bryan Frimin
dcf81c4575 Fix SCIM bridge updating all users on every sync
The SCIM client User struct had json:"-" tags on most fields
(GivenName, FamilyName, ExternalID, Department, etc.), so
ListUsers never populated them from the JSON response. The
bridge comparison always saw empty strings on the SCIM side
vs actual values from the provider, making needsUpdate true
for every user on every sync cycle.

Add custom UnmarshalJSON on User to properly parse nested
SCIM JSON (name object, enterprise extension) into the flat
struct, so the existing diff logic correctly skips unchanged
users.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 09:40:44 +01:00
Bryan Frimin
3354bbd16b Fix mapping google workspace
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-11 13:09:03 +01:00
Bryan Frimin
f674426dfa Update Google SCIM bridge
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-11 13:09:01 +01:00
Émile Ré
c3a65c123a Sync title in SCIM and Gbridge
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-19 16:13:05 +04:00
Sacha Al Himdani
1494707cb5 Exclude users from google workspace bridge
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-10 12:42:24 +01:00
Bryan Frimin
ece54f1616 Fix golint errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 18:42:50 +01:00
Bryan Frimin
e42e6407df Fix AI review
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 09:14:39 +01:00
Bryan Frimin
3d4b215b8f Add bridge backend for sync
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 09:14:39 +01:00