Pre-release — content may change.

GuidesSingle Sign-On

Overview

Integrate SSO authentication with Wicket using CAS

Wicket uses CAS (Central Authentication Service) for Single Sign-On authentication. Your application redirects users to CAS for login, validates the returned ticket, and extracts the person UUID to sign API JWTs.

How CAS Works

Basic Flow:

  1. User visits your application → redirects to CAS login
  2. CAS authenticates user → returns service ticket
  3. Application validates ticket → extracts person UUID
  4. Application signs Wicket MDP API JWT → user accesses API

Standard vs Delegated Authentication

Wicket supports two authentication approaches:

Standard CAS (Most Common)

What it is:

  • CAS authenticates directly against Wicket user accounts
  • Person records are managed in Wicket Admin
  • Simple, straightforward setup

When to use:

  • Standard Wicket deployments
  • Wicket is your primary membership system
  • Users managed in Wicket Admin

Implementation: See CAS Implementation Guide


Delegated Authentication (Advanced)

What it is: External identity providers (Azure AD B2C, Auth0, Okta) manage user accounts instead of Wicket.

Two integration approaches:

Option A: CAS-Proxied (Simpler)

  • Your application uses standard CAS authentication code
  • CAS acts as transparent proxy to external provider
  • Middleware iPaaS handles user provisioning via webhooks
  • Your app code: Identical to standard CAS

Option B: Direct Integration (More Control)

  • Your application implements OIDC/SAML directly with external provider
  • Your application calls /user_identities/provision during login
  • You manage your own OAuth applications
  • Your app code: OIDC/SAML client implementation

When to use:

  • Enterprise Active Directory / Azure AD integration
  • Third-party auth providers (Auth0, Okta)
  • External systems manage user accounts
  • Multi-tenant scenarios

Learn more: See Delegated Authentication Guide

Choosing Your Approach

AspectStandard CASDelegated (CAS-Proxied)Delegated (Direct)
User ManagementWicket AdminExternal IdPExternal IdP
AuthenticationWicket usersExternal provider (via CAS)External provider (direct)
Your App CodeStandard CASIdentical - Standard CASOIDC/SAML client
Setup ComplexitySimpleWicket team configures CASYou configure OAuth app
User ProvisioningNot neededMiddleware iPaaS (webhooks)Your app during login
OAuth App ManagementN/AWicket managesYou manage

Key Insight: With CAS-proxied delegation, your application code is identical to standard CAS. With direct integration, you implement OIDC/SAML yourself and have more control over the OAuth application.

Quick Start

1. Implement CAS Authentication

Follow the CAS Implementation Guide to integrate CAS with your application. This works for both standard and delegated scenarios.

You'll learn:

  • Redirecting to CAS login
  • Validating service tickets
  • Extracting person UUID
  • Signing Wicket MDP API JWTs
  • Complete code examples (Node.js, Python, Ruby)

2. (Optional) Understand Delegation

If using delegated authentication with external providers, read the Delegated Authentication Guide to understand:

  • How CAS proxies to B2C/Auth0/Okta
  • User provisioning via middleware iPaaS
  • Provider configuration requirements

Note: Delegated authentication requires Wicket implementation team to configure external providers. Contact Wicket support if you need this setup.

Architecture Overview

Standard CAS Flow

Delegated CAS Flow

Notice: Your application sees identical flow in both scenarios. The delegation is transparent.

Security Best Practices

1. Always Validate Tickets Server-Side

// ✅ Good: Server-side validation
const personUuid = await validateCASTicket(ticket, serviceUrl);

// ❌ Dangerous: Never trust client-provided UUIDs

2. Use HTTPS

// ✅ Good: HTTPS URLs
const casLoginUrl = 'https://your-org-login.wicketcloud.com/login';

// ❌ Insecure: HTTP in production

3. Short-Lived JWTs

// ✅ Good: 1 hour expiration
exp: Math.floor(Date.now() / 1000) + (60 * 60)

// ❌ Risky: Long-lived tokens
exp: Math.floor(Date.now() / 1000) + (30 * 24 * 60 * 60) // 30 days

4. Secure Session Management

// ✅ Good: Secure session cookies
app.use(session({
  secret: process.env.SESSION_SECRET,
  cookie: {
    secure: true,      // HTTPS only
    httpOnly: true,    // No client-side access
    sameSite: 'lax'    // CSRF protection
  }
}));

Next Steps

Common Questions

Do I need to implement different code for delegated auth?

No. Your application code is identical for both standard and delegated CAS. You implement standard CAS authentication, and it works regardless of whether CAS delegates to an external provider.

How do users get provisioned in delegated scenarios?

Middleware iPaaS handles provisioning, not your application. When a person is created in Wicket, middleware receives a webhook, creates the user in the external provider (B2C, Auth0, etc.), and links the accounts. Your application never calls provisioning APIs during login.

Can I use CAS and local username/password?

Yes. CAS is for SSO authentication. You can also support local username/password login by calling the Wicket authentication API directly (separate from CAS).

What's the difference between CAS and OIDC/SAML?

CAS is the protocol your application uses. In delegated scenarios, CAS may internally use OIDC/SAML to communicate with external providers, but your application only sees CAS protocol.

On this page