CAS 5.3.x WS-Federation JPA ticket registry error

78 views
Skip to first unread message

abdelrahman halawa

unread,
Jul 2, 2019, 5:11:28 AM7/2/19
to CAS Community
Hello,
I'm using CAS v5.3.9. I want to use WS-federation feature so I added these dependencies into pom.xml

<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-ws-sts</artifactId>
<version>${cas.version}</version>
</dependency>
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-ws-idp</artifactId>
<version>${cas.version}</version>
</dependency>


After that, when I was adding JPA ticket registry {

<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-jpa-ticket-registry</artifactId>
<version>${cas.version}</version>
</dependency>
 }

I got this error

2019-07-02 11:54:37,058 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casBeanValidationPostProcessor' defined in class path resource [org/apereo/cas/config/CasCoreUtilConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ticketTransactionManager' defined in class path resource [org/apereo/cas/config/JpaTicketRegistryConfiguration.class]: Unsatisfied dependency expressed through method 'ticketTransactionManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketEntityManagerFactory' defined in class path resource [org/apereo/cas/config/JpaTicketRegistryConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity: org.apereo.cas.ticket.SecurityTokenTicket>

Any help?
​​

abdelrahman halawa

unread,
Jul 2, 2019, 8:15:40 PM7/2/19
to CAS Community
By the way, I solved that error by myself. If anyone faced this issue I will help him for free. Just send an email to me :)

Ray Bon

unread,
Jul 2, 2019, 8:27:55 PM7/2/19
to cas-...@apereo.org
You could just reply to this thread with the solution and it will then be available for anyone that searches for this issue.

Ray
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.

AT

unread,
Jul 2, 2019, 9:07:57 PM7/2/19
to CAS Community
Hi, so you managed to get ws-federation idp going with version 5.3.9? It would really be amazing if you could post your cas.properties, pom.xml and services configuration.
Were you able to configure claims as well?

I have been trying to get ws-federation idp to work for a while, it would be great if you helped with your solution.

Best.  
 

abdelrahman halawa

unread,
Jul 8, 2019, 9:25:57 AM7/8/19
to CAS Community
here is my configuration:

cas.authn.wsfedIdp.idp.realm=urn:org:apereo:cas:ws:idp:realm-CAS
cas.authn.wsfedIdp.idp.realmName=CAS

cas.authn.wsfedIdp.sts.subjectNameIdFormat=unspecified
cas.authn.wsfedIdp.sts.encryptTokens=false

cas.authn.wsfedIdp.sts.signingKeystoreFile=file:etc/cas/sts/ststrust.jks
cas.authn.wsfedIdp.sts.signingKeystorePassword=storepass

cas.authn.wsfedIdp.sts.encryptionKeystoreFile=file:etc/cas/sts/stsencrypt.jks
cas.authn.wsfedIdp.sts.encryptionKeystorePassword=storepass

cas.authn.wsfedIdp.sts.realm.keystoreFile=file:etc/cas/sts/stsrealm_a.jks
cas.authn.wsfedIdp.sts.realm.keystorePassword=storepass
cas.authn.wsfedIdp.sts.realm.keystoreAlias=realma
cas.authn.wsfedIdp.sts.realm.keyPassword=storepass
cas.authn.wsfedIdp.sts.realm.issuer=CAS

cas.authn.wsfedIdp.sts.crypto.signing.key=uPrx3XsirSbRMy1EjXGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
cas.authn.wsfedIdp.sts.crypto.signing.keySize=512
cas.authn.wsfedIdp.sts.crypto.encryption.key=GBztWJMRrQucEVxxxxxxxxxxxxxxxxxxxxxxxxxxxx
cas.authn.wsfedIdp.sts.crypto.encryption.keySize=256
cas.authn.wsfedIdp.sts.crypto.enabled=true


Also when I was adding relying party in CAS I have to set appliesTo to null (i.e I didn't use appliesTo)

Finally, I suggest using Hazelcast for Ticket registry instead of JPA. 

On Tuesday, 2 July 2019 11:11:28 UTC+2, abdelrahman halawa wrote:

Test

unread,
Nov 20, 2019, 12:04:06 AM11/20/19
to CAS Community, abdelrah...@gmail.com
@abdelrahman halawa can send your email , please?
Reply all
Reply to author
Forward
0 new messages