Please help in this regard, I have been struggling for more than a week now to solve this one, however, no success. I have tried all possible changes from my side.
Logs which I get in catalina.out:
2017-09-19 09:45:20,094 WARN [org.jasig.cas.CentralAuthenticationServiceImpl] - <ServiceManagement: Unauthorized Service Access. Service [http://hidden1:9001/ssomanager/c/SSB] not found in Service Registry.>
2017-09-19 09:45:20,094 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: CASAdmin
WHAT: http://hidden:9001/ssomanager/c/SSB
ACTION: SERVICE_TICKET_NOT_CREATED
APPLICATION: CAS
WHEN: Tue Sep 19 09:45:20 AST 2017
CLIENT IP ADDRESS: <abc>
SERVER IP ADDRESS: <pqr>
=============================================================
On the front end I get the below error:
Application Not Authorized to Use CAS
The application you attempted to authenticate to is not authorized to use CAS.
cas.properties file:
server.prefix=https://hidden1:8443/cas
cas.securityContext.serviceProperties.service=${server.prefix}/services/j_acegi_cas_security_check
# Names of roles allowed to access the CAS service manager
cas.securityContext.serviceProperties.adminRoles=ROLE_ADMIN
cas.securityContext.casProcessingFilterEntryPoint.loginUrl=${server.prefix}/login
cas.securityContext.ticketValidator.casServerUrlPrefix=${server.prefix}
cas.themeResolver.defaultThemeName=cas-theme-default
cas.viewResolver.basename=default_views
host.name=hidden1
#database.hibernate.dialect=org.hibernate.dialect.OracleDialect
#database.hibernate.dialect=org.hibernate.dialect.MySQLDialect
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
deployerConfigContext.xml has these entries to open the application, still, it's not going through:
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="2" />
<property name="name" value="SSO Manager" />
<property name="description" value="CAS Client for SSB/INB" />
<property name="serviceId" value="http://hidden:9001/ssomanager/c/**" />
<property name="allowedAttributes">
<list>
<value>uid</value>
<value>UDC_IDENTIFIER</value>
</list>
</property>
<property name="evaluationOrder" value="10000002" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="1" />
<property name="name" value="CAS Managed Services" />
<property name="description" value="CAS Managed Services Endpoint" />
<property name="serviceId" value="https://hidden1:8443/cas/services/**" />
<property name="allowedAttributes">
<list>
<value>uid</value>
<value>UDC_IDENTIFIER</value>
</list>
</property>
<property name="evaluationOrder" value="10000001" />
</bean>
Folder Structure:
[tomcat@bancas cas-server-3.4.12.1]$ ls
assembly.xml cas-server-integration-memcached cas-server-support-legacy cas-server-support-x509 modules
cas-server-core cas-server-integration-restlet cas-server-support-openid cas-server-uber-webapp notice.txt
cas-server-documentation cas-server-support-generic cas-server-support-radius cas-server-webapp pom.xml
cas-server-integration-berkeleydb cas-server-support-jdbc cas-server-support-spnego INSTALL.txt tasks.xml
cas-server-integration-jboss cas-server-support-ldap cas-server-support-trusted license.txt
[tomcat@bancas cas-server-3.4.12.1]$
[tomcat@bancas cas-server-3.4.12.1]$ cd cas-server-webapp/
[tomcat@bancas cas-server-webapp]$
[tomcat@bancas cas-server-webapp]$ ls
old_targets pom.xml pom.xml_orig src target
[tomcat@bancas cas-server-webapp]$
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.jasig.cas</groupId>
    <artifactId>cas-server</artifactId>
    <version>3.4.12.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jasig.cas</groupId>
  <artifactId>cas-server-webapp</artifactId>
  <packaging>war</packaging>
  <name>JA-SIG CAS Web Application</name>
  <dependencies>
<!-- LDAP SUPPORT -->
    <dependency>
      <groupId>org.jasig.cas</groupId>
      <artifactId>cas-server-support-ldap</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
    </dependency>
<!-- Apache Commons DBCP for Java 6 (use version 1.3 for Java 5 or lower)-->
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.4</version>
      <scope>runtime</scope>
    </dependency>
<!-- Hibernate Core and Entity Manager -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>${hibernate.core.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>${hibernate.core.version}</version>
      <scope>runtime</scope>
    </dependency>
<!-- Oracle JDBC Driver -->
    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc6</artifactId>
      <version>11.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>com.github.inspektr</groupId>
      <artifactId>inspektr-support-spring</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-cas-client</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-config</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jasig.cas</groupId>
      <artifactId>cas-server-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context-support</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.opensymphony.quartz</groupId>
      <artifactId>quartz</artifactId>
      <version>1.6.1</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>ognl</groupId>
      <artifactId>ognl</artifactId>
      <version>2.7.3</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <warName>cas</warName>
                    <webResources>
                        <resource>
              <directory>${basedir}/src/main/webapp/WEB-INF</directory>
              <filtering>true</filtering>
              <targetPath>WEB-INF</targetPath>
              <includes>
                <include>**/web.xml</include>
              </includes>
            </resource>
                    </webResources>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
Not able to figure out where is the problem or If I need to provide more information please do let me know.
Thanks in advance.
I almost forgot about fiddling with "deployerConfig.xml"!
In newer CAS versions, you pretty much don't mess around with Java beans and XML files anymore.
There are different "service registry" components you can swap in for CAS. The JSON service registry is a pretty popular flat file approach, but there are a lot of different types:
 https://apereo.github.io/cas/5.1.x/installation/Service-Management.html
By default, CAS 5.1.x also uses regular expression syntax instead of Apache ant globbing (**).
Your service definition looks good to me (it matches the "WHAT" in the error). But apache ant style globbing was always a source of headaches for me.
Thanks,
Carl Waldbieser
ITS Identity Management
Lafayette College
----- Original Message -----
From: "Gunny Kc" <gun...@gmail.com>
To: "waldbiec" <wald...@lafayette.edu>
Cc: "CAS Developer" <cas...@apereo.org>
Sent: Monday, September 25, 2017 1:32:18 PM
Subject: Re: [cas-dev] Application Not Authorized to Use CAS (SERVICE_TICKET_NOT_CREATED)
I have configured my 2 URLs in deployerConfigContext.xml:
CAS URL is SSL Protected with Orignal Certificates.
I did not understand this part - what CAS service registry are you using? -
What do you mean by this?
This is my first CAS Setup - so not having the full knowledge about it.
Please suggest.
On Mon, Sep 25, 2017 at 6:57 PM, Waldbieser, Carl <wald...@lafayette.edu>
wrote:
>
> With CAS 5, the JSON service registry splits each service definition into
> its own file. Here is an example definition for BEIS:
>
>Â Â Â {
>Â Â Â Â "@class" : "org.apereo.cas.services.RegexRegisteredService",
>Â Â Â Â "serviceId" : "https://banner-server.example.org/.*",
>Â Â Â Â "id" : 1100,
>Â Â Â Â "evaluationOrder" : 1100,
>Â Â Â Â "name" : "Banner Self-service",
>Â Â Â Â "description" : "Some description",
>Â Â Â Â "logo" : "https://path/to/your/logo.jpg",
>Â Â Â Â "attributeReleasePolicy" : {
>Â Â Â Â Â "@class" : "org.apereo.cas.services.ReturnAllowedAttributeReleaseP
> olicy",
>Â Â Â Â Â "allowedAttributes" : [ "java.util.ArrayList",
>Â Â Â Â Â Â Â [
>Â Â Â Â Â Â Â Â Â "UDC_IDENTIFIER"
>Â Â Â Â Â Â Â ]
>Â Â Â Â Â ]
>Â Â Â Â },
>Â Â Â Â "properties" : {
>Â Â Â Â Â "@class" : "java.util.HashMap",
>Â Â Â Â Â "InformationURL" : {
>Â Â Â Â Â Â "@class" : "org.apereo.cas.services.
> DefaultRegisteredServiceProperty",
>Â Â Â Â Â Â "values" : [ "java.util.HashSet", [ "
> https://path/to/online/docs.html" ] ]
>Â Â Â Â Â }
>Â Â Â Â }
>Â Â Â }
>
> For your more immediate problem, what CAS service registry are you using?
> And how do you have it configured to allow your (test?) instance of Banner?
>
> Thanks,
> Carl Waldbieser
> ITS Identity Management
> Lafayette College
>
>
> ----- Original Message -----
> From: "Gunny Kc" <gun...@gmail.com>
> To: "waldbiec" <wald...@lafayette.edu>
> Cc: "CAS Developer" <cas...@apereo.org>
> Sent: Monday, September 25, 2017 11:44:49 AM
> Subject: Re: [cas-dev] Application Not Authorized to Use CAS
> (SERVICE_TICKET_NOT_CREATED)
>
> Thank you, Carl.
>
> I am still not convinced why Cas Version 3 is not allowing the
> registered services and I have been struggling with for more than 10 days
> now. I have started version 4 and it is also giving me error while
> generating war file.
>
> I will see what are the challenges for me with version 5. I need to give
> justification too to go for 5.
>
> Are there the same files we need to edit for version 5 too? Is it possible
> for you to share those files after removing your custom links?
>
> Sorry If I have been asking more.
>
>
>
> On Mon, Sep 25, 2017 at 5:33 PM, Waldbieser, Carl <wald...@lafayette.edu>
> wrote:
>
> >
> > We used to use CAS 3.x as recent as a year ago. We used it with Banner
> > (ala BEIS).
> > We've since upgraded to CAS server v5.1.x and have had no issues with it.
> > The new server still supports the old /samlValidate endpoint, which I
> > believe BEIS uses to get the UDC_IDENTIFIER.
> >
> > Some configuration for the CAS server itself has changed, but it is
> > generally for the better and a lot easier to manage.
> >
> > One thing worth pointing out is that during testing, if you are not using
> > TLS for your Banner test instance, CAS v5.1.x doesn't want to release
> > attributes to an HTTP-only service (it will still validate the ST and
> > return the cas-user). I'd suggest using self-signed certs for testing.
> >
> > Thanks,
> > Carl Waldbieser
> > ITS Identity Management
> > Lafayette College
> >
> > > - <Audit trail record BEGIN=========================
> > > ====================================
Hi Team,I am stuck here now - I have imported CAS Certs at all possible paths on BEIS Server (cacerts, demostore, demotrust) still I am stuck here. It's failing at step 6 as per below processing steps:How can I troubleshoot this one? Any suggestion, please.On Wed, Sep 27, 2017 at 10:43 AM, Gunny Kc <gun...@gmail.com> wrote:Okay. Thank You.On Wed, Sep 27, 2017 at 10:37 AM, Matt Borja <matt....@gmail.com> wrote:I believe you'll see errors along the lines of PKIX path not found if it's related to server name or FQDN as this indicates Java is able to connect but cannot find a trusted certificate path/root which (i.e. missing cert in local JRE cacerts, server name mismatch, etc.).The SSLPoke class (https://gist.github.com/4ndrej/4547029) is also useful for further debugging SSL connections outside of the application itself.On Wed, Sep 27, 2017 at 12:33 AM, Gunny Kc <gun...@gmail.com> wrote:Thanks Matt for your prompt reply. Let me try to fix this handshake problem. I will update you1 Question: Is there anything to do with FQDN for handshake?ÂOn Wed, Sep 27, 2017 at 10:23 AM, Matt Borja <matt....@gmail.com> wrote:Yes, it looks like that did it and you are getting a service ticket issued now. Congrats :)The handshake failure is likely due to ciphers and your version of Java. The way we deploy ours is behind a load balancer/reverse proxy that defines a cipher suite BEIS will work with (i.e. cas.example.com:443 is actually the load balancer with a working cipher suite that is also forwarding traffic to origin services on port 8443, etc.).Without this sort of configuration, you'll have to determine what cipher suite/order BEIS will negotiate with and define that in your Connectors in your Tomcat instance for the CAS application.I'm actually out of the office this week, but I have emails that cover this specific error and I'm fairly certain it has to do with ciphers. I'll have to dig through those to confirm, however.On Wed, Sep 27, 2017 at 12:12 AM, Gunny Kc <gun...@gmail.com> wrote:I changed it like below as you said:<bean class="org.jasig.cas.services.RegexRegisteredService">
                <property name="id" value="2" />                <property name="name" value="SSO Manager" />                <property name="description" value="CAS Client for SSB/INB" />
                <property name="serviceId" value="https?://dev\-banbeis\.example.com(:\d+)?/ssomanager/c/.*" />
                <property name="allowedAttributes">                <list>                <value>uid</value>
                <!--value>UDC_IDENTIFIER</value-->
                </list>                </property>                <property name="evaluationOrder" value="10000002" />        </bean>
Step 2: https://bancas.example.com:8443/cas/login?service=http%3A%2F%2Fdev-banbeis.example.com%3A9001%2Fssomanager%2Fc%2FSSBÂ Â <-- Here I get a CAS Login PageStep 3: http://dev-banbeis.example.com:9001/ssomanager/c/SSB?ticket=ST-4-ec1BYc9F9tenPtcL6kW4-bancas.example.com <-- I think the issue is resolved now ??On this page I am getting below error:Error 500--Internal Server Errorjava.lang.RuntimeException: javax.net.ssl.SSLException: Received fatal alert: handshake_failureat org.jasig.cas.client.validation.Saml11TicketValidator.retrieveResponseFromServer(Saml11TicketValidator.java:203)at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:178)at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:132)at com.ellucian.sso.client.web.filter.SSOValidationFilter.doFilter(Unknown Source)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:102)at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)at com.ellucian.sso.client.web.filter.QueryParamStorageFilter.doFilter(Unknown Source)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)Caused by: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639)at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1607)at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1776)at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1068)at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:890)at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:664)at weblogic.security.SSL.jsseadapter.JaSSLEngine$5.run(JaSSLEngine.java:134)at weblogic.security.SSL.jsseadapter.JaSSLEngine.doAction(JaSSLEngine.java:732)
at weblogic.security.SSL.jsseadapter.JaSSLEngine.unwrap(JaSSLEngine.java:132)at weblogic.socket.JSSEFilterImpl.unwrap(JSSEFilterImpl.java:505)
at weblogic.socket.JSSEFilterImpl.unwrapAndHandleResults(JSSEFilterImpl.java:448)
at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:80)at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:64)at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:59)at weblogic.socket.JSSEFilterImpl.write(JSSEFilterImpl.java:390)at weblogic.socket.JSSESocket$JSSEOutputStream.write(JSSESocket.java:78)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)at java.io.FilterOutputStream.flush(FilterOutputStream.java:140)
at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:186)at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:280)
at org.jasig.cas.client.validation.Saml11TicketValidator.retrieveResponseFromServer(Saml11TicketValidator.java:186)... 21 moreOn Wed, Sep 27, 2017 at 8:22 AM, Matt Borja <matt....@gmail.com> wrote:You may need to escape a couple other regex characters (i.e. hyphen and literal periods).So:https?://dev\-banbeis\.example\.com(:\d+)?/ssomanager/c/.*What does your login URL look like when you're at the CAS login page with the service URL in your address bar?On Tue, Sep 26, 2017 at 10:14 PM, Gunny Kc <gun...@gmail.com> wrote:Hi Matt,Sorry for replying late. I changed as you recommended(generated a new cas.war file and deployed under tomcat and started tomcat):<bean class="org.jasig.cas.services.RegexRegisteredService">
                <property name="id" value="2" />                <property name="name" value="SSO Manager" />                <property name="description" value="CAS Client for SSB/INB" />
                <property name="serviceId" value="https?://dev-banbeis.example.com(:\d+)?/ssomanager/c/.*" />
                <property name="allowedAttributes">                <list>                <value>uid</value>
                <!--value>UDC_IDENTIFIER</value-->
                </list>                </property>                <property name="evaluationOrder" value="10000002" />        </bean>
But still same issue. Is there any chance that it's still picking up from cache? Do I need to clean something before trying the above one? Please suggest.Thanks!On Tue, Sep 26, 2017 at 9:16 AM, Matt Borja <matt....@gmail.com> wrote:Try changing out the bean:<bean class="org.jasig.cas.services.RegisteredServiceImpl">to:<bean class="org.jasig.cas.services.RegexRegisteredService">and use that pattern I gave you. This may be why your efforts to match have been unsuccessful to date.Also, as mentioned by another user, you ought to seriously consider at least CAS 5.1.1-SNAPSHOT. We have BEIS (Banner 8) deployed at work and assuming a proper service configuration (regex serviceId), it works just fine. More importantly, you're not throwing away hours invested into a version of CAS that is now end-of-life.On Mon, Sep 25, 2017 at 10:39 PM, Gunny Kc <gun...@gmail.com> wrote:I am using cas-server-3.4.12.1- and why I chose this old version - because there is only 1 document available with Ellucian for this version, else I could have tested with the latest version. Now I am stuck at this and not proceeding further.I would be happy to share with you any configuration file you want - I am really desperate to get this thing configured.Thank you.On Tue, Sep 26, 2017 at 8:33 AM, Matt <matt...@gmail.com> wrote:BEIS should support CAS 5.1.x and uses /samlValidate (YaleCAS used /serviceValidate).Given a login URL of:You would get the following if that service URL was not whitelisted:
WARN [org.jasig.cas.CentralAuthenticationServiceImpl] - <ServiceManagement: Unauthorized Service Access. Service [http://hidden1:9001/ssomanager/c/SSB] not found in Service Registry.>
I guess it might be good to go back to a working configuration you had before and then start with a permissive pattern (i.e. only matching https://) and slowly build it back up to a more proper whitelist pattern for BEIS.What version of CAS are you running that you're trying to do this with?On Mon, Sep 25, 2017 at 8:26 PM, Matt <matt...@gmail.com> wrote:Will try to reply later tonight. We deployed CAS 5.1.1-SNAPSHOT with BEIS.
<Connector
sslProtocol="TLS"
sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2,SSLv2Hello"
...
/>