Hello Misagh,
We are trying to configure apereo
cas server with a mysql database. We have successfully managed to setup
the connection and fetch all the attributes.
In our case we want the user to login via the email. So we have configured the main auth functionality as shown below.
cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE email=?
cas.authn.jdbc.query[0].healthQuery=
cas.authn.jdbc.query[0].isolateInternalQueries=false
cas.authn.jdbc.query[0].url=jdbc:mysql://example/cas_server_db
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
cas.authn.jdbc.query[0].user=exampleUser
cas.authn.jdbc.query[0].password=examplePass
cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver
cas.authn.jdbc.query[0].fieldPassword=password
cas.authn.jdbc.query[0].passwordEncoder.type=org.defrox.bcrypt.BCryptPasswordEncoder
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
Also we have this and works fine.
cas.authn.attributeRepository.jdbc[0].singleRow=true
cas.authn.attributeRepository.jdbc[0].url=jdbc:mysql://example/cas_server_db
cas.authn.attributeRepository.jdbc[0].sql=SELECT * FROM attributes WHERE {0}
cas.authn.attributeRepository.jdbc[0].requireAllAttributes=true
cas.authn.attributeRepository.jdbc[0].username=email
cas.authn.attributeRepository.jdbc[0].driverClass=com.mysql.jdbc.Driver
cas.authn.attributeRepository.jdbc[0].user=exampleUser
cas.authn.attributeRepository.jdbc[0].password=examplePass
cas.authn.attributeRepository.jdbc[0].dialect=org.hibernate.dialect.MySQLDialect
Our db schema is:

Our problem is that we want perform the query with
users.id = attributes.user_id.
Is this possible and how we have to change the properties configuration to achieve this?
Note that we have already asked on gitter chat and we have informed that
this is possible only by overriding the default person directory’s
aggregator/cascading functionality.
If this is the only way, how we can achieve that as we use the cas overlay template master and where is the default one?
Thanks in advance.