Yes, define the AuthN handler yourself directly in the file as a bean. This is something the project is working on to make sure “auto configuration” can take into account multiple handlers and such.
From: [email protected] [mailto:[email protected]] On Behalf Of John Rellis Sent: Thursday, June 16, 2016 2:13 AM To: CAS Community <[email protected]> Subject: [cas-user] Possible to have more than one QueryDatabaseAuthenticationHandlers with diff properties? Hey folks, I need to authenticate against more than one database, each database has different schema and some have different password hash schemes. Authenticating against any one of these should equal a success. Is it possible to have more than one QueryDatabaseAuthenticationHandler with different properties for the following?? cas.authn.password.encoding.alg=SHA-256 cas.jdbc.authn.query.sql=select password_hash from shiro_user where username = ? Many thanks in advance! Currently this is snippet of my deployer <!-- Copied from https://github.com/apereo/cas/blob/4.2.x/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml - -> <util:map id="authenticationHandlersResolvers"> <!-- https://apereo.github.io/cas/4.2.x/installation/Configuring-Principal-Resolution.html#principalresolver-vs-authenticationhandler we want to use the --> <!-- we want to use the value returned from queryDatabaseAuthenticationHandler --> <entry key-ref="primaryAuthenticationHandler" value="#{null}"/> </util:map> <!-- https://apereo.github.io/cas/4.2.x/installation/Configuring-Authentication-Components.html#default-encoder - -> <alias name="defaultPasswordEncoder" alias="passwordEncoder"/> <!-- https://apereo.github.io/cas/4.2.x/installation/Database-Authentication.html --> <alias name="queryDatabaseAuthenticationHandler" alias="primaryAuthenticationHandler"/> <alias name="dataSource" alias="queryDatabaseDataSource"/> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" p:driverClass="${database.driverClass}" p:jdbcUrl="${database.url}" p:user="${database.user}" p:password="${database.password}" p:initialPoolSize="${database.pool.minSize}" p:minPoolSize="${database.pool.minSize}" p:maxPoolSize="${database.pool.maxSize}" p:maxIdleTimeExcessConnections="${database.pool.maxIdleTime}" p:checkoutTimeout="${database.pool.maxWait}" p:acquireIncrement="${database.pool.acquireIncrement}" p:acquireRetryAttempts="${database.pool.acquireRetryAttempts}" p:acquireRetryDelay="${database.pool.acquireRetryDelay}" p:idleConnectionTestPeriod="${database.pool.idleConnectionTestPeriod}" p:preferredTestQuery="${database.pool.connectionHealthQuery}"/> -- 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] <mailto:[email protected]> . To post to this group, send email to [email protected] <mailto:[email protected]> . Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/614af11a-b965-4e4d-865b-7939d036c933%40apereo.org <https://groups.google.com/a/apereo.org/d/msgid/cas-user/614af11a-b965-4e4d-865b-7939d036c933%40apereo.org?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/a/apereo.org/d/optout. -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/00b301d1c7e6%246a910730%243fb31590%24%40unicon.net. For more options, visit https://groups.google.com/a/apereo.org/d/optout.
