CAS 5.2.2 SAML IdP vs. Workday

365 views
Skip to first unread message

cur...@newschool.edu

unread,
Mar 13, 2018, 3:34:16 PM3/13/18
to CAS Community
We are trying to configure our Workday Preview tenant to authenticate via SAML2 to a CAS 5.2.2 IdP. 

In the management webapp, we have defined a "SAML2 Service Provider" service. The EntityID is set to:


which matches the EntityID in the SP's metadata.  When we try to log in to Workday, we receive this error from the Workday side:

Invalid Audience in SAML token: URL should start with http://www.workday.com, or end with /xxxxx/login-saml.htmld

The string they're saying it should end with is the tenant name ("xxxxx") and the name of the web page (login-saml.htmld) that is listed in the metadata as the AssertionConsumerService. However, CAS is sending back the EntityID as the audience:

        <saml2:Conditions NotBefore="2018-03-13T16:39:12.776Z" NotOnOrAfter="2018-03-13T16:39:17.776Z">
            <saml2:AudienceRestriction>
                <saml2:Audience>https://impl.workday.com/xxxxx</saml2:Audience>
            </saml2:AudienceRestriction>
        </saml2:Conditions>

which appears to be correct behavior in the normal (non-Workday) world.

On our old CAS 3.5.x/Shibboleth 2.4.0 setup (which the same Workday tenant works successfully with), we had to add a line in the relying party profile configuration (in relying-party.xml) to address this:

<saml:Audience>http://www.workday.com</saml:Audience>

which results in the SAML2 response sent back to Workday containing two audiences:

      <saml2:Conditions NotBefore="2018-03-13T13:44:01.503Z" NotOnOrAfter="2018-03-13T13:49:01.503Z">
         <saml2:AudienceRestriction>
            <saml2:Audience>https://impl.workday.com/xxxxx</saml2:Audience>
            <saml2:Audience>http://www.workday.com</saml2:Audience>
         </saml2:AudienceRestriction>
      </saml2:Conditions>

However, I don't see any way to perform the equivalent, either through the management webapp's user interface or by editing the service registry manually. And I don't see anything in the documentation or searching the code on GitHub.

We are NOT using the cas-server-support-saml-sp-integrations dependency.... should we be?

Does anyone have CAS 5.2.x SAML IdP working with Workday, especially a sandbox/implementation/preview tenant?

Any ideas (even crazy ones) gladly accepted...

Thanks,
--Dave

David Curry

unread,
Mar 14, 2018, 12:26:22 PM3/14/18
to cas-...@apereo.org
Following up my own post to document how we solved this for posterity (or at least for the next person who has the problem and searches the forum).

The SAML2 spec says that by default, the audience should be set to the value of the entityID. And sure enough, that's what CAS is sending back.

This morning I remembered that although the CONVENTION is to use the SP's URL as the entityID, that's not actually a requirement. So... I edited the Workday SP metadata (which Workday doesn't provide anyway; you have to create your own) and changed the entityID from


to


This is not a valid URL, but it starts with "http://www.workday.com" like Workday wants for the audience. I also changed the CAS service registry entry to look for the new entityID.

I did NOT change the URL further down in the metadata where the AssertionConsumerService is specified. It's still set to a real, functional URL:


So now, the CAS IdP will still post the results to the AssertionConsumerService URL, but it will set the audience restriction to the entityID, which now looks like what Workday wants, and Workday is a happy camper.

Not sure if this will work in all cases, but it seems to have worked in this one.

--Dave

--

DAVID A. CURRY, CISSP
DIRECTOR OF INFORMATION SECURITY
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

The New School


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/93ff6e18-8090-4664-b84f-a01702cbf053%40apereo.org.

Danny

unread,
Nov 29, 2018, 3:08:01 PM11/29/18
to CAS Community
I'm working on getting CAS 5.3 SAML2 IdP working with Workday, but not making much progress.  Workday says the metadata file isn't required, but I can't see anyway to set it up with out one.  Can you give more details on how you go this to work?

Thanks 

David Curry

unread,
Nov 29, 2018, 3:37:00 PM11/29/18
to cas-...@apereo.org
You do need to create a metadata file; Workday won't do it for you. We use this site:


Once you've created it for one Workday tenant, you can just copy it and edit the XML directly for the other tenants; you don't have to use this site for each tenant.

Then do something like this (copied from our internal wiki, and I'm not the Workday guy, so I hope it makes sense to you!)

Configure Workday: Edit Tenant Setup - Security

  1. Single Sign-on

    1. Redirection URLs
  2. SAML Setup
    • Enable SAML Authentication  (tick)

    • x509 Private Key Pair: YOURPRIVATEKEYPAIR
    • Enable Mobile Browser SSO for Native Apps (error)
    • Enable Certificate Based SSO (error)
    • Enable Dynamic Certificate Pinning (error)
    • Service Provider ID: http://www.workday.com/YOURTENANTNAME
    • Enable SP Initiated SAML Authentication (Will be Deprecated)  (tick)
    • IdP SSO Service URL: https://YOURCASSERVER/cas/idp/profile/SAML2/POST/SSO
    • Sign SP-initiated Authentication Request (tick)
    • Do Not Deflate SP-initiated Authentication Request (tick)
    • Always Require IdP Authentication (error)
    • Authentication Request Signature Method: SHA256
    • Enable Signature KeyInfo Validation (error)
    1. SAML Identity Providers
      1. Identity Provider Name: SSO (CAS 5)
        • Disabled (error)
        • Issuer: https://YOURCASSERVER/cas/idp
        • x509 Certificate: YOUR CAS SIGNING CERT (/etc/cas/saml/idp-signing.crt)
          1. As of Workday 27, the cert must begin with "-----BEGIN CERTIFICATE-----" and end with "-----END CERTIFICATE-----".

        • Enable IdP Initiated Logout (error)

        • Logout Response URL:

        • Enable Workday Initiated Logout (tick)

        • Logout Request URL: https://YOURCASESERVER/logout/myday/YOURTENANTNAME.html

        • Use Unspecified Name ID Format for Logout Request (error)

        • SP Initiated (error)

        • IdP SSO Service URL:

        • Managed Device Attribute:

        • Used for Environments: Production


Note: for "Logout Request URL" we send the users to a little "logout" page rather than the standard SAML logout. This is OPTIONAL. We put ours in .../tomcat/webapps/ROOT/logout/myday/YOURTENANTNAME.html on the CAS server.  It's basically just this:

<body>
  <div class="container">
    <div class="well">
      <img id="logo" src="myday-logo.png"/>
      <p>You have either logged out or timed out of your Workday session. To
        protect your sensitive information, we recommend that you close
        your browser.</p>
      <p>You may also <a href="https://www.myworkday.com/YOURTENANTNAME">
        log in to Workday again</a>.</p>
    </div>
  </div>
</body>

The metadata we upload (generated by the site above) looks like the attached.

Hope this helps.

--Dave


--

DAVID A. CURRY, CISSP
DIRECTOR OF INFORMATION SECURITY

THE NEW SCHOOL  INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/998a97d5-c952-4c81-8593-4da80388959b%40apereo.org.
metadata.xml

Danny

unread,
Nov 29, 2018, 4:17:57 PM11/29/18
to CAS Community
 Much obliged...I was pretty close with what I had found perusing Shibboleth docs for Workday setup.  I'll see if it works now!

Matthew Uribe

unread,
Feb 14, 2020, 6:12:03 PM2/14/20
to CAS Community
Dave,

Huge help, as always! Thank you for your post regarding Workday config.

Matt U.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-...@apereo.org.
Reply all
Reply to author
Forward
0 new messages