Jasig/cas — pull request #694 by mmoayyed (2014-09-18 07:46:50+00:00)
Title: Configuration of host.name in multi-node deployments

Deals with #684

##Summary

The default CAS ticket id generator, that is based on `DefaultUniqueTicketIdGenerator` is configured to receive a `suffix` parameter that is appended to generated ticket identifiers. This `suffix` parameter is typically configured the key `host.name` in the `cas.properties`.

In multi-node CAS deployments, configuring the `suffix` parameter to match individual host names, or at least identifiers that closely resemble the host name id is useful for troubleshooting and diagnostics purposes, such that an adopter through appropriate log files would be able to figure out the origins of a vended ticket. This then requires that various versions of the `cas.properties` file for instance be kept around, each of which would include the unique identifier for the appropriate CAS node.

This is a `HostNameBasedUniqueTicketIdGenerator` that is able to auto-configure the ticket suffix based on the host name. The implementation carefully appends the first part of the host name to the ticket id, so as not moderately provide a relevant unique value mapped to the host name AND not auto-leak infrastructure data out into the configuration and logs.

* If the CAS node name is `cas-01.sso.edu` then, the suffix determined would just be `cas-01`
* If the CAS node name is `cas-01` then, the suffix determined would just be `cas-01`

## Configuration
In `uniqueIdGenerators.xml`, adjust the following settings:

```xml

```

Note: the auto-configuration of the `suffix` is *only* activated if the `suffix` parameter of the `HostNameBasedUniqueTicketIdGenerator` is left blank.