Path support in CAS client serverName config

16 views
Skip to first unread message

Joshua Smith

unread,
Oct 9, 2018, 2:29:36 PM10/9/18
to CAS Community
When constructing service URLs, the CAS client overwrites any path included in the serverName with the path from the incoming ServletRequest. I found this behavior problematic when deploying a CAS-protected application behind a proxy with a path prefix (i.e. https://my.proxy.com/app -> https://app.my.server.com), because the CAS client isn't aware of the path prefix. As recently as version 3.3.3, the CAS client supported serverName paths and when support was removed, it was part of the PR that cloned the Apache http-client URIBuilder for constructing the URL: https://github.com/apereo/java-cas-client/pull/105. I assumed this was a bug and so have submitted a pull request to fix it: https://github.com/apereo/java-cas-client/pull/248.

Reviewing the .NET CAS client, though, it also appears to overwrite the serverName path: https://github.com/apereo/dotnet-cas-client/blob/master/DotNetCasClient/Utils/UrlUtil.cs#L100. So now I'm unsure about the expected behavior. Is the serverName config intended to support a path? And if not how can I deploy a CAS protected app behind a proxy where the proxied path doesn't match the application path?
Reply all
Reply to author
Forward
0 new messages