Le 07/01/2015 16:37, Milt Epstein a écrit :
On Wed, 7 Jan 2015, Alberto Cabello Sánchez wrote:
On Tue, 06 Jan 2015 15:00:51 -0800
Kristen Walker <[email protected]> wrote:
I am desperately trying to get CAS to authenticate from our LDAP server and
I tried using the example you posted, modifying the values for our
environment. I seem to be having a lot of trouble with this portion of the
example:
<bean id="ldapAuthenticationHandler"
class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="cn">
<constructor-arg ref="authenticator" />
<property name="principalAttributeMap">
<map>
<entry key="mail" value="mail" />
<entry key="cn" value="cn" />
</map>
</property>
</bean>
The error message I get is:
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
2015-01-06 14:57:38,344 ERROR
[org.springframework.web.context.ContextLoader] - <Context initialization
failed>
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
79 in XML document from ServletContext resource
[/WEB-INF/deployerConfigContext.xml] is invalid; nested exception is
org.xml.sax.SAXParseException; lineNumber: 79; columnNumber: 19;
cvc-complex-type.2.3: Element 'map' cannot have character [children],
because the type's content type is element-only.
Syntax seems OK, but in order to avoid some unseeable content between "<map>"
and "<entry..." you could put it as a entire line:
<map><entry key="mail" value="mail" /><entry key="cn" value="cn" /></map>
If it helps, my working syntax for that bean is slightly different:
<bean id="ldapAuthenticationHandler"
class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="cn"
c:authenticator-ref="authenticator">
<property name="principalAttributeMap">
<map>
<entry key="mail" value="mail" />
<entry key="displayName" value="displayName" />
</map>
</property>
</bean>
FWIW, my sense of this exactly matches yours -- the syntax I have is
this latter one, with the c:authenticator-ref rather than the
constructor-arg, but her syntax seems OK. Which brings up the
question -- is the error message really for this section of the XML?
Since it specifies the line number and the column number, she should
double-check that.
Milt Epstein
Applications Developer
Graduate School of Library and Information Science (GSLIS)
University of Illinois at Urbana-Champaign (UIUC)
[email protected]
maybe try an "xmlwf" command on the xml file to check if it is "well
formed" as the command suggest .
FYI , I just validated an ldap auth on a fresh cas4 deployement, after
some difficulties, it finally works fine,
as it was difficult to me, I documented each steps, is it online at
https://www-public.tem-tsp.eu/~procacci/dok/doku.php?id=docpublic:systemes:ssocas:cas4install#ldap_authentication_handler
(in french ! but commands and files are in english ) .
good luck .
Jehan .
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user