Skip to content

feat(clients): support oidc_support on clients and client profiles - #1537

Open
harshithRai wants to merge 2 commits into
masterfrom
DXCDT-2449
Open

harshithRai wants to merge 2 commits into
masterfrom
DXCDT-2449

Conversation

@harshithRai

Copy link
Copy Markdown
Contributor

🔧 Changes

Adds support for the oidc_support property, which controls whether a client may use OIDC flows and which optional profile scopes (profile, email, address, phone) it may request. It applies to clients, including CIMD clients, and to client profiles through client_configuration.oidc_support, in both the YAML and directory formats.

  • The value is validated against the Management API shape: is_allowed is required, and allowed_scopes and allow_all_scopes are the scope options. Clients and client profiles share one schema definition.
  • On client profiles the value is wrapped in default_value, like the other client_configuration settings.
  • Export writes the value the API returns, including its default, so OIDC-conformant clients now export an oidc_support block.
  • When the feature is not enabled on the target tenant, the API rejects writes that carry the field. The CLI now skips oidc_support for that resource, logs a warning naming it, and applies the rest of the configuration, so a config exported from one tenant can still be deployed to another.
  • CIMD clients receive the value on update, like their other editable fields.

Shape

The field is new on both resources. YAML, before:

clients:
  - name: My Third-Party Application
    oidc_conformant: true
clientProfiles:
  - name: CIMD Client Profile
    client_configuration:
      require_proof_of_possession:
        default_value: true

YAML, after:

clients:
  - name: My Third-Party Application
    oidc_conformant: true
    oidc_support:
      is_allowed: true
      allowed_scopes:
        - profile
        - email
clientProfiles:
  - name: CIMD Client Profile
    client_configuration:
      require_proof_of_possession:
        default_value: true
      oidc_support:
        default_value:
          is_allowed: true
          allow_all_scopes: true

Directory (JSON), before, clients/My Third-Party Application.json:

{
  "name": "My Third-Party Application",
  "oidc_conformant": true
}

Directory (JSON), after:

{
  "name": "My Third-Party Application",
  "oidc_conformant": true,
  "oidc_support": {
    "is_allowed": true,
    "allowed_scopes": ["profile", "email"]
  }
}

Directory (JSON), after, client-profiles/CIMD Client Profile.json:

{
  "name": "CIMD Client Profile",
  "client_configuration": {
    "oidc_support": {
      "default_value": { "is_allowed": true, "allow_all_scopes": true }
    }
  }
}

📚 References

N/A

🔬 Testing

Unit tests

Added in test/tools/auth0/handlers/clients.tests.js:

  • Accepts is_allowed with allow_all_scopes, with allowed_scopes, and on its own as false
  • Rejects openid as a scope, a missing is_allowed, and null
  • Sends oidc_support on client create and update
  • Sends oidc_support when updating a CIMD client
  • Retries create, update, and CIMD update without oidc_support and warns when the tenant does not have the feature

Added in test/tools/auth0/handlers/clientProfiles.tests.js:

  • Accepts and rejects the same shapes inside default_value
  • Sends client_configuration.oidc_support on profile create and update
  • Retries create and update without the field and warns when the tenant does not have the feature

Added in test/tools/utils.test.ts, for the shared retry helper:

  • Returns the result of a successful write without retrying
  • Retries without the field, including a nested path, only when the API reports the feature as not enabled for oidc_support
  • Rethrows when the payload has no oidc_support, when the error is about something else, and when the status is not 403
  • Surfaces the error when the retry also fails

Updated test/utils.js with shared helpers for the not-enabled error and for capturing warnings.

Manual verification

Against a live tenant, in both YAML and directory formats:

  1. With the feature enabled, import a config with oidc_support on a regular client, a strict third-party client, a CIMD client, and a client profile. Read each resource back through the Management API and confirm the stored value matches.
  2. Change the value (for example from allowed_scopes to allow_all_scopes) and import again. Confirm the stored value is replaced, not merged.
  3. Run --dry-run after a successful import and confirm it reports no changes.
  4. Export, then import the export. Confirm it succeeds and the stored values are unchanged.
  5. Send both allow_all_scopes and allowed_scopes and confirm the API's 400 is reported against the client.
  6. With the feature disabled on the tenant, import the same config. Confirm each resource is created or updated without oidc_support, one warning is logged per resource, and the import succeeds.

📝 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)

Add the oidc_support property to clients (including CIMD clients) and
client_configuration.oidc_support to client profiles, in both YAML and
directory formats. When the tenant does not have the feature enabled, the
field is skipped with a warning and the rest of the configuration is applied.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.65%. Comparing base (5770977) to head (76d904b).

Files with missing lines Patch % Lines
src/tools/auth0/handlers/clients.ts 80.00% 0 Missing and 2 partials ⚠️
src/tools/utils.ts 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1537   +/-   ##
=======================================
  Coverage   82.64%   82.65%           
=======================================
  Files         193      193           
  Lines        9301     9323   +22     
  Branches     2061     2066    +5     
=======================================
+ Hits         7687     7706   +19     
  Misses        816      816           
- Partials      798      801    +3     

☔ View full report in Codecov by Harness.
📢 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.

Cover the 403 status, errorCode and message conditions of the retry helper
with dedicated tests, reuse the shared not-enabled error fixture, and document
the dry-run, export and null behavior of oidc_support.

Co-Authored-By: Claude <noreply@anthropic.com>
@harshithRai
harshithRai marked this pull request as ready for review November 16, 2026 17:58
@harshithRai
harshithRai requested a review from a team as a code owner November 16, 2026 17:58
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