cancel
Showing results for 
Search instead for 
Did you mean: 

j'ai configuré Alfresco pour supporter l'authentification...

tegyat
Champ in-the-making
Champ in-the-making
Bonjour,
j'ai configuré Alfresco pour supporter l'authentification via CAS server:
comme suivant
o   Récupération et compliation de la classe CASAuthenticationFilter.java
o   Ajout de  CASAuthentificationFilter.class au client-web.jar (dans org/alfresco/app/servlet).
o   Modification du web.xml
Ajout de :
Filter
<filter> 
    <filter-name>CAS Required</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>http://server/cas-web/login</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
        <param-value>https://server/cas-web/serviceValidate</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
        <param-value>server</param-value>
    </init-param>
</filter>
Mapping :
<filter-mapping> 
   <filter-name>CAS Required</filter-name>
   <url-pattern>/faces/*</url-pattern>
  </filter-mapping>
   <filter-mapping>
                  <filter-name>CAS Required</filter-name>
                  <url-pattern>/template/*</url-pattern>
    </filter-mapping>
     <filter-mapping>
                  <filter-name>CAS Required</filter-name>
                  <url-pattern>/download/*</url-pattern>
      </filter-mapping>
Nouveau filter
<filter> 
      <filter-name>Authentication Filter</filter-name>
      <filter-class>org.alfresco.web.app.servlet.CASAuthenticationFilter</filter-class>
   </filter>
o   placer casclient.jar dans un dossier accessible (WEB-INF/lib d'alfresco).

En voulant essayer le cas (http://localhost:8080/alfresco) je suis redirigé correctement vers la page d'authentification du CAS. j'introduit admin/admin, je suis redirigé vers le tableau de bord  d'Alfresco (cas accepte ce compte) mais la page ne s'affiche pas(erreur sur la page)? rien n'est dans la console Tomcat?
Avez vous une idée?
24 REPLIES 24

tegyat
Champ in-the-making
Champ in-the-making
Bonjour,
J'utilise CAS server et Alfresco2.0 (avec CAS verifie les comptes a partir d'open LDAP).

lme
Champ in-the-making
Champ in-the-making
Bonjour,

Pour information, tu l'as récupérée où ta classe CASAuthenticationFilter.java ?
Sinon, vérifie que tu reviens bien en HTTP et pas en HTTPS sur le port 8080 quand tu es redirigé vers le tableau de bord d'Alfresco.

tegyat
Champ in-the-making
Champ in-the-making
Bonjour,
j'ai récupéré le code source de la classe à partir de la: http://issues.alfresco.com/browse/AWC-952.

Ou dois je verifier que je retourne sur http.

Merci.

lme
Champ in-the-making
Champ in-the-making
Quand tu es sur la page de login de CAS, tu donnes ton login et ton mot de passe. Sur cette page, normalement tu devrais être en HTTPS (ça se voit dans l'url). Si ton login et ton mot de passe sont ok, CAS te redirige vers Alfresco. Quand tu reviens sur Alfresco, il faut que tu sois en HTTP sur le port 8080 ou en HTTPS sur le port 8443.

Voila.

tegyat
Champ in-the-making
Champ in-the-making
Bonjour,
Maintenant une fois authentifié j'ai une page d'alfresco "Erreur systhème" (je suis bien sur http en 8081 (j'ai modifier le port car j'ai d'autres application utilisant 8080).
qui affiche l'erreur
java.io..IOException: HTTPS hostname wrong: should be <adresse_ip>
ou adresse_ip est l'addresse de mon serveur d'Alfresco.

Remarque: ce que j'ai changé depuis mon dernier poste est
serverName : j'ai mis "adresse_ip:8081" au lieu de "http://adresse_ip:8081"
Merci.

tegyat
Champ in-the-making
Champ in-the-making
bonjour,

 
java.io.IOException: HTTPS hostname wrong: should be adresse_ip
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.java:490)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:415)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.jav...
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at edu.yale.its.tp.cas.util.SecureURL.retrieve(SecureURL.java:70)
at edu.yale.its.tp.cas.client.ServiceTicketValidator.validate(ServiceTicketValidator.java:212)
at edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:219)
at edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

tegyat
Champ in-the-making
Champ in-the-making
Bonjour,
Je crois que ce probleme ne provient pas d'alfresco mais du cas car quand je modifie la "adresse_ip" dans le web.xml d'alfresco en localhost ça fonctionne correctement.

tegyat
Champ in-the-making
Champ in-the-making
Bonjour,
Le probleme se resout en regenerant un certificat pour le cas server qui conteient en dn le nom du serveur et non localhost.

pierrick
Champ in-the-making
Champ in-the-making
Bonjour,

Je souhaite utiliser CAS Server 3.1 avec Alfresco 2.1.0. Le fichier CASAuthenticationFilter.java n'est plus accécible à partir de la page http://issues.alfresco.com/browse/AWC-952. La solution proposée ci-dessus fontionne-t-elle toujours ? existe-t-il une autre solution ?
Si la solution est toujours valable, pouvez-vous copier-coller le code du fichier CASAuthenticationFilter.java ?

Merci.