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:
- User visits your application → redirects to CAS login
- CAS authenticates user → returns service ticket
- Application validates ticket → extracts person UUID
- 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/provisionduring 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
| Aspect | Standard CAS | Delegated (CAS-Proxied) | Delegated (Direct) |
|---|---|---|---|
| User Management | Wicket Admin | External IdP | External IdP |
| Authentication | Wicket users | External provider (via CAS) | External provider (direct) |
| Your App Code | Standard CAS | Identical - Standard CAS | OIDC/SAML client |
| Setup Complexity | Simple | Wicket team configures CAS | You configure OAuth app |
| User Provisioning | Not needed | Middleware iPaaS (webhooks) | Your app during login |
| OAuth App Management | N/A | Wicket manages | You 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 UUIDs2. Use HTTPS
// ✅ Good: HTTPS URLs
const casLoginUrl = 'https://your-org-login.wicketcloud.com/login';
// ❌ Insecure: HTTP in production3. 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 days4. 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
CAS Implementation Guide
Complete code examples for integrating CAS authentication (Node.js, Python, Ruby)
Delegated Authentication
Understanding how CAS delegates to external providers (Advanced)
Provider Configuration
External provider setup requirements (B2C, Auth0, Okta)
User Provisioning
How middleware syncs users between Wicket and external providers
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.