Re: [cas-user] LDAP authentication succeeded but CAS says it's not

2015-09-20 Thread Nicolás
Seems I found out how to fix it. I was doing the configuration from 
scratch and in first place I configured the LDAP authentication without 
configuring the SAML protocol [1]. Once done, the authentication started 
to work:

2015-09-20 11:04:22,773 INFO 
[org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - 

2015-09-20 11:04:22,775 DEBUG 
[org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - 
2015-09-20 11:04:22,797 INFO 
[org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - 

2015-09-20 11:04:22,801 DEBUG 
[org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - 


Hope this helps.

Regards,

Nicolás.

[1]: http://jasig.github.io/cas/4.1.x/protocol/SAML-Protocol.html

El 20/09/15 a las 03:38, Guillaume Chéramy escribió:
> Hello,
>
> I have exactly the same problem. See my precedent post "Aperao CAS 
> 4.1.0-RC2 with LDAP backend : Invalid Credential"
>
> Sincerely
>
> Le 19/09/2015 15:29, Nicolás a écrit :
>> Hi,
>>
>> I'm having some issue configuring LDAP authentication on CAS 4.1.0. I 
>> must say I had this configuration working on 4.0.4 but for some 
>> reason, even when successfully authenticating vs. LDAP, CAS says the 
>> credentials are not right.
>>
>> This is what I did:
>>
>> 1) deployerConfigContext.xml: Inside the authenticationManager bean, 
>> this is the map defined:
>>
>>  
>>> value-ref="proxyPrincipalResolver" />
>>
>>  
>>
>>
>> 2) deployerConfigContext.xml: Copied and pasted the LDAP support 
>> direct bind 
>> (http://jasig.github.io/cas/4.1.x/installation/LDAP-Authentication.html#ldap-supporting-direct-bind)
>>  
>> config, except that I removed the p:sslConfig-ref="sslConfig" part 
>> and the corresponding sslConfig bean, because I'm not using SSL over 
>> LDAP.
>>
>> 3) pom.xml: Added the corresponding dependency:
>>
>>  org.jasig.cas
>> cas-server-support-ldap
>>  ${cas.version}
>>
>>
>> 4) cas.properties: I customized any needed properties, as I had it in 
>> my 4.0.4 working configuration.
>>
>> Now, I access /cas and authenticate, and CAS says the credentials are 
>> not right. I had a look at the authentication log and I found the 
>> binding be successfull as far as LDAP goes as you can see here:
>>
>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 BIND
>> anonymous mech=implicit ssf=0
>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 BIND
>> dn="uid=myuser,cn=...,dc=...,dc=..." method=128
>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 BIND
>> dn="uid=myuser,cn=...,dc=...,dc=..." mech=SIMPLE ssf=0
>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 RESULT
>> tag=97 err=0 text=
>>
>> I decide to activate the debugging as mentioned in the 
>> Troubleshooting page of the LDAP configuration, and I see the following:
>>
>> 2015-09-19 14:07:15,636 DEBUG
>> [org.ldaptive.auth.FormatDnResolver] - > with uid=%s,cn=...,dc=...,dc=...>
>> 2015-09-19 14:07:15,637 DEBUG [org.ldaptive.auth.Authenticator] -
>> > request=[org.ldaptive.auth.AuthenticationRequest@954293603::user=myuser,
>> retAttrs=[1.1]]>
>> 2015-09-19 14:07:15,637 DEBUG
>> [org.ldaptive.auth.PooledBindAuthenticationHandler] -
>> > 
>> criteria=[org.ldaptive.auth.AuthenticationCriteria@1404709825::dn=uid=myuser,cn=...,dc=...,dc=...,
>> 
>> authenticationRequest=[org.ldaptive.auth.AuthenticationRequest@954293603::user=myuser,
>> retAttrs=[1.1]]]>
>> 2015-09-19 14:07:15,639 DEBUG [org.ldaptive.BindOperation] -
>> > 
>> request=[org.ldaptive.BindRequest@1670297304::bindDn=uid=myuser,cn=...,dc=...,dc=...,
>> saslConfig=null, controls=null] with
>> 
>> connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@1313776513::config=[org.ldaptive.ConnectionConfig@257920952::ldapUrl=ldap://localhost,
>> connectTimeout=3000, responseTimeout=-1, sslConfig=null,
>> useSSL=false, useStartTLS=false, connectionInitializer=null],
>> 
>> providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@972029714::metadata=[ldapUrl=ldap://localhost,
>> count=1],
>> 
>> environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory,
>> com.sun.jndi.ldap.connect.timeout=3000,
>> java.naming.ldap.version=3},
>> 
>> providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@995300469::operationExceptionResultCodes=[PROTOCOL_ERROR,
>> SERVER_DOWN], properties={},
>> 
>> connectionStrategy=org.ldaptive.provider.ConnectionStrategies$DefaultConnectionStrategy@65f55fd2,
>> controlProcessor=org.ldaptive.provider.ControlProcessor@5ae33587,
>> environment=null, tracePackets=null, removeDnUrls=true,
>> searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED,
>> SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null,
>> hostnameVerifier=null]],
>> providerConnection=org.ldaptive.provider.jndi.JndiConnection@4b642bc0]>
>> 2015-09-19 14:07:1

[cas-user] Unable to configure ticketing via MySQL

2015-09-20 Thread Nicolás
Hi,

I'm running CAS 4.1.0 and trying to configure ticketing via MySQL, 
because we want to deploy this version for HA. For that, I've done the 
following steps:

1) ticketRegistry.xml file: Basically the same as 
http://jasig.github.io/cas/4.1.x/installation/JPA-Ticket-Registry.html 
says in Configuration + Connection pooling.


http://www.w3.org/2001/XMLSchema-instance";
xmlns:p="http://www.springframework.org/schema/p";
xmlns:c="http://www.springframework.org/schema/c";
xmlns:tx="http://www.springframework.org/schema/tx";
xmlns:util="http://www.springframework.org/schema/util";
xmlns="http://www.springframework.org/schema/beans";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd";>
 
 Configuration for the default TicketRegistry which stores
the tickets in-memory and cleans them out as specified
 intervals.
 

 

 

 
 org.jasig.cas.services
 org.jasig.cas.ticket
 org.jasig.cas.adaptors.jdbc
 

 

 
 
   
 ${database.dialect}
 create-drop
 ${database.batchSize}
   
 
 

 

 

 

 

 

 

 


2) cas.properties:

database.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
database.driverClass=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost/cas?ssl=false
database.user=cas
database.password=mypassword

The rest, as defined in the PostgreSQL example on 
http://jasig.github.io/cas/4.1.x/installation/JPA-Ticket-Registry.html

3) pom.xml:

 
  org.jasig.cas
cas-server-support-jdbc
  ${cas.version}
 
 
 org.hibernate
 hibernate-core
 ${hibernate.core.version}
 runtime
 
 
 org.hibernate
hibernate-entitymanager
 ${hibernate.core.version}
 runtime
 
 
 mysql
mysql-connector-java
${mysql.connector.version}
 
 
 commons-dbcp
 commons-dbcp
 ${commons.dbcp.version}
 runtime
 
 
 c3p0
 c3p0
 ${c3p0.version}
 runtime
 

4.3.10.Final
5.1.6
 1.4
 0.9.1.2

The problem happens when deploying the app, in the logs I see the 
following exception. I tried even different versions of the dependencies 
and nothing seems to help. Seems to me that there's some unmet 
dependency but I can't find out which one is it. Any help or tip is 
really appreciated:

sep 20, 2015 6:39:58 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
2015-09-20 18:40:01,264 WARN
[org.springframework.web.context.support.XmlWebApplicationContext] -
http://www.ja-sig.org/wiki/display/JSG/cas-user


Re: [cas-user] Unable to configure ticketing via MySQL

2015-09-20 Thread Jay
Seems you are missing a maven dependecy for the class
org.springframework.scheduling.quartz.SimpleTriggerBean



org.springframework
spring-support
2.0.6


or something like


org.quartz-scheduler
quartz
1.8.5


Search on google for that class maven depency... like the below link

https://www.google.co.uk/search?q=org.springframework.scheduling.quartz.SimpleTriggerBean+maven&ie=utf-8&oe=utf-8&gws_rd=cr&ei=RPf-VZ2PL4qua8mujbAP

Cheers
Jay




On Sun, Sep 20, 2015 at 6:47 PM, Nicolás  wrote:

> Hi,
>
> I'm running CAS 4.1.0 and trying to configure ticketing via MySQL, because
> we want to deploy this version for HA. For that, I've done the following
> steps:
>
> 1) ticketRegistry.xml file: Basically the same as
> http://jasig.github.io/cas/4.1.x/installation/JPA-Ticket-Registry.html
> says in Configuration + Connection pooling.
>
> 
> http://www.w3.org/2001/XMLSchema-instance";
> 
>xmlns:p="http://www.springframework.org/schema/p";
> 
>xmlns:c="http://www.springframework.org/schema/c";
> 
>xmlns:tx="http://www.springframework.org/schema/tx";
> 
>xmlns:util="http://www.springframework.org/schema/util";
> 
>xmlns="http://www.springframework.org/schema/beans";
> 
>xsi:schemaLocation="http://www.springframework.org/schema/beans
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>http://www.springframework.org/schema/tx
>
> http://www.springframework.org/schema/tx/spring-tx.xsd
>http://www.springframework.org/schema/util
>
> http://www.springframework.org/schema/util/spring-util.xsd";>
> 
> Configuration for the default TicketRegistry which stores the
> tickets in-memory and cleans them out as specified
> intervals.
> 
>
>  class="org.jasig.cas.ticket.registry.JpaTicketRegistry" />
>
>  class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
>
> 
> org.jasig.cas.services
> org.jasig.cas.ticket
> org.jasig.cas.adaptors.jdbc
> 
>
>  class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
> id="jpaVendorAdapter"
> p:generateDdl="true"
> p:showSql="true" />
>
> 
> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
> p:dataSource-ref="dataSource"
> p:jpaVendorAdapter-ref="jpaVendorAdapter"
> p:packagesToScan-ref="packagesToScan">
> 
>   
> ${database.dialect}
> create-drop
>  key="hibernate.jdbc.batch_size">${database.batchSize}
>   
> 
> 
>
>  class="org.springframework.orm.jpa.JpaTransactionManager"
> p:entityManagerFactory-ref="entityManagerFactory" />
>
> 
>
>  class="org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner"
>   c:ticketRegistry-ref="ticketRegistry"
>   c:lockingStrategy-ref="cleanerLock"
>   c:logoutManager-ref="logoutManager" />
>
>  class="org.jasig.cas.ticket.registry.support.JpaLockingStrategy"
> p:uniqueId="${host.name}"
> p:applicationId="cas-ticket-registry-cleaner" />
>
> 
> class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
> p:targetObject-ref="ticketRegistryCleaner"
> p:targetMethod="clean" />
>
>  class="org.springframework.scheduling.quartz.SimpleTriggerBean"
> p:jobDetail-ref="jobDetailTicketRegistryCleaner"
> p:startDelay="2"
> p:repeatInterval="500" />
>
>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}"
>   />
> 
>
> 2) cas.properties:
>
> database.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
> database.driverClass=com.mysql.jdbc.Drive

Re: [cas-user] Unable to configure ticketing via MySQL

2015-09-20 Thread Nicolás
Hi Jay,

The first dependency seems to be autoresolved because I have a 
spring-context-support-4.1.6.RELEASE.jar file in the lib directory. 
However, I could fix it by replacing the 
org.springframework.scheduling.quartz.SimpleTriggerBean class to 
org.springframework.scheduling.quartz.SimpleTriggerFactoryBean. It 
shouldn't be changed in the documentation, as it is incorrect now.

Fixing this I have a new exception:

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'ticketRegistryCleaner' defined in
ServletContext resource
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Could not
resolve matching constructor (hint: specify index/type/name
arguments for simple parameters to avoid type ambiguities)
 at

org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:236)
 at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1139)
 at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
 at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
 at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
 at

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
 at

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
 at

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
 at

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
 at

org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
 at

org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
 at

org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
 at

org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
 at

org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
 at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at

org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
 at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
 at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
 at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)

I tried adding the second dependency you mentioned, but it made no 
difference. This bean is exactly equal as the one defined by default in 
the ticketRegistry.xml file. Any hint why this exception is being thrown 
now?

Thanks.

Nicolás

El 20/09/15 a las 19:17, Jay escribió:
> Seems you are missing a maven dependecy for the class 
> org.springframework.scheduling.quartz.SimpleTriggerBean
>
>
> 
> org.springframework
> spring-support
> 2.0.6
> 
>
> or something like
> 
>   org.quartz-scheduler
>   quartz
>   1.8.5
>   
> Search on google for that class maven depency... like the below link
>
> https://www.google.co.uk/search?q=org.springframework.scheduling.quartz.SimpleTriggerBean+maven&ie=utf-8&oe=utf-8&gws_rd=cr&ei=RPf-VZ2PL4qua8mujbAP
>
> Cheers
> Jay
>
>
>
>
> On Sun, Sep 20, 2015 at 6:47 PM, Nicolás  > wrote:
>
> Hi,
>
> I'm running CAS 4.1.0 and trying to configure ticketing via MySQL,
> because we want to deploy this version fo

Re: [cas-user] Unable to configure ticketing via MySQL

2015-09-20 Thread Dmitriy Kopylenko
For the HA set up, there are more attractive and easier to maintain options in 
CAS to consider other than RDBMS like Hazelcast Ticket Registry for example 
which is part of CAS core now: 

http://jasig.github.io/cas/development/installation/Hazelcast-Ticket-Registry.html

Best,
Dmitriy. 


Sent from my iPhone

> On Sep 20, 2015, at 13:47, Nicolás  wrote:
> 
> Hi,
> 
> I'm running CAS 4.1.0 and trying to configure ticketing via MySQL, because we 
> want to deploy this version for HA. For that, I've done the following steps:
> 
> 1) ticketRegistry.xml file: Basically the same as 
> http://jasig.github.io/cas/4.1.x/installation/JPA-Ticket-Registry.html says 
> in Configuration + Connection pooling.
> 
> http://www.w3.org/2001/XMLSchema-instance";
>xmlns:p="http://www.springframework.org/schema/p";
>xmlns:c="http://www.springframework.org/schema/c";
>xmlns:tx="http://www.springframework.org/schema/tx";
>xmlns:util="http://www.springframework.org/schema/util";
>xmlns="http://www.springframework.org/schema/beans";
>xsi:schemaLocation="http://www.springframework.org/schema/beans 
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>http://www.springframework.org/schema/tx
>
> http://www.springframework.org/schema/tx/spring-tx.xsd
>http://www.springframework.org/schema/util
>
> http://www.springframework.org/schema/util/spring-util.xsd";>
> 
> Configuration for the default TicketRegistry which stores the tickets 
> in-memory and cleans them out as specified
> intervals.
> 
> 
>  class="org.jasig.cas.ticket.registry.JpaTicketRegistry" />
> 
>  class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
> 
> 
> org.jasig.cas.services
> org.jasig.cas.ticket
> org.jasig.cas.adaptors.jdbc
> 
> 
>  id="jpaVendorAdapter"
> p:generateDdl="true"
> p:showSql="true" />
> 
>  
> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
> p:dataSource-ref="dataSource"
> p:jpaVendorAdapter-ref="jpaVendorAdapter"
> p:packagesToScan-ref="packagesToScan">
> 
>   
> ${database.dialect}
> create-drop
> ${database.batchSize}
>   
> 
> 
> 
>  class="org.springframework.orm.jpa.JpaTransactionManager"
> p:entityManagerFactory-ref="entityManagerFactory" />
> 
> 
> 
>  class="org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner"
>   c:ticketRegistry-ref="ticketRegistry"
>   c:lockingStrategy-ref="cleanerLock"
>   c:logoutManager-ref="logoutManager" />
> 
>  class="org.jasig.cas.ticket.registry.support.JpaLockingStrategy"
> p:uniqueId="${host.name}"
> p:applicationId="cas-ticket-registry-cleaner" />
> 
> 
> class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
> p:targetObject-ref="ticketRegistryCleaner"
> p:targetMethod="clean" />
>  
>  class="org.springframework.scheduling.quartz.SimpleTriggerBean"
> p:jobDetail-ref="jobDetailTicketRegistryCleaner"
> p:startDelay="2"
> p:repeatInterval="500" />
> 
>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}"
>   />
> 
> 2) cas.properties:
> database.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
> database.driverClass=com.mysql.jdbc.Driver
> database.url=jdbc:mysql://localhost/cas?ssl=false
> database.user=cas
> database.password=mypassword
> The rest, as defined in the PostgreSQL example on 
> http://jasig.github.io/cas/4.1.x/installation/JPA-Ticket-Registry.html
> 
> 3) pom.xml:
> 
> 
>  org.jasig.cas
>  cas-server-support-jdbc
>  ${cas.version}
> 
> 
> org.hibernate
> hibernate

Re: [cas-user] LDAP authentication succeeded but CAS says it's not

2015-09-20 Thread Guillaume Chéramy
Nicolás you're the best :-)

But now I don't understand why It's necessary to activate saml support.

Thanks for you're debug

Guidtz

Le 20/09/2015 12:10, Nicolás a écrit :
> Seems I found out how to fix it. I was doing the configuration from
> scratch and in first place I configured the LDAP authentication
> without configuring the SAML protocol [1]. Once done, the
> authentication started to work:
>
> 2015-09-20 11:04:22,773 INFO
> [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] -
> 
> 2015-09-20 11:04:22,775 DEBUG
> [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] -  resolver configured for LdapAuthenticationHandler. Falling back to
> handler principal myuser>
> 2015-09-20 11:04:22,797 INFO
> [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] -
> 
> 2015-09-20 11:04:22,801 DEBUG
> [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] -
> 
>
> Hope this helps.
>
> Regards,
>
> Nicolás.
>
> [1]: http://jasig.github.io/cas/4.1.x/protocol/SAML-Protocol.html
>
> El 20/09/15 a las 03:38, Guillaume Chéramy escribió:
>> Hello,
>>
>> I have exactly the same problem. See my precedent post "Aperao
>> CAS 4.1.0-RC2 with LDAP backend : Invalid Credential"
>>
>> Sincerely
>>
>> Le 19/09/2015 15:29, Nicolás a écrit :
>>> Hi,
>>>
>>> I'm having some issue configuring LDAP authentication on CAS 4.1.0.
>>> I must say I had this configuration working on 4.0.4 but for some
>>> reason, even when successfully authenticating vs. LDAP, CAS says the
>>> credentials are not right.
>>>
>>> This is what I did:
>>>
>>> 1) deployerConfigContext.xml: Inside the authenticationManager bean,
>>> this is the map defined:
>>>
>>>  
>>>>> value-ref="proxyPrincipalResolver" />
>>>
>>>  
>>>
>>>
>>> 2) deployerConfigContext.xml: Copied and pasted the LDAP support
>>> direct bind
>>> (http://jasig.github.io/cas/4.1.x/installation/LDAP-Authentication.html#ldap-supporting-direct-bind)
>>> config, except that I removed the p:sslConfig-ref="sslConfig" part
>>> and the corresponding sslConfig bean, because I'm not using SSL over
>>> LDAP.
>>>
>>> 3) pom.xml: Added the corresponding dependency:
>>>
>>>  org.jasig.cas
>>>  cas-server-support-ldap
>>>  ${cas.version}
>>>
>>>
>>> 4) cas.properties: I customized any needed properties, as I had it
>>> in my 4.0.4 working configuration.
>>>
>>> Now, I access /cas and authenticate, and CAS says the credentials
>>> are not right. I had a look at the authentication log and I found
>>> the binding be successfull as far as LDAP goes as you can see here:
>>>
>>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 BIND
>>> anonymous mech=implicit ssf=0
>>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 BIND
>>> dn="uid=myuser,cn=...,dc=...,dc=..." method=128
>>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 BIND
>>> dn="uid=myuser,cn=...,dc=...,dc=..." mech=SIMPLE ssf=0
>>> Sep 19 14:07:15 machine slapd[22970]: conn=1004 op=1 RESULT
>>> tag=97 err=0 text=
>>>
>>> I decide to activate the debugging as mentioned in the
>>> Troubleshooting page of the LDAP configuration, and I see the following:
>>>
>>> 2015-09-19 14:07:15,636 DEBUG
>>> [org.ldaptive.auth.FormatDnResolver] - >> with uid=%s,cn=...,dc=...,dc=...>
>>> 2015-09-19 14:07:15,637 DEBUG [org.ldaptive.auth.Authenticator]
>>> - >> request=[org.ldaptive.auth.AuthenticationRequest@954293603::user=myuser,
>>> retAttrs=[1.1]]>
>>> 2015-09-19 14:07:15,637 DEBUG
>>> [org.ldaptive.auth.PooledBindAuthenticationHandler] -
>>> >> 
>>> criteria=[org.ldaptive.auth.AuthenticationCriteria@1404709825::dn=uid=myuser,cn=...,dc=...,dc=...,
>>> 
>>> authenticationRequest=[org.ldaptive.auth.AuthenticationRequest@954293603::user=myuser,
>>> retAttrs=[1.1]]]>
>>> 2015-09-19 14:07:15,639 DEBUG [org.ldaptive.BindOperation] -
>>> >> 
>>> request=[org.ldaptive.BindRequest@1670297304::bindDn=uid=myuser,cn=...,dc=...,dc=...,
>>> saslConfig=null, controls=null] with
>>> 
>>> connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@1313776513::config=[org.ldaptive.ConnectionConfig@257920952::ldapUrl=ldap://localhost,
>>> connectTimeout=3000, responseTimeout=-1, sslConfig=null,
>>> useSSL=false, useStartTLS=false, connectionInitializer=null],
>>> 
>>> providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@972029714::metadata=[ldapUrl=ldap://localhost,
>>> count=1],
>>> 
>>> environment={java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory,
>>> com.sun.jndi.ldap.connect.timeout=3000,
>>> java.naming.ldap.version=3},
>>> 
>>> providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@995300469::operationExceptionResultCodes=[PROTOCOL_ERROR,
>>> SERVER_DOWN], properties={},
>>> 
>>> connectionStrategy=org.ldaptive.provider.ConnectionStrategies$DefaultConnectionStrategy@65f55fd2,
>>>   

RE: [cas-user] Unable to configure ticketing via MySQL

2015-09-20 Thread Misagh Moayyed
Seems like this is a documentation issue. Should be fixed in the docs.



From: Nicolás [mailto:nico...@devels.es]
Sent: Sunday, September 20, 2015 11:46 AM
To: cas-user@lists.jasig.org
Subject: Re: [cas-user] Unable to configure ticketing via MySQL



Hi Jay,

The first dependency seems to be autoresolved because I have a 
spring-context-support-4.1.6.RELEASE.jar file in the lib directory. However, 
I could fix it by replacing the 
org.springframework.scheduling.quartz.SimpleTriggerBean class to 
org.springframework.scheduling.quartz.SimpleTriggerFactoryBean. It shouldn't 
be changed in the documentation, as it is incorrect now.

Fixing this I have a new exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'ticketRegistryCleaner' defined in ServletContext resource 
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Could not resolve 
matching constructor (hint: specify index/type/name arguments for simple 
parameters to avoid type ambiguities)
at 
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:236)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1139)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at 
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at 
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

I tried adding the second dependency you mentioned, but it made no 
difference. This bean is exactly equal as the one defined by default in the 
ticketRegistry.xml file. Any hint why this exception is being thrown now?

Thanks.

Nicolás

El 20/09/15 a las 19:17, Jay escribió:

Seems you are missing a maven dependecy for the class 
org.springframework.scheduling.quartz.SimpleTriggerBean



org.springframework
spring-support
2.0.6


or something like


 org.quartz-scheduler
 quartz
 1.8.5
 

Search on google for that class maven depency... like the below link



https://www.google.co.uk/search?q=org.springframework.scheduling.quartz.SimpleTriggerBean+maven
 

 
&ie=utf-8&oe=utf-8&gws_rd=cr&ei=RPf-VZ2PL4qua8mujbAP

Cheers

Jay







On Sun, Sep 20, 2015 at 6:47 PM, Nicolás mailto:nico...@devels.es> > wrote:

Hi,

I'm running CAS 4.1.0 and trying to co