Apereo CAS - HappyFox SAML2 Integration


Collaborate
The blog is managed and hosted on GitHub. If you wish to update the contents of this post or if you have found an inaccuracy and wish to make corrections, we recommend that you please submit a pull request to this repository.

HappyFox is an all-in-one help desk ticketing system. As a SAML2 service provider, HappyFox can be integrated with CAS running as a SAML identity provider and this blog post provides a quick walkthrough of how to make that integration possible.

Our starting position is based on the following:

HappyFox Configuration

Use these instructions to set up HappyFox as a SAML2 service provider.

CAS Configuration

First, ensure that your CAS deployment is equipped to act as a SAML2 identity provider. Next, you may also use the JSON Service Registry to keep track of the HappyFox relying-party registration record in JSON definition files.

The JSON file to contain the service provider relying-party record would be as follows:

{
  "@class" : "org.apereo.cas.support.saml.services.SamlRegisteredService",
  "serviceId" : "https://[name].happyfox.com/saml/metadata/",
  "name" : "HappyFox",
  "description": "HappyFox",
  "id" : 1,
  "evaluationOrder" : 1,
  "metadataLocation" : "file:/etc/cas/config/saml/happyfox-metadata.xml",
  "usernameAttributeProvider" : {
    "@class" : "org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider",
    "usernameAttribute" : "mail"
  }
}

Note that HappyFox does not provide its own SP metadata and you will have to create it youself. The following is example of what that metadata may look like:

<?xml version="1.0"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
                     validUntil="2050-12-05T19:27:46Z"
                     cacheDuration="PT604800S"
                     entityID="https://[name].happyfox.com/saml/metadata/">
    <md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="false"
                        protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
        <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat>
        <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
                                     Location="https://[name].happyfox.com/saml/callback/"
                                     index="0" />
    </md:SPSSODescriptor>
</md:EntityDescriptor>

A few things to point out:

  • You will need to adjust the serviceId and metadataLocation to match your data and the HappyFox instance.
  • Make sure CAS has retrieved the allowed attributes (i.e. mail etc) listed in the JSON definition file. This is required in the final generated SAML2 response to create the proper NameIDFormat element.
  • Make sure the SP metadata has the correct entity id, matching your HappyFox instance address.

Finale

If you too have an integration with a well-known SAML2 service provider, please consider sharing that guide in form of a blog post here as well.

Misagh Moayyed

Related Posts

CAS 6.1.0 RC5 Feature Release

...in which I present an overview of CAS 6.1.0 RC5 release.

Apereo CAS - Handling Authentication Webflow Errors with Grace

Learn how to modify Apereo CAS to customize exception handling and produce localized error messages for your deployment.

Apereo CAS - Are We Logged In Yet?

Learn how to modify and extend a CAS deployment to determine whether an SSO session is still valid and tied to a user authentication session.

Apereo CAS - REST API Integrations

Learn how to integrate with CAS using its REST API to authenticate, exchange tickets and get access to user profiles and attributes.

CAS 6.1.0 RC4 Feature Release

...in which I present an overview of CAS 6.1.0 RC4 release.

Apereo CAS - Multifactor Provider Selection

Learn how to configure CAS to integrate with and use multiple multifactor providers at the same time. This post also reveals a few super secret and yet open-source strategies one may use to select appropriate providers for authentication attempts, whether automatically or based on a menu.

Apereo CAS - Dockerized Hazelcast Deployments

Learn how to run CAS backed by a Hazelcast cluster in Docker containers and take advantage of the Hazelcast management center to monitor and observer cluster members.

Apereo CAS - Configuration Security w/ Jasypt

Learn how to secure CAS configuration settings and properties with Jasypt.

CAS 6.1.0 RC3 Feature Release

...in which I present an overview of CAS 6.1.0 RC3 release.

Apereo CAS - Webflow Decorations

Learn how you may decorate the Apereo CAS login webflow to inject data pieces and objects into the processing engine for display purposes, peace on earth and prosperity of all mankind, etc. Mainly, etc.