Install and Configure mod_auth_cas on Apache

21 Jul

Download and install mod_auth_cas RPM

Configure mod_auth_cas in httpd.conf

  • First remove the default auth_cas.conf file as are configuring SSO at the virtual host level.
    • rm /etc/httpd/conf.d/auth_cas.conf
  • Here is the existing EC2 configuration. Note CASCookiePath HAS to be defined at a global not virtual host level.
    <VirtualHost _default_:80>
        DocumentRoot /var/www/html
        ServerName mydomain.com
        ServerAlias *.mydomain.com
    
            LoadModule auth_cas_module modules/mod_auth_cas.so
    
            # Cookie path must be given as an absolute path with a trailing slash
            CASCookiePath /var/run/mod_auth_cas/
            CASCookieDomain .mydomain.com
    
            # Certificate path may be a file or a directory of certificates symlinked by
            # their hashed names
            CASCertificatePath /etc/pki/tls/certs/
            CASValidateServer Off
            CASDebug On
    
            # The URL to the CAS server
            CASLoginURL https://sso.mydomain.org:8443/cas-server-webapp-3.4.7/login         CASValidateURL https://sso.mydomain.org:8443/cas-server-webapp-3.4.7/serviceValidate 
            RewriteEngine on
            RewriteOptions Inherit
    
    <Directory "/var/www/html">
    
        Options Indexes FollowSymLinks
    
        AllowOverride None
        AuthType CAS
        AuthName "CAS"
        require valid-user
    
        Order allow,deny
        Allow from all
    
    </Directory>
    
    </VirtualHost>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: