Skip to content

feat(sso): add configureAuthType to enable or disable an SSO configuration - #800

Merged
dorsha merged 1 commit into
mainfrom
feat/sso-configure-auth-type
Aug 24, 2026
Merged

feat(sso): add configureAuthType to enable or disable an SSO configuration#800
dorsha merged 1 commit into
mainfrom
feat/sso-configure-auth-type

Conversation

@dorsha

@dorsha dorsha commented Aug 24, 2026

Copy link
Copy Markdown
Member

Description

Wraps the new management endpoint POST /v1/mgmt/sso/settings/authtype

// disable one connection of a multi-SSO tenant, keeping its configuration
await descopeClient.management.sso.configureAuthType('tenant-id', 'none', 'conf1');
// enable it again on the protocol it is configured for
await descopeClient.management.sso.configureAuthType('tenant-id', 'saml', 'conf1');
// omit ssoId to target the tenant's default configuration
await descopeClient.management.sso.configureAuthType('tenant-id', 'none');

Why. A customer running their own admin UI on the management APIs needs to temporarily disable one SSO connection of a multi-SSO tenant. Until now the only per-connection off switch was deleteSettings, which drops the connection: re-enabling meant newSettings plus a full configureSAMLSettings / configureOIDCSettings replay, and the caller had to store the mappings, the domains and the OIDC clientSecret (never returned on read). For SAML it was worse, since a recreated connection gets a new ACS URL and the tenant's IdP admin has to reconfigure. configureAuthType keeps the stored configuration intact, so re-enabling needs no payload.

Also names the 'none' | 'saml' | 'oidc' union SSOAuthType and reuses it on Tenant and TenantSettings, which both already inlined it. Type-identical, so not a breaking change.

Tests

lib/management/sso.test.ts — the request shape with an ssoId, and the default-configuration call that omits it. Full suite green.

…ation

Wraps POST /v1/mgmt/sso/settings/authtype: none disables one SSO
configuration without deleting it, saml/oidc enable it on that protocol with
its stored settings. Takes an optional ssoId, so a multi-SSO tenant can have a
single connection taken out of service and put back without replaying its IdP
payload, and without the new ACS URL a delete plus recreate hands a SAML
tenant.

Also names the shared 'none' | 'saml' | 'oidc' union SSOAuthType and reuses it
on Tenant and TenantSettings, which already inlined it.

Requires descope/backend#2355.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot

shuni-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🐕 Suggested Reviewers

Selected reviewers to provide comprehensive coverage across all changed files and expertise areas. The strategy prioritizes: (1) Core SSO domain expertise from contributors with multiple SSO-related commits; (2) Broad file coverage spanning paths, types, implementation, tests, and documentation; (3) Testing validation from dedicated test contributors; (4) Documentation review from README experts.

Reviewer Reason
aviadl Most experienced contributor with 5 commits across 4 files including lib/management/sso.ts, lib/management/paths.ts, and README.md. Has broad expertise in SSO implementation, management paths, and documentation—ideal for comprehensive technical review.
itaihanski Specialist in SSO testing and implementation with 2 commits to lib/management/sso.test.ts and lib/management/sso.ts. Essential for validating the new configureAuthType test coverage and core implementation logic.
talaharoni Contributor with expertise in type definitions and README documentation (2 commits across lib/management/types.ts and README.md). Important for reviewing the type safety of the new AuthType configuration and documentation accuracy.

Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best.

@shuni-bot shuni-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐕 Shuni Review

Adds configureAuthType to enable/disable a single SSO configuration without deleting its stored settings, plus a shared SSOAuthType type reused on Tenant/TenantSettings.

Actionable comments posted: 0

Merge risk: 🟢 Low: minimal, isolated addition that mirrors the existing deleteSettings/configureSSORedirectURL request-building pattern exactly, the type consolidation is type-identical (non-breaking), and the new tests match established conventions for both the with-ssoId and default-configuration cases.


Declared coverage: FULL — 5/5 changed files reviewed.

@dorsha
dorsha enabled auto-merge (squash) August 24, 2026 09:10
@ruvenzx
ruvenzx self-requested a review August 24, 2026 09:18
@dorsha
dorsha merged commit 6f19ba8 into main Aug 24, 2026
46 of 47 checks passed
@dorsha
dorsha deleted the feat/sso-configure-auth-type branch August 24, 2026 09:19
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