73
Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Embed Size (px)

Citation preview

Page 1: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Central Authentication Service

Scott Battaglia (Rutgers University)

Andrew Petro (Yale University)

Bill Thompson (Rutgers University)

Page 2: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

What is CAS?

CAS isEnterprise level single sign on for the webA trusted sourceA proxy authenticator

Page 3: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

History of CAS

CAS 1.0Created by Yale UniversitySimple to use

Protocol was simple yes or no

No proxy authenticaton

Page 4: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

History of CAS

CAS 2Also produced by Yale University Introduced Proxy authenticationSimple implementation

Few classes

Extending CAS required modifying source code

Page 5: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

History of CAS

CAS 3.0Collaboration between Yale University and

Rutgers UniversityGoal was to make it easy to extend CAS

without modifying core codeCompletely compatible with CAS 2 protocolLeverages tried-and-tested open source

software

Page 6: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Why CAS 3?

CAS 2 was simple to use and understand CAS 3 arguably is more complex, is it

true? Why/why not? Introduce many “best practices” Position CAS for future enhancements Leverage knowledge gained working with

other tools

Page 7: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

New in CAS 3

Customizable login flow Pluggable architecture

Ticket StoreAuthentication HandlersMore…

Support for Web Services Support for alternative views

Page 8: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS in a nutshell

BrowserWeb application

Authenticateswithout sending password

Authenticates

via password (once)

Determinesvalidity of user’sclaimedauthentication

Page 9: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

How CAS Works

Webapplication

CAS

Webbrowser

S

C

T

S T

NetID

Page 10: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS Community

Mailing Lists Wiki Issue Tracking Continuous Integration Tools Maven CVS Frappr Non JA-SIG Communities

Page 11: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Mailing Lists

Provide two mailing listsDeveloper

http://tp.its.yale.edu/mailman/listinfo/cas-dev

User http://tp.its.yale.edu/mailman/listinfo/cas

Page 12: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Wiki

Instance of Atlassian Confluencehttps://clearinghouse.ja-sig.org/wiki/spaces/vi

ewspacesummary.action?key=CAS Provides

DocumentationDownloadsetc

Page 13: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Issue Tracking

Instance of Atlassian JIRAhttp://clearinghouse.ja-sig.org/issues

Provides snapshot of project plan Fixed and outstanding bugs

Page 14: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Continuous Integration

Instance of Luntbuildhttp://developer.ja-sig.org/builds/

Download nightly snapshots of CAS

Page 15: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Maven Site

Publishes:Java docsTest ResultsClover reports

Page 16: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Version Control

CVS RepositoryAnonymous checkout of any version of CASObtain latest code (bleeding edge)

Web View via FishEyehttp://developer.ja-sig.org/source/

Page 17: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Frappr http://www.frappr.com/jasigcasdeployers

Page 18: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

ESUP Portail

French language CAS community Produce quick starts and common tools French email lists

http://listes.esup-portail.org/wws/lists/cas

Page 19: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Requirements to Deploy CAS

A server and network connection A servlet container supporting Servlet

2.4/JSP 2.0 specification Certificate Java 1.4 or higher CAS 3.0.2

Page 20: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Download CAS

CAS releases are available from the Wiki Available as

ZIPTAR GZ

Starting with 3.0.3, include md5, SHA1 hash

Page 21: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS Service Clients

Making your application

use CAS

(compellingly)

Page 22: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

How to use CAS

Abstraction Layer

Your Application

CAS

Page 23: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Many CAS Clients

Acegi (for Java web-apps, esp. Spring) AuthCAS (Perl Apache module) PerlCAS phpCAS

Page 24: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Many More CAS Clients

for Prado (a PHP framework) for Seraph (a Java security framework) for uPortal

for WebObjects For Zope

Page 25: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Yale CAS clients

Java Servlet Filter Java Objects JSP tag library

MOD_CAS PAM_CAS ISAPI filter PL/SQL

Page 26: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Many Supported Platforms

Page 27: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Applications distributed CASified

Your Application Goes Here.

BlueSocket (!)

Page 28: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS Features for Services

Renew, Gateway,

Proxy authentication

Page 29: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Renew

Opts out of Single Sign On

Advisory on /login (CAS always prompt for credentials)

Security implications on /validate (tells CAS to only succeed validation if credentials were presented)

Page 30: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Gateway

Tells CAS to redirect back without a ticket if one cannot be acquired non-interactively (e.g., via an established SSO session).

Allows you to provide the best user experience possible under the circumstances.

Page 31: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Public Portal

Page 32: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Authenticated Portal

Page 33: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

First request to the portal

Page 34: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CASify all requests

Page 35: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Login Screen

Page 36: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

But I just wanted the weather…

Page 37: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Needlessly locking public information

Page 38: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Effective use of Gateway

1) Authenticated, personalized content2) Public, generic content3) Login screen

Page 39: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Why am I telling you this?

CAS Server offers a few primitives Upon which you can build compelling user

experiences Renew and Gateway are “advanced” tools

in the toolkit.

Page 40: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Proxying authentication

Another “advanced” tool in the toolkit More on this later.

Page 41: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS Clients everywhere…

Page 42: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

That was SSO *

Lots of SSO solutions out there CAS is a nice one They all look and work more or less just

like CAS for SSO purposes.

Page 43: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Portal authentication

Portals need to authenticate usersTo provide customized contentTo restrict portal-accessible resources

Portals also need access to third-party resources “as the user”“n-tier” authenticationSingle sign-on

Page 44: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Aggregating content → Aggregating authentication

BeforeAfter

Page 45: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

What we will cover

1. How does uPortal authenticate users in the first place?

2. What is the N-tier authentication problem?

3. How does the Yale’s model, called CAS, (Central Authentication Service) solve the problem?

Page 46: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

uPortal’s pluggable security-context mechanismAuthentication support in uPortal manifested

through ISecurityContext:

Key functions: Accept IPrincipal Accept IOpaqueCredentials Authenticate user Return true/false (and optionally more)

Page 47: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

uPortal’s authentication infrastructure: advantagesFlexibility

Adapts to nearly any back-end campus authentication solution – e.g.,

Kerberos (4, 5) LDAP “authentication” Unix password file (small-scale) Server-based authentication (“trust”)

Supports “chaining” providers to establish more than one context.

Page 48: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

ChainingSecurityContext Allows for a chain or a tree of

providers to be called Originally envisioned as acquiring

multiple credentials at sign in For Example:

A database connection or an LDAP initial context or Kerberos TGT

Has not turned out to be the enabling component for single sign on

Page 49: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

UnionSecurityContext

Can sit at the top of the tree of chaining providers and present isAuthenticated status and credentials of first provider in the chain to succeed

Portal property determines whether to continue

SimpleProvider(password)

CASProvider

Union Provider

Page 50: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

N-tier authentication

Portal

Channel

Page 51: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

uPortal’s authentication infrastructure: disadvantages Limitations

Provides unified authentication “gate,” but no extra portal-specific functionality. No single sign-on.

Just a model—does little work itself.But… can be wrenched to cache passwords:

NotSoOpaqueCredentials

String getCredentials();(Not particularly secure)

IOpaqueCredentials

Page 52: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Caching Security Provider

A way to replay passwords by giving channels access to them

Not the best ideaMay expose password to insecure use by channelsParticipating applications have less security than

before If the portal is compromised users’ primary

credentials are compromised

Page 53: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Password caching

Portal

Channel

Channel

Channel

Password-protectedservice

Password-protectedservice

Password-protectedservice

PWPW

PWPW

PWPW

PWPW

PWPW

PWPW

PWPW

PWPW

PWPW

PWPW

PWPW

Page 54: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Given the drawbacks of caching and re-using passwords, what’s a better approach?

How can a web based Single Sign on System really work?

Page 55: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Web-based single sign-on

Why is this problem different from existing single sign-on systems? Limited client support

Yale’s model is called CAS (Central Authentication Service). Model based (loosely) on Kerberos. “100% Pure Java” Pluggable back-end Available through JA-SIG Clearinghouse Thank you to Shawn Bayern

Other models: Liberty, Pubcookie (Washington), MACE WebISO, Passport

Page 56: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS in a nutshell

BrowserWeb application

Authenticateswithout sending password

Authenticates

via password (once)

Determinesvalidity of user’sclaimedauthentication

Page 57: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Primary benefits of CAS

Works with existing authentication infrastructures, such as Kerberos

Can be used by nearly any Web-application development environment (JSP, Servlets, ASP, Perl, mod_perl, PHP, Python, PL/SQL, and so forth) — or as a server-wide Apache module

Allows "proxy" authentication for Web portals Lets users authenticate securely to untrusted sites (e.g.,

student-run sites and third-party vendors) without supplying a password directly

Is portable (written in Java: Servlets, JSP, and JSTL) Is freely available from Yale (with source code)

Page 58: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

How CAS actually works

Webresource

CAS

Webbrowser

S

C

S T

S T

Page 59: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Back to the N-tier problem

uPortal can authenticate users securely with CAS.

But it does not have first-hand knowledge of users’ credentials.

This is a good thing . . .Except that uPortal can’t impersonate the user

in order to acquire secure data for the user.

Page 60: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS’s solution: proxiable credentials1. During validation of ST, an application acquires

a proxy-granting ticket (PGT) from CAS2. When the application needs access to a

resource, it uses the PGT to get a proxy ticket (PT)

3. The application sends the PT to a back-end application.

4. The back-end application confirms the PT with CAS, and also gains information about who proxied the authentication.

Page 61: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Proxiable credentials illustrated

IMP CAS

S TIMAP serverCAS PAM

modulePGT

PGT

PT

PT

PT

-Username

-Identity of web resource

Page 62: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

CAS Security Provider

Uses CAS for primary authentication Use CAS ProxyTicketReceptor servlet to

receive PGT to be redeemed later Exposes public method to channels to get a

Proxy Service Ticket for a particular service Back end system must be configured to

validate and accept proxy credentials from uPortal

Page 63: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

uPortal withCAS Provider

CAS

S T

Channelresource

PGT IOU

PGT

PT

PT

PT-Usernam

e

-Identity of proxy (portal)CAS SecurityContext

Channel

getProxyTicket(pgtIou,service)

CASTicketReceptorServlet

getCasServiceToken

PGT

PT

PT

PT

Page 64: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Characteristics of CAS’s solution Back-end applications maintain control over their

data For instance, IMAP server may assert, “The only web-

based email application I trust is https://www.mail.yale.edu/”

Default: no proxies allowed! User logout or timeout destroys subordinate

credentials User must be “present” for proxied authentication to

occur.

Page 65: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Extending CAS 3

Clustering Failover Attributes Certificates Events Service Restrictions Web Services

Page 66: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Clustering

Ticket RegistryDistributed Ticket StoreShared Ticket Store

Session ManagementSticky sessionsRemove sessions entirely

Page 67: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Failover

Not handled by CAS directly Content Switch CAS-spare

Page 68: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Attributes

CAS allows attachment of attributes to:PrincipalAuthentication object

Attributes are available to payload Customize payload to return attributes you

need

Page 69: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Automatically Presented Credentials Credentials such as…

Certificates Modify login web flow to place check for

credentials before

Page 70: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Events

Publishes events:AuthenticationTicket creation, destruction, etc.

EventListener captures published events Custom EventHandler to handle events

Page 71: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Service Restrictions

Example in code repository Use to protect CAS from unauthorized

services Uses whitelist

Page 72: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Web Services

Designed that layers are separated Expose layer as multiple types of web

servicesHessianBurlapSOAPHttpInvoker

Page 73: Central Authentication Service Scott Battaglia (Rutgers University) Andrew Petro (Yale University) Bill Thompson (Rutgers University)

Future CAS Extensions

SAML response Single Sign Out Administration Summary Screens Expose more configuration options via

JMX What would you like to see?