Skip to content

feat: add directory provisioning support for connections#1246

Merged
kushalshit27 merged 9 commits intomasterfrom
DXCDT-1298-inbound-user-directory-provisioning-support
Dec 22, 2025
Merged

feat: add directory provisioning support for connections#1246
kushalshit27 merged 9 commits intomasterfrom
DXCDT-1298-inbound-user-directory-provisioning-support

Conversation

@kushalshit27
Copy link
Contributor

@kushalshit27 kushalshit27 commented Dec 19, 2025

🔧 Changes

Add directory provisioning support for Google Workspace (google-apps) connections: schema coverage support (create/update/delete/get) for connections.

Examples

YAML format

connections:
  - name: google-workspace
    strategy: google-apps
    options:
      domain: example.com
      tenant_domain: example.com
      client_id: some_client_id
      client_secret: some_client_secret
      api_enable_users: true
    directory_provisioning_configuration:
      mapping:
        - auth0: email
          idp: mail
        - auth0: name
          idp: displayName
      synchronize_automatically: false

JSON format

{
  "name": "google-apps-directory-provisioning",
  "strategy": "google-apps",
  "enabled_clients": ["My SPA"],
  "options": {
    "domain": "example.com",
    "tenant_domain": "example.com",
    "client_id": "some_client_id",
    "client_secret": "some_client_secret",
	"api_enable_users": true
  },
  "directory_provisioning_configuration": {
    "mapping": [
      { "auth0": "email", "idp": "mail" },
      { "auth0": "name", "idp": "displayName" }
    ],
    "synchronize_automatically": false
  }
}

📚 References:

🔬 Testing

  • Added unite test for directory provisioning

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

- src/tools/auth0/handlers/connections.ts: add directory_provisioning_configuration to schema
- src/tools/auth0/handlers/connections.ts: implement methods for retrieving, creating, updating, and deleting directory provisioning configurations
- src/tools/auth0/handlers/connections.ts: process directory provisioning in connection changes
- src/tools/auth0/handlers/connections.ts: throw ManagementError instead of generic Error for better error classification
- src/tools/auth0/handlers/connections.ts: improve logging for directory provisioning fetch errors
…visioning

- src/tools/auth0/handlers/connections.ts: change error messages to use connection ID instead of name
- src/tools/auth0/handlers/scimHandler.ts: remove directory_provisioning_configuration from bodyParams
- docs/resource-specific-documentation.md: document directory provisioning for Google Workspace connections
- examples/directory/connections/google-apps.json: add example configuration for Google Workspace directory provisioning
- examples/yaml/tenant.yaml: include Google Workspace connection in tenant YAML configuration
- src/tools/auth0/handlers/connections.ts: implement directory provisioning create, update, and delete operations
- test/tools/auth0/handlers/connections.tests.js: add tests for directory provisioning configuration handling
- test/tools/auth0/handlers/scimHandler.tests.js: ensure directory provisioning configuration is removed before updating connection
- src/tools/auth0/handlers/connections.ts: improve error handling for directory provisioning and add debug logs for create, update, and delete operations
- test/tools/auth0/handlers/connections.tests.js: update test to use sinon.match for more flexible assertions
@kushalshit27 kushalshit27 changed the title feat: add directory provisioning support for connections feat: add directory provisioning support for connections Dec 19, 2025
@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 58.53659% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.42%. Comparing base (9062d24) to head (cd43527).

Files with missing lines Patch % Lines
src/tools/auth0/handlers/connections.ts 57.50% 20 Missing and 14 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1246      +/-   ##
==========================================
- Coverage   80.74%   80.42%   -0.33%     
==========================================
  Files         146      146              
  Lines        5693     5772      +79     
  Branches     1153     1174      +21     
==========================================
+ Hits         4597     4642      +45     
- Misses        625      645      +20     
- Partials      471      485      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kushalshit27 kushalshit27 marked this pull request as ready for review December 19, 2025 10:20
@kushalshit27 kushalshit27 requested a review from a team as a code owner December 19, 2025 10:20
palashgdev
palashgdev previously approved these changes Dec 19, 2025
- docs/resource-specific-documentation.md: set synchronize_automatically to false
- examples/directory/connections/google-apps.json: set synchronize_automatically to false
- examples/yaml/tenant.yaml: set synchronize_automatically to false
- examples/yaml/tenant.yaml: add api_enable_users field
- examples/directory/connections/google-apps.json: add api_enable_users field
- docs/resource-specific-documentation.md: add api_enable_users field
@kushalshit27 kushalshit27 merged commit 592bf87 into master Dec 22, 2025
6 checks passed
@kushalshit27 kushalshit27 deleted the DXCDT-1298-inbound-user-directory-provisioning-support branch December 22, 2025 08:06
@kushalshit27 kushalshit27 mentioned this pull request Dec 22, 2025
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.

4 participants