Skip to content

Update IdP Group Sync#478

Merged
danciaclara merged 3 commits into
masterfrom
update-idp-group-sync
Jul 23, 2026
Merged

Update IdP Group Sync#478
danciaclara merged 3 commits into
masterfrom
update-idp-group-sync

Conversation

@danciaclara

@danciaclara danciaclara commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • Documentation
    • Expanded group synchronization guidance to cover IdP-based workspace roles, project access (including all projects), and private collection access.
    • Added setup and configuration details for sync-on-login and scheduled/offline synchronization, including key options and provider-specific behavior.
    • Clarified access resolution order, mapping types, revocation sequence when auto-removal is enabled, and documented safeguards (including last-admin protection and guest/admin mapping rules).
    • Refreshed availability details and common use cases for supported editions.

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 23, 2026 5:57am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7266d70b-e849-4dd8-9102-a6115c7ba02c

📥 Commits

Reviewing files that changed from the base of the PR and between e20e60c and 66be8e2.

📒 Files selected for processing (1)
  • docs/authentication/group-sync.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/authentication/group-sync.md

📝 Walkthrough

Walkthrough

The Group Sync guide now covers IdP-based workspace role provisioning, project access, and private collection access, with updated provider support, configuration options, mapping workflows, synchronization behavior, revocation rules, safeguards, and use cases.

Changes

IdP Group Sync

Layer / File(s) Summary
Provider scope and prerequisites
docs/authentication/group-sync.md
Updates page metadata, supported editions and providers, synchronization constraints, and group-claim prerequisites.
Sync configuration
docs/authentication/group-sync.md
Documents sync-on-login, offline sync limitations, automatic removal, group attributes, and default workspace roles.
Access mappings and sync behavior
docs/authentication/group-sync.md
Adds workspace role, project role, and private collection mappings, plus synchronization ordering, revocation behavior, safeguards, and expanded use cases.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pablohashescobar

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: broader IdP Group Sync documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-idp-group-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/authentication/group-sync.md`:
- Line 142: Update the Contractor offboarding documentation to remove the
promise of immediate access revocation and state that revocation occurs at the
next SAML login or OIDC/LDAP scheduled sync.
- Line 57: Update both the Auto remove entry and its corresponding later rule in
group-sync documentation to state that removal revokes access granted by each
group mapping when that mapping no longer matches, including workspace, project,
and private-collection access. Ensure the wording no longer implies removal
happens only when no group matches.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6855590d-4d34-41e8-966a-230b669933dd

📥 Commits

Reviewing files that changed from the base of the PR and between ddd4dce and 38f65f5.

📒 Files selected for processing (1)
  • docs/authentication/group-sync.md

Comment thread docs/authentication/group-sync.md Outdated
| --- | --- | --- |
| **Sync on login** | Update the user's group membership and access when they sign in | Enabled |
| **Offline sync** | Run a sync every six hours automatically, without waiting for users to log in (OIDC and LDAP only) | Disabled |
| **Auto remove** | Remove users from the workspace and projects when no group matches | Disabled |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify Auto remove scope and semantics.

The description omits private collection access and says removal occurs only when “no group matches,” while the later rules revoke group-synced access when any mapping no longer matches. Update both entries to describe per-mapping revocation across workspace, project, and private-collection access.

Also applies to: 109-109

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/authentication/group-sync.md` at line 57, Update both the Auto remove
entry and its corresponding later rule in group-sync documentation to state that
removal revokes access granted by each group mapping when that mapping no longer
matches, including workspace, project, and private-collection access. Ensure the
wording no longer implies removal happens only when no group matches.

Comment thread docs/authentication/group-sync.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/authentication/group-sync.md (1)

8-12: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify why IdP Group Sync is tagged as Enterprise Grid.

The availability notes state this is supported on self-hosted Commercial and Airgapped Editions, but the badge labels it as “Enterprise Grid”. Align the badge text with the availability text or add a short clarification if Enterprise Grid is a prerequisite/scope, not the edition.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/authentication/group-sync.md` around lines 8 - 12, Update the IdP Group
Sync heading badge and availability note so they describe the same supported
scope; either change the “Enterprise Grid” badge to match the self-hosted
Commercial and Airgapped Editions, or add a concise clarification explaining
Enterprise Grid’s prerequisite or scope.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/authentication/group-sync.md`:
- Around line 8-12: Update the IdP Group Sync heading badge and availability
note so they describe the same supported scope; either change the “Enterprise
Grid” badge to match the self-hosted Commercial and Airgapped Editions, or add a
concise clarification explaining Enterprise Grid’s prerequisite or scope.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d13a7586-0985-493c-a5c4-a80fc5ab4b8e

📥 Commits

Reviewing files that changed from the base of the PR and between 38f65f5 and e20e60c.

📒 Files selected for processing (1)
  • docs/authentication/group-sync.md

@pablohashescobar

Copy link
Copy Markdown
Member

Reviewed the rewrite against the current backend implementation (apps/api/plane/authentication/group_sync/). The provider matrix, mapping types, settings defaults, application order, and the safeguards all check out — and it correctly retires the old "OIDC-only" and "never removed from the workspace" claims. 👍

A few things to correct before merge:

1. Offline sync interval is every 2 hours, not "every six hours" (appears in the Offline-sync settings-table row and the "What happens on sync" text).

The actual beat schedule is every 2 hours:

# apps/api/plane/celery.py:169-173
# IdP group sync - runs every 2 hours
"sync-idp-groups-offline": {
    "task": "...group_sync_task.sync_idp_groups_offline",
    "schedule": crontab(hour="*/2", minute=10),  # Every 2 hours at minute 10
},

Heads-up: the "6 hours" almost certainly came from a stale code commentapps/api/plane/authentication/models/group_sync.py:31 still says # Run a sync job every 6 hrs ..., which disagrees with the schedule above. So the doc should say "every 2 hours", and someone should fix that model comment too (or, if 6h was the intended cadence, the celery.py schedule is the real bug). Might be worth confirming the intended cadence with the backend team before finalizing the number.

2. Revocation order is stated backwards. The doc says access is revoked "in this order: private collections, projects, and finally the workspace", but the code revokes projects → private collections → workspace:

# apps/api/plane/authentication/group_sync/service.py:208-217
for project_id in current_synced:            # projects first
    ...
for collection_id in current_synced_collections:  # then collections
    ...
if self._remove_from_workspace(...):         # workspace last

Workspace-last is correct; collections and projects are swapped. It's within a single atomic transaction so the outcome is identical, but the stated order is wrong — suggest "projects, then private collections, then the workspace" (or just "…removing workspace membership last").

3. Minor / for the backend team, not necessarily this PR: the line "A workspace guest cannot be granted a project Admin role through a mapping" is true on the initial-add path (the guest ceiling is enforced at service.py:986), but the group-synced role-update path (service.py:946-971) sets the role without re-applying that ceiling. So the unconditional wording slightly overstates the guarantee. Happy to file a separate backend issue for that — no need to block the docs on it.

Everything else looks accurate. Nice cleanup overall.

@danciaclara
danciaclara merged commit 4a17e10 into master Jul 23, 2026
5 checks passed
@danciaclara
danciaclara deleted the update-idp-group-sync branch July 23, 2026 06:01
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