Documentation base URLs use placeholder https://{your-tenant}.sso.id. Log in to show your tenant or custom domain.
Log in for Your Tenant URL
Chapter 2 — Applications & Protocol Configuration

Applications, Signing Keys & Protocol Engine

Every web app, Single-Page Application (SPA), mobile app, backend microservice, or enterprise SAML 2.0 portal you protect with SSO.ID v2 is registered as an Application ( /applications). Learn how to configure protocols, rotate cryptographic signing keys, inject custom JWT claims, register API permissions, and apply Tier-2 policy overrides.

Chapter 2 Story: One Tenant, Four Different Application Architectures

How CloudPulse Protects Their Entire Stack Under One Identity Roof

CloudPulse's engineering team has four distinct applications that all need single sign-on, shared user identities, and centralized audit logging — yet each speaks a different protocol and has different security requirements:

  • 1. CloudPulse Web Dashboard (Angular 16 SPA): Public browser client using OpenID Connect (OIDC) + PKCE (S256) with 15-minute access tokens and refresh token rotation.
  • 2. CloudPulse Billing Worker (Node.js / .NET Microservice): Headless backend daemon using OAuth 2.0 Client Credentials (client_credentials).
  • 3. CloudPulse Enterprise Reporting (Legacy Java ERP): Requires SAML 2.0 IdP-Initiated & SP-Initiated SSO with signed XML assertions downloaded from /saml/metadata?appId=....
  • 4. CloudPulse Field Scanner (First-Party POS/CLI): Uses Direct Password Grant (grant_type=password) over TLS with custom device claims injected into the JWT.
How SSO.ID v2 Solves This: In /applications, each application chooses its own protocol (OIDC, OAuth2, SAML 2.0, or Password), its own signing algorithm (RS256, RS384, RS512, ES256, or HS256), and can selectively override Tenant defaults for Branding, Security, Tokens, and MFA.

1. Creating an Application & Choosing a Protocol

Navigate to /applications in the Admin Console and click Create Application. SSO.ID v2 automatically generates your Application ID (UUID), Client ID, Client Secret, and asymmetric RSA signing key pair.

Flow Diagram Choosing the Right Application Protocol & Grant
flowchart TD Start["Register Application (/applications)"] --> Type{"What type of client?"} Type -->|"SPA / Mobile App"| PKCE["OIDC Authorization Code + PKCE (S256)"] Type -->|"Server-Side Web App"| Conf["OIDC / OAuth 2.0 Confidential Client"] Type -->|"Background Service / Cron"| M2M["OAuth 2.0 Client Credentials (M2M)"] Type -->|"Enterprise SaaS / Legacy SP"| SAML["SAML 2.0 HTTP-POST / HTTP-Redirect"] PKCE --> Tokens["RS256 ID & Access Tokens + JWKS"] Conf --> Tokens M2M --> Tokens SAML --> Assert["Signed XML SAML Assertion & SLO"]
Select OIDC + PKCE for SPAs/Mobile, Confidential OAuth 2.0 for server backends, Client Credentials for M2M, or SAML 2.0 for enterprise SPs.
https://cloudpulse.us.beta.sso.id/applications Click to zoom
Applications management console at /applications for registering OIDC, OAuth 2.0, SAML 2.0, and Password Grant clients.
Applications management console at /applications for registering OIDC, OAuth 2.0, SAML 2.0, and Password Grant clients.
Protocol Mode Grant Types / Bindings Discovery & Metadata Endpoints Ideal Use Case
OpenID Connect (OIDC) authorization_code (+ PKCE S256), refresh_token, implicit (id_token token) GET https://{your-tenant}.sso.id/auth/.well-known/openid-configuration?appId={id}
GET https://{your-tenant}.sso.id/auth/.well-known/jwks.json?appId={id}
SPAs (Angular, React, Vue), Next.js/ASP.NET web apps, iOS/Android mobile apps needing both identity (id_token) and API authorization (access_token).
OAuth 2.0 authorization_code, client_credentials, refresh_token GET https://{your-tenant}.sso.id/auth/oauth/authorize
POST https://{your-tenant}.sso.id/auth/oauth/token
POST https://{your-tenant}.sso.id/api/oauth2/token
Confidential web backends, API gateways, and Machine-to-Machine (M2M) microservices.
SAML 2.0 HTTP-POST, HTTP-Redirect, Single Logout (SLO) GET https://{your-tenant}.sso.id/auth/saml/metadata?appId={id}
GET https://{your-tenant}.sso.id/auth/Saml/Login
GET https://{your-tenant}.sso.id/api/applications/certificate?id={id}
Enterprise B2B portals, Salesforce/Workday/ServiceNow-style integrations, and legacy .NET/Java SAML Service Providers.
Password (ROPC) grant_type=password, refresh_token POST https://{your-tenant}.sso.id/auth/oauth/token
POST https://{your-tenant}.sso.id/api/oauth2/token
Trusted first-party native applications, CLI tools, or embedded login interfaces.

2. Inside the v2 Application Settings Dialog (Step-by-Step)

Clicking the gear icon on any Application in /applications opens the multi-tab Application Settings Dialog. Because Applications sit at Tier 2 of the 4-Tier Policy Cascade, tabs with an Override Tenant Settings toggle inherit cleanly from your Tenant unless you flip the override switch:

1

General & Protocol Settings (overrideGeneral)

Configure the Application Name, Description, Application Logo, Protocol selector (OIDC, OAuth2, SAML, Password), Client ID & Secret (with one-click copy), Allowed Redirect URIs (callback URLs), Post-Logout Redirect URIs, Allowed CORS Origins, and SAML ACS URL / SP Entity ID.

2

Branding Override Studio (overrideBranding)

Give a specific product its own visual identity on the hosted login page: custom Primary/Background colors, Login Box Position (Left, Center, Right), Split-Screen Promotional Panel text & badges, Custom CSS injection, and Terms/Privacy URLs.

3

Security & Session Override (overrideSecurity)

Override brute-force lockout thresholds (maxFailedLoginAttempts, lockoutDurationMinutes), password complexity rules, idle/absolute session timeouts, concurrent session limits, and IP/Country geofencing rules specifically for this application.

4

Tokens, Custom Claims & Cryptographic Signing Keys (overrideTokens)

Configure Access Token, ID Token, and Refresh Token lifetimes (in seconds/minutes/days), Refresh Token Rotation & Reuse Detection, Signing Algorithm (RS256, RS384, RS512, ES256, HS256), Key Rotation, and Custom Claim Injection.

5

Connections, MFA (overrideMfa), Organizations, Users & Roles

• Connections Tab: Toggle which social or enterprise Identity Providers (Google, GitHub, Microsoft, Okta SAML) appear on this application's login screen (/api/applications/{id}/connections).
• Multi-Factor Tab: Enable FIDO2 Passkeys, Authenticator App (TOTP), Email OTP, or SMS OTP, and optionally require Multi-Factor Step-Up (requireMultipleFactors).
• Organizations & Users Tabs: Assign B2B Customer Organizations (/api/applications/{id}/organizations) or individual Users (/api/applications/{id}/users).

3. Custom Token Claims & Zero-Downtime Signing Key Rotation

Custom Token Attributes & Target Mapping

In the Attributes & Claims tab, you can map user profile fields, group memberships, application roles, and B2B organization hierarchy into issued JWTs / SAML assertions with selectable Token Target (id_token, access_token, or both):

  • Groups & Roles — Returns all group memberships and assigned application roles (emitted as JSON arrays in OIDC and distinct <AttributeValue> in SAML).
  • OrganizationId & OrganizationName — Injects the user's B2B customer organization ID and company name.
  • OrganizationalUnitId & OUName — Injects the user's specific departmental or branch unit ID and name.

Cryptographic Key Management (/api/signing-keys)

SSO.ID v2 manages asymmetric X.509/RSA/ECDSA key pairs per tenant/application. From the Tokens & Signing Keys panel, you can:

  • Rotate Keys (POST /api/signing-keys/rotate): Issues new tokens with the new kid while keeping the retiring key in /.well-known/jwks.json so existing tokens don't break.
  • Import / Download Certs: Upload custom PEM/PFX keys (POST /api/signing-keys/import) or download public .cer files (GET /api/signing-keys/download-cert/{id}).

5. Application Management REST APIs

Method Endpoint Description
GET / POST https://{your-tenant}.sso.id/api/applications Lists all applications or creates a new application in the tenant.
GET / PUT / DELETE https://{your-tenant}.sso.id/api/applications/{id} Retrieves, updates, or deletes an application and its override settings.
GET / POST https://{your-tenant}.sso.id/api/applications/{id}/menus Manages hierarchical App Pages (PUT / DELETE /api/applications/{id}/menus/{menuId}).
GET / POST https://{your-tenant}.sso.id/api/applications/{id}/apis Manages registered backend API endpoints (PUT / DELETE /api/applications/{id}/apis/{apiId}).
GET / POST / DELETE https://{your-tenant}.sso.id/api/applications/{id}/connections Lists, enables, or disables external Identity Provider connections for the application.
GET / PUT https://{your-tenant}.sso.id/api/applications/{id}/factors Gets or updates MFA factors enabled for the application.
GET https://{your-tenant}.sso.id/api/applications/metadata?id={id} Downloads SAML 2.0 / Federation XML metadata for the application.
GET https://{your-tenant}.sso.id/api/applications/certificate?id={id} Downloads the X.509 signing certificate for the application.

6. AI Agent Integration Prompts for Application Protocols

Copy the prompt below to instruct your AI coding assistant to wire up your application using OIDC, OAuth 2.0, SAML 2.0, or Password Grant (see AI Agent Protocol Playbooks for deep-dive prompts on each protocol):

Application Management REST API Specifications

Below is the complete parameter-level specification for every endpoint in this module. Tenant context is automatically resolved from the signed Bearer JWT token claims or the tenant domain URL (no custom tenant header is required).

GET https://{your-tenant}.sso.id/api/applications
Bearer JWT

Lists all SSO Applications registered in the active tenant workspace, including their protocol settings, client credentials, and linked roles/MFA factors.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
Response Fields & Schema
Field Type Description
applicationId string (UUID) Unique application UUID.
name string Application display name.
applicationType string Application architecture type (SPA, WEB, MOBILE, M2M).
authenticationProtocol string Configured protocol (OIDC, OAUTH2, SAML2, PASSWORD).
clientID string OAuth 2.0 / OIDC public Client ID.
replyURL string Comma-separated or primary OAuth Redirect URI / SAML ACS URL.
logoutURL string Post-logout Redirect URI / SAML SLO URL.
homePageURL string Application base landing page URL.
isDefaultAuthenticationEnabled boolean Whether username/password directory login is enabled.
isSignupEnabled boolean Whether public self-registration is enabled for this application.
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/applications" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
[
  {
    "applicationId": "app_7712b-90a1-4c23-8b11-001122334455",
    "name": "CloudPulse CRM",
    "applicationType": "SPA",
    "authenticationProtocol": "OIDC",
    "clientID": "cp_crm_prod_99182",
    "homePageURL": "https://crm.cloudpulse.io",
    "replyURL": "https://crm.cloudpulse.io/callback",
    "logoutURL": "https://crm.cloudpulse.io/logout",
    "isDefaultAuthenticationEnabled": true,
    "isSignupEnabled": false
  }
]
POST https://{your-tenant}.sso.id/api/applications
Bearer JWT

Creates a new Tier-2 Application in the tenant workspace and generates its OAuth 2.0 / OIDC Client ID, Client Secret, or SAML 2.0 Entity configuration. To update an existing application, send the same payload to PUT /api/applications/{id}.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
name Body string Required Display name of the application (1-150 characters).
applicationType Body string Required Architecture category: SPA, WEB, MOBILE, or M2M.
authenticationProtocol Body string Required Protocol: OIDC, OAUTH2, SAML2, or PASSWORD.
homePageURL Body string (URL) Optional Primary landing page URL of the application.
replyURL Body string (URL) Required Allowed OAuth 2.0 redirect_uri or SAML 2.0 Assertion Consumer Service (ACS) URL.
signOnURL Body string (URL) Optional Initiation URL used by the End-User App Launcher.
logoutURL Body string (URL) Optional Allowed post_logout_redirect_uri or SAML Single Logout URL.
identifier Body string Optional SAML 2.0 Service Provider Entity ID / Audience URI (required when authenticationProtocol=SAML2).
scopes Body string Optional Space-delimited OAuth/OIDC scopes (default: openid profile email roles offline_access).
signingAlgorithm Body integer Optional Token/Assertion signing algorithm (0 = RS256 / RSA-SHA256, 1 = HS256).
nameFormat Body string Optional SAML NameID format URI (e.g., urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress).
spCertificate Body string (Base64) Optional Optional SAML SP public X.509 certificate for encrypted assertions or signed AuthnRequests.
logo Body string Optional Logo URL or base64 image string.
primaryColor Body string Optional Hex brand color override (e.g., #ff6b35).
backgroundColor Body string Optional Hex background color override for the hosted login screen.
isDefaultAuthenticationEnabled Body boolean Optional Enable direct email/password authentication (default: true).
isSignupEnabled Body boolean Optional Allow self-service user registration on this application's login screen (default: false).
forceLoginAgain Body boolean Optional When true, forces re-authentication (prompt=login) on every launch.
scim20baseUrl Body string (URL) Optional Optional downstream application SCIM 2.0 endpoint for outbound user push.
applicationSettings Body string (JSON) Optional Serialized JSON containing Tier-2 override flags for MFA, token lifetimes, and security policies.
Response Fields & Schema
Field Type Description
applicationId string (UUID) Generated unique Application UUID.
clientID string Generated OAuth 2.0 / OIDC Client ID.
clientSecret string Generated Client Secret (store securely).
name string Application name.
authenticationProtocol string Configured protocol.
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/applications" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CloudPulse Billing Portal",
    "applicationType": "WEB",
    "authenticationProtocol": "OIDC",
    "homePageURL": "https://billing.cloudpulse.io",
    "replyURL": "https://billing.cloudpulse.io/api/auth/callback",
    "logoutURL": "https://billing.cloudpulse.io",
    "scopes": "openid profile email roles offline_access",
    "primaryColor": "#ff6b35",
    "isDefaultAuthenticationEnabled": true,
    "isSignupEnabled": false
  }'
Expected Response 201 Created
{
  "applicationId": "app_c4190e12-88b1-4920-9a11-77889900aabb",
  "name": "CloudPulse Billing Portal",
  "applicationType": "WEB",
  "authenticationProtocol": "OIDC",
  "clientID": "cp_billing_881920a",
  "clientSecret": "sec_9918273645abcdef0192837465",
  "replyURL": "https://billing.cloudpulse.io/api/auth/callback",
  "createdOn": "2026-11-19T12:10:00Z"
}
POST https://{your-tenant}.sso.id/api/applications/{id}/connections
Bearer JWT

Enables an external Identity Provider Connection (Google, GitHub, Microsoft Entra ID, Okta SAML/OIDC) for a specific Application. Use GET /api/applications/{applicationId}/connections to list linked connections, and DELETE /api/applications/{applicationId}/connections/{connectionId} to unlink.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
id Path string (UUID) Required Target Application UUID.
applicationId Body string (UUID) Required Target Application UUID.
connectionId Body string (UUID) Required UUID of the Connection to enable on this application.
enableAutoProvisioning Body boolean Optional When true, users authenticating via this connection are automatically provisioned into this application via JIT.
Response Fields & Schema
Field Type Description
applicationId string (UUID) Application UUID.
connectionId string (UUID) Linked Connection UUID.
enableAutoProvisioning boolean JIT provisioning state.
createdOn string (ISO 8601) Link creation timestamp.
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/applications/app_7712b/connections" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "applicationId": "app_7712b",
    "connectionId": "con_google_oauth2_01",
    "enableAutoProvisioning": true
  }'
Expected Response 200 OK
{
  "applicationId": "app_7712b",
  "connectionId": "con_google_oauth2_01",
  "enableAutoProvisioning": true,
  "createdOn": "2026-11-19T12:15:00Z"
}
PUT https://{your-tenant}.sso.id/api/applications/{applicationId}/available-factors
Bearer JWT

Configures the MFA factors (TOTP Authenticator, Email OTP, SMS OTP, FIDO2 Passkey) enabled and enforced specifically for this Tier-2 Application. Use GET /api/applications/{applicationId}/available-factors to inspect current application MFA factors.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
applicationId Path string (UUID) Required Target Application UUID.
factors Body array Required Array of factor configuration objects specifying factorId, factorType (TOTP, EMAIL, SMS, PASSKEY), and isEnabled (boolean).
Response Fields & Schema
Field Type Description
status boolean True if application MFA factors were updated.
factors array Updated list of active MFA factors for the application.
Sample Request
curl -X PUT "https://{your-tenant}.sso.id/api/applications/app_7712b/available-factors" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "factors": [
      { "factorId": 1, "factorType": "TOTP", "isEnabled": true },
      { "factorId": 2, "factorType": "PASSKEY", "isEnabled": true },
      { "factorId": 3, "factorType": "EMAIL", "isEnabled": false }
    ]
  }'
Expected Response 200 OK
{
  "status": true,
  "message": "Application MFA factors updated successfully."
}
POST https://{your-tenant}.sso.id/api/applications/{id}/users
Bearer JWT

Assigns a directory User to an Application along with an initial Application Role. Use GET /api/applications/{id}/users to list assigned users and DELETE /api/applications/{applicationId}/users/{userId} to revoke access.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
id Path string (UUID) Required Target Application UUID.
roleId Query string (UUID) Optional Optional initial Application Role UUID to grant to the user.
applicationId Body string (UUID) Required Target Application UUID.
userId Body string (UUID) Required User UUID to assign to the application.
Response Fields & Schema
Field Type Description
applicationId string (UUID) Application UUID.
userId string (UUID) Assigned User UUID.
createdOn string (ISO 8601) Assignment timestamp.
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/applications/app_7712b/users?roleId=rol_3310a" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "applicationId": "app_7712b",
    "userId": "usr_9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f"
  }'
Expected Response 200 OK
{
  "applicationId": "app_7712b",
  "userId": "usr_9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f",
  "createdOn": "2026-11-19T12:20:00Z"
}
GET https://{your-tenant}.sso.id/api/applications/metadata
Bearer JWT

Downloads the SAML 2.0 Identity Provider Federation Metadata XML document for the specified application. To download the raw X.509 signing certificate (.cer), call GET /api/applications/certificate?appId={appId}.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
appId Query string (UUID) Required Application UUID whose SAML 2.0 IdP metadata or certificate should be generated.
host Query string Optional Optional custom domain host override.
Response Fields & Schema
Field Type Description
EntityDescriptor XML Standard OASIS SAML 2.0 md:EntityDescriptor document containing IDPSSODescriptor, X.509 KeyDescriptor, SingleSignOnService, and SingleLogoutService bindings.
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/applications/metadata?appId=app_7712b" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://{your-tenant}.sso.id/auth/saml/app_7712b">
  <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://{your-tenant}.sso.id/auth/Saml/Login" />
    <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://{your-tenant}.sso.id/auth/saml/logout" />
  </md:IDPSSODescriptor>
</md:EntityDescriptor>
AI Agent Multi-Protocol Prompt Integrate an SSO.ID v2 Application (OIDC / OAuth 2.0 / SAML 2.0 / Password)
You are an expert IAM integration engineer. Connect my application to **SSO.ID v2** using the following credentials from `/applications`:
- `APP_ID`: ``
- `CLIENT_ID`: ``
- `CLIENT_SECRET`: ``
- `REDIRECT_URI`: ``
- `PROTOCOL`: ``

### SSO.ID v2 Protocol Endpoints (`https://{your-tenant}.sso.id/auth`)
1. **If `OIDC_PKCE`**:
   - Discovery: `GET https://{your-tenant}.sso.id/auth/.well-known/openid-configuration?appId=${APP_ID}`
   - JWKS: `GET https://{your-tenant}.sso.id/auth/.well-known/jwks.json?appId=${APP_ID}`
   - Authorize: `GET https://{your-tenant}.sso.id/auth/oauth/authorize?client_id=${CLIENT_ID}&response_type=code&redirect_uri=${REDIRECT_URI}&scope=openid%20profile%20email%20roles%20offline_access&state=${STATE}&code_challenge=${CHALLENGE}&code_challenge_method=S256`
   - Token Exchange: `POST https://{your-tenant}.sso.id/auth/oauth/token` (`grant_type=authorization_code`, `code`, `code_verifier`, `client_id`, `redirect_uri`)
   - UserInfo: `GET https://{your-tenant}.sso.id/auth/oauth/userinfo` (`Authorization: Bearer ${access_token}`)
   - Logout: `GET https://{your-tenant}.sso.id/auth/oauth/logout?id_token_hint=${id_token}&post_logout_redirect_uri=${POST_LOGOUT_URI}`

2. **If `OAUTH2_M2M`**:
   - Token Endpoint: `POST https://{your-tenant}.sso.id/auth/oauth/token` (or `POST https://{your-tenant}.sso.id/api/oauth2/token`) with `grant_type=client_credentials&client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}`.

3. **If `SAML2`**:
   - IdP Metadata XML: `GET https://{your-tenant}.sso.id/auth/saml/metadata?appId=${APP_ID}`
   - IdP SSO Login: `https://{your-tenant}.sso.id/auth/Saml/Login` (HTTP-POST & HTTP-Redirect)
   - IdP SLO Logout: `https://{your-tenant}.sso.id/auth/saml/logout`

4. **If `PASSWORD_GRANT`**:
   - Token Endpoint: `POST https://{your-tenant}.sso.id/auth/oauth/token` with `grant_type=password&client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&username=${EMAIL}&password=${PASSWORD}&scope=openid profile email roles`.

Please generate the complete authentication module, callback handler, token verifier against JWKS, and route guards for my project.