Scott,

I am attaching my WEB.XML available under tomcat-5.5.16/cas/WEB-INF folder.
I have given entries only loginURL, validateURL and ServerName. I have not 
given an entry for ServiceURL. Is that required?

Please check my web.xml and tell me which URL should I use in my IE?
I tried using http://localhost:8080/cas/login. I got CAS login page. But after 
giving my credentials i got an exception. My LDAP auth did not happen

Thanks

Scott Battaglia <[EMAIL PROTECTED]> wrote: This might help you:
http://www.ja-sig.org/wiki/display/CASUM/LDAP

(note that the first step about the dependency relates to CAS 3.1 and not CAS 
3.0.x but the rest of the information should be okay). 

-Scott

On 6/19/07, sriram purushothaman <[EMAIL PROTECTED]> wrote: Please check this 
bean entry in deployer..xml
<bean id="contextSource" 
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
                 <property name="authenticatedReadOnly" value="false" /> 
                 <property name="userName" value="" />
                 <property name="password" value="" />
                 <property name="urls"> 
                          <list>
                                 <value>ldap://XX.XXX.X.XXX:389/</value>
                         </list>
                 </property>

                 <property name="baseEnvironmentProperties"> 
                          <map>
                                 <entry>
                                         
<key><value>java.naming.security.authentication</value></key>
                                          <value>simple</value>
                                 </entry>
                        </map>
                </property>
</bean>

What should i give for UserName and Password? 
Should i give the Distinguished Name and password that i normally use in 
httpd.conf(Apache web-server + weblogic) and what should i give for URLs list

Please let me know

Thanks

 Scott Battaglia <[EMAIL PROTECTED]> wrote:  If you're using a  non-Sun JVM, 
then you need to set the "responseControlFactory" property on the 
ContextSource.  The default is an internal Sun implementation.

-Scott

 On 6/19/07,  sriram purushothaman <[EMAIL PROTECTED]> wrote:  Hi 

I have done LDAP authentication using Apache Webserver 2.0.59 and Weblogic 8.1 
and I am successful with it. Now i want to do it with CAS.

I am new to CAS and i am trying out few stuff. I am using Tomcat   5.5.16, JDK 
1.42

1. I have download cas-server-3.0.7 and cas-client-java-2.1.1
2. I have downloaded cas-server-ldap-3.0.7 JAR , spring-ldap1.1.2 JAR, 
ldapbp1.0 JAR and put these 3 JARs in localplugins/lib folder.  
3. Did ant jar and ant war. Got the localplugins.jar and the WAR  file
4. I changed my deployerConfigContext.xml. I have attached the same here.Please 
check and tell me whether it is correct.
5. Copied the WAR into my tomcat/webapps 
6. When i start my tomcat, i am getting the attached error. 

I have downloaded this folder structure com.sun.jndi.ldap.<>, but not sure what 
to do with it.

Regards,
Sriram
    

---------------------------------
Don't pick lemons.
 See all the  new 2007 cars  at  Yahoo! Autos.
 

2007-06-19 14:55:45,250 ERROR  [org.springframework.web.context.ContextLoader] 
- <Context initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'centralAuthenticationService' defined in ServletContext resource 
[/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 
'authenticationManager' while setting bean property 'authenticationManager'; 
nested exception is   org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'authenticationManager' defined in ServletContext 
resource [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean '  
org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#b2e752' of type 
[org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler] while setting bean 
property 'authenticationHandlers' with key [1]; nested exception is   
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name  'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#b2e752' 
defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
 Cannot resolv! 
 e reference to bean 'contextSource' while setting bean property 
'contextSource'; nested exception is  
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'contextSource' defined in ServletContext resource 
[/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; nested 
exception is   java.lang.NoClassDefFoundError: 
com.sun.jndi.ldap.ctl.ResponseControlFactory
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'authenticationManager' defined in ServletContext resource 
[/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean '  
org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#b2e752' of type 
[org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler] while setting bean 
property 'authenticationHandlers'  with key [1]; nested exception is  
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#b2e752' 
defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Cannot 
resolve reference to bean 'contextSource' while setting bean property 
'contextSource'; nested exception is   
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'contextSource' defined in ServletContext resource 
[/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed;
 nested exce!  
 ption is java.lang.NoClassDefFoundError: 
com.sun.jndi.ldap.ctl.ResponseControlFactory
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#b2e752  ' 
defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Cannot 
resolve reference to bean 'contextSource'  while setting bean property 
'contextSource'; nested exception is 
org.springframework.beans.factory.BeanCreationException : Error creating bean 
with name 'contextSource' defined in ServletContext resource 
[/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; nested 
exception is  java.lang.NoClassDefFoundError: 
com.sun.jndi.ldap.ctl.ResponseControlFactory 
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'contextSource' defined in ServletContext resource 
[/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; nested 
exception is   java.lang.NoClassDefFoundError: 
com.sun.jndi.ldap.ctl.ResponseControlFactory
Caused by:
java.lang.NoClassDefFoundError: com.sun.jndi.ldap.ctl.ResponseControlFactory
        at org.springframework.ldap.support.LdapContextSource.class$  
(LdapContextSource.java:42)
        at  
org.springframework.ldap.support.LdapContextSource.<clinit>(LdapContextSource.java:42)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance 
(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java :274)
        at 
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:84)
        at org.springframework.beans.BeanUtils.instantiateClass 
(BeanUtils.java:60)
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
 (SimpleInstantiationStrategy.java:45)
        at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean
 (AbstractAutowireCapableBeanFactory.java:739)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
 (AbstractAutowireCapableBeanFactory.java:727)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
 (AbstractAutowireCapableBeanFactory.java:390)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject 
(AbstractBeanFactory.java:254)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:144)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:251)
        at  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:163)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java
 :271)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary
 (BeanDefinitionValueResolver.java:128)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
 (AbstractAutowireCapableBeanFactory.java:1047)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
 (AbstractAutowireCapableBeanFactory.java:843)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
 (AbstractAutowireCapableBeanFactory.java:427)
        at  
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean
 (BeanDefinitionValueResolver.java:221)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary
 (BeanDefinitionValueResolver.java:111)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList
 (BeanDefinitionValueResolver.java:291)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary
 (BeanDefinitionValueResolver.java:132)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
 (AbstractAutowireCapableBeanFactory.java:1047)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
 (AbstractAutowireCapableBeanFactory.java:843)
         at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
 (AbstractAutowireCapableBeanFactory.java:427)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject 
(AbstractBeanFactory.java:254)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:144)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:251)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean 
(AbstractBeanFactory.java:163)
_______________________________________________
Yale CAS mailing list 
[email protected] 
 http://tp.its.yale.edu/mailman/listinfo/cas



 


-- 
-Scott Battaglia


LinkedIn:  http://www.linkedin.com/in/scottbattaglia 
_______________________________________________
Yale CAS mailing list
 [email protected]
http://tp.its.yale.edu/mailman/listinfo/cas
 
   

---------------------------------
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list. 

_______________________________________________
Yale CAS mailing list
[email protected]
 http://tp.its.yale.edu/mailman/listinfo/cas





-- 
-Scott Battaglia

LinkedIn: http://www.linkedin.com/in/scottbattaglia  
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas


 
---------------------------------
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
	version="2.4">
	<display-name>Central Authentication System (CAS) 3.0</display-name>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/applicationContext.xml,
			/WEB-INF/deployerConfigContext.xml
		</param-value>
	</context-param>

<filter>
    <filter-name>CAS Filter</filter-name>
    <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>

    <init-param>
      <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
      <param-value>https://localhost:8443/cas/login</param-value>
    </init-param>

    <init-param>
      <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
      <param-value>https://localhost:8443/cas/proxyValidate</param-value>
    </init-param>

    <init-param>
      <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
      <param-value>http://localhost:8080</param-value>
    </init-param>
  </filter>

  <filter-mapping>
    <filter-name>CAS Filter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

	<!-- 
		place this into the contextConfigLocation to enable
		service restrictions.
		/WEB-INF/approvedServices.xml,
		
		place this into the contextConfigLocation to enable remote services
		/WEB-INF/remoteServices.xml,
		classpath:org/codehaus/xfire/spring/xfire.xml
		
		place this into the contextConfigLocation to enable the event publishing
		/WEB-INF/auditTrailContext.xml,
	-->

	<!--
		- Location of the Log4J config file, for initialization and refresh checks.
		- Applied by Log4jConfigListener.
	-->
	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>classpath:log4j.properties</param-value>
	</context-param>
	
	<context-param>
		<param-name>log4jExposeWebAppRoot</param-name>
		<param-value>false</param-value>
	</context-param>

	<!--
		- Configures Log4J for this web app.
		- As this context specifies a context-param "log4jConfigLocation", its file path
		- is used to load the Log4J configuration, including periodic refresh checks.
		-
		- Would fall back to default Log4J initialization (non-refreshing) if no special
		- context-params are given.
		-
		- Exports a "web app root key", i.e. a system property that specifies the root
		- directory of this web app, for usage in log file paths.
		- This web app specifies "cas.root" (see log4j.properties file).
	-->
	<!-- Leave the listener commented-out if using JBoss -->
	<listener>
		<listener-class>
			org.springframework.web.util.Log4jConfigListener
		</listener-class>
	</listener>

	<!--
		- Loads the CAS ApplicationContext.  
		- The deployer choice here is how to handle Throwables thrown by Spring's 
		- ContextLoaderListener.  The Spring ContextLoaderListener will throw an exception when the
		- application context cannot be loaded, say because the bean XML files are not valid XML or do not
		- refer to real classes and properties or because a bean configured via Spring throws an exception
		- at construction, property setting, or on an afterPropertiesSet() lifecycle method.
		-
		- If you'd like these errors to be fatal and prevent the CAS servlet context from loading at all,
		- use org.springframework.web.context.ContextLoaderListener.
		-
		- If you'd like these errors to result in all requests for CAS getting a "CAS is Unavailable" response, 
		- use org.jasig.cas.web.init.SafeContextLoaderListener.
		- for all requests.
	-->
	<listener>
		<listener-class>
			org.jasig.cas.web.init.SafeContextLoaderListener
		</listener-class>
	</listener>

	<!--
		- This is the Spring dispatcher servlet which delegates all requests to the 
		- Spring WebMVC controllers as configured in cas-servlet.xml.
		-   
		- The choice made above about how to handle a broken ApplicationContext at 
		- context initialization applies here as well, sicne this servlet is load-on-startup.
		-
		- If you'd like these errors to be fatal and prevent the CAS servlet from loading at all,
		- use org.springframework.web.servlet.DispatcherServlet.
		-
		- If you'd like these errors to result in all requests for CAS getting a "CAS is Unavailable" response, 
		- use org.jasig.cas.web.init.SafeDispatcherServlet for all requests serviced by this servlet.
	-->
	<servlet>
		<servlet-name>cas</servlet-name>
		<servlet-class>
			org.jasig.cas.web.init.SafeDispatcherServlet
		</servlet-class>
		<init-param>
			<param-name>publishContext</param-name>
			<param-value>false</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/login</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/logout</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/validate</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/serviceValidate</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/proxy</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/proxyValidate</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>cas</servlet-name>
		<url-pattern>/CentralAuthenticationService</url-pattern>
	</servlet-mapping>

	<session-config>
		<!-- Default to 5 minute session timeouts -->
		<session-timeout>5</session-timeout>
	</session-config>

	<error-page>
		<exception-type>org.springframework.context.ApplicationContextException</exception-type>
		<location>/WEB-INF/view/jsp/brokenContext.jsp</location>
	</error-page>

	<error-page>
		<exception-type>java.lang.Exception</exception-type>
		<location>/WEB-INF/view/jsp/errors.jsp</location>
	</error-page>

	<error-page>
		<error-code>404</error-code>
		<location>/</location>
	</error-page>
</web-app>
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to