We're updating the issue view to help you get more done. 

Abstract ${cas.host.name} as a cas.properties property

Description

Several properties in cas.properties will, in many deployments, differ only to reflect the hostname of the CAS server. Abstract this hostname out as a property, ${cas.host.name}, so that a deployer need only update that single property to achieve proper setting of cas.securityContext.serviceProperties.service , cas.securityContext.casProcessingFilterEntryPoint.loginUrl, and cas.securityContext.ticketValidator.casServerUrlPrefix , as in:

  1. Security settings
    cas.securityContext.serviceProperties.service=http://${cas.host.name}/services/j_acegi_cas_security_check
    cas.securityContext.casProcessingFilterEntryPoint.loginUrl=http://${cas.host.name}/login
    cas.securityContext.ticketValidator.casServerUrlPrefix=http://${cas.host.name}

Consider also what to do about http vs https. Inventing a ${cas.httpOrHttps} might be worthwhile:

  1. Security settings
    cas.securityContext.serviceProperties.service=${cas.httpOrHttps}://${cas.host.name}/services/j_acegi_cas_security_check
    cas.securityContext.casProcessingFilterEntryPoint.loginUrl=${cas.httpOrHttps}://${cas.host.name}/login
    cas.securityContext.ticketValidator.casServerUrlPrefix=${cas.httpOrHttps}://${cas.host.name}

Such that the cas.properties file could start with

  1. The host name of the CAS server
    cas.host.name=localhost

  1. Whether the CAS server is available over http (quick demo) or https (real usage).

  2. Should either have value 'http' or 'https'
    cas.httpOrHttps=http

Cf. Virginia Tech's local CAS implementation, which benefits already from this abstraction: https://svn.middleware.vt.edu/svn/middleware/cas/cas-server/tags/cas-server-3.4.6/vt-cas-server-webapp/cas.properties.sample

Environment

None

Status

Assignee

ScottS

Reporter

Andrew Petro

Estimated End Date

None

Audience

None

Fix versions

Priority

Trivial