Skip to content

Stale SCIM group mapping#2235

Draft
cursor[bot] wants to merge 3 commits intomainfrom
GOVFOUN-188
Draft

Stale SCIM group mapping#2235
cursor[bot] wants to merge 3 commits intomainfrom
GOVFOUN-188

Conversation

@cursor
Copy link

@cursor cursor bot commented Feb 5, 2026

Adds a SCIM Group Cleanup utility to resolve stale externalId mappings causing Okta Push Group failures (GOVFOUN-188).

This utility addresses the root cause of Okta Push Group failures by providing a mechanism to delete and recreate groups. This action clears orphaned SCIM externalId mappings in the Keycloak backend, allowing Okta to establish a fresh, valid mapping for the group.


Open in Cursor Open in Web

This commit adds a comprehensive utility to diagnose and fix stale SCIM
group mappings that cause Okta Push Groups to fail with externalId errors.

Key features:
- Diagnostic mode to safely inspect groups and identify stale mappings
- Cleanup mode to delete and recreate groups, clearing SCIM mappings
- Automatic member backup and restoration
- Standalone executable script for easy use
- Comprehensive documentation and resolution guide

The utility specifically addresses the issue with grpAtlanProdWorkflowAdmin
on apex.atlan.com failing with:
'Unable to update group with externalId: 2ea7c8f7-7506-4b71-a53c-f307aedb647d'

Changes:
- Added new package: samples/packages/scim-group-cleanup/
- Main utility: ScimGroupCleanup.kt with diagnostic and cleanup modes
- Configuration: ScimGroupCleanupCfg.kt for flexible operation
- Standalone script: cleanup-apex-group.sh for direct execution
- Documentation: README.md, GOVFOUN-188-RESOLUTION.md, SOLUTION_SUMMARY.md
- Tests: ScimGroupCleanupTest.kt
- Updated settings.gradle.kts to include new package

The solution works by deleting the group (which removes all SCIM mappings
in Keycloak), then recreating it with the same name and members. This
allows Okta to create a fresh mapping with a new externalId.
@cursor
Copy link
Author

cursor bot commented Feb 5, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Fixed ScimGroupCleanupTest.kt to properly extend PackageTest:
- Pass required 'tag' parameter to PackageTest constructor
- Override logger with Utils.getLogger instead of KotlinLogging
- Use client property from PackageTest instead of Atlan.getDefaultClient()
- Pass configuration object to runCustomPackage instead of JSON string
- Properly reference ScimGroupCleanup::main method

These changes align with the package testing framework used by other
packages in the samples directory.
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.

1 participant