Hi Mohammad , I have used Database Authentication on Postgres.
Please find the below details that i have used in application.properties. ## # CAS Authentication # cas.authn.jdbc.encode[0].numberOfIterations=5 cas.authn.jdbc.encode[0].numberOfIterationsFieldName=hash_iteration cas.authn.jdbc.encode[0].saltFieldName=salt cas.authn.jdbc.encode[0].staticSalt=STATIC_SALT cas.authn.jdbc.encode[0].sql=select * from users where username=? cas.authn.jdbc.encode[0].algorithmName=SHA-512 cas.authn.jdbc.encode[0].passwordFieldName=password cas.authn.jdbc.encode[0].healthQuery=SELECT 1 cas.authn.jdbc.encode[0].isolateInternalQueries=false cas.authn.jdbc.encode[0].url=jdbc:postgresql://localhost:5432/casdb cas.authn.jdbc.encode[0].failFast=true cas.authn.jdbc.encode[0].isolationLevelName=ISOLATION_READ_COMMITTED cas.authn.jdbc.encode[0].dialect=org.hibernate.dialect.PostgreSQLDialect cas.authn.jdbc.encode[0].leakThreshold=10 cas.authn.jdbc.encode[0].propagationBehaviorName=PROPAGATION_REQUIRED cas.authn.jdbc.encode[0].batchSize=1 cas.authn.jdbc.encode[0].user=postgres cas.authn.jdbc.encode[0].ddlAuto=update cas.authn.jdbc.encode[0].maxAgeDays=180 cas.authn.jdbc.encode[0].password=postgres cas.authn.jdbc.encode[0].autocommit=false cas.authn.jdbc.encode[0].driverClass=org.postgresql.Driver cas.authn.jdbc.encode[0].idleTimeout=5000 ## # CAS Authentication Attributes # cas.authn.attributeRepository.attributes.uid=username #cas.authn.attributeRepository.attributes.displayName=displayName #cas.authn.attributeRepository.attributes.cn=commonName #cas.authn.attributeRepository.attributes.affiliation=groupMembership cas.authn.attributeRepository.attributes.last_name=last_name cas.authn.attributeRepository.attributes.first_name=first_name cas.authn.attributeRepository.attributes.user_role=user_role On Friday, February 17, 2017 at 11:10:32 PM UTC+5:30, Mohamad Anbari wrote: > > Hi > > I am very new to cas, I have already checked > out cas-overlay-template-master (5.0.2) from git-hub and changed the > cas.properties and pom.xml in order to integrate cas server authentication > with oracle database but nothing happened after logging to the login page > of cas(Invalid credentials displayed). Also i have no interesting > information in my cas.log or cas_audit.log to find out the > misconfiguration. I have also created the appropriate table in oracle and > inserted username and password (generated by md5 algorithm). Anyway if > someone help me to understand i would be so grateful. > > This is my cas.properties file : > > > cas.server.name: https://localhost:8443 > cas.server.prefix: https://localhost:8443/cas > cas.adminPagesSecurity.ip=127\.0\.0\.1 > logging.config: file:/etc/cas/config/log4j2.xml > > > #database connection credentials > > cas.authn.jdbc.query[0].sql=SELECT password FROM MOB_LOGIN WHERE username > =? > cas.authn.jdbc.query[0].healthQuery=SELECT 1 FROM dev.MOB_LOGIN > cas.authn.jdbc.query[0].isolateInternalQueries=false > cas.authn.jdbc.query[0].url=jdbc:oracle:thin:@localhost:1521:orcl > cas.authn.jdbc.query[0].failFast=true > cas.authn.jdbc.query[0].isolationLevelName=ISOLATION_READ_COMMITTED > cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.OracleDialect > cas.authn.jdbc.query[0].leakThreshold=10 > cas.authn.jdbc.query[0].propagationBehaviorName=PROPAGATION_REQUIRED > cas.authn.jdbc.query[0].batchSize=1 > cas.authn.jdbc.query[0].user=dev > #cas.authn.jdbc.query[0].ddlAuto=create-drop > cas.authn.jdbc.query[0].maxAgeDays=180 > cas.authn.jdbc.query[0].password=dev > cas.authn.jdbc.query[0].autocommit=false > cas.authn.jdbc.query[0].driverClass=oracle.jdbc.OracleDriver > cas.authn.jdbc.query[0].idleTimeout=5000 > cas.authn.jdbc.query[0].credentialCriteria= > > > cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT > cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8 > cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5 > #cas.authn.jdbc.query[0].passwordEncoder.secret= > cas.authn.jdbc.query[0].passwordEncoder.strength=16 > > This is my dependencies added to the pom ( for integrating to oracle) : > <dependencies> > <dependency> > <groupId>org.apereo.cas</groupId> > <artifactId>cas-server-webapp</artifactId> > <version>${cas.version}</version> > <type>war</type> > <scope>runtime</scope> > </dependency> > <dependency> > <groupId>org.apereo.cas</groupId> > <artifactId>cas-server-support-jdbc</artifactId> > <version>${cas.version}</version> > </dependency> > <dependency> > <groupId>com.oracle</groupId> > <artifactId>ojdbc6</artifactId> > <version>11.2.0</version> > </dependency> > </dependencies> > > > * I attached all information to this post.* > Thanks > -- - CAS gitter chatroom: https://gitter.im/apereo/cas - CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html - CAS documentation website: https://apereo.github.io/cas - CAS project website: https://github.com/apereo/cas --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/2f451d28-81c2-4120-9728-2b4e6a1a60c9%40apereo.org.
