IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

avec Java Discussion :

intégration ldap avec cas server


Sujet :

avec Java

  1. #1
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    180
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2012
    Messages : 180
    Points : 73
    Points
    73
    Par défaut intégration ldap avec cas server
    salut,

    je veux intégrer ldap avec cas-server-3.5.2

    pour ce là j'ai essayé de suivre ces étapes :

    1) dans deployerConfigContext.xml, j'ai ajouté quelques lignes :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    <bean id="authenticationManager"
            class="org.jasig.cas.authentication.AuthenticationManagerImpl">
     
            <!-- Uncomment the metadata populator to allow clearpass to capture and cache the password
                 This switch effectively will turn on clearpass.
            <property name="authenticationMetaDataPopulators">
               <list>
                  <bean class="org.jasig.cas.extension.clearpass.CacheCredentialsMetaDataPopulator">
                     <constructor-arg index="0" ref="credentialsCache" />
                  </bean>
               </list>
            </property>
             -->
     
            <!--
                | This is the List of CredentialToPrincipalResolvers that identify what Principal is trying to authenticate.
                | The AuthenticationManagerImpl considers them in order, finding a CredentialToPrincipalResolver which 
                | supports the presented credentials.
                |
                | AuthenticationManagerImpl uses these resolvers for two purposes.  First, it uses them to identify the Principal
                | attempting to authenticate to CAS /login .  In the default configuration, it is the DefaultCredentialsToPrincipalResolver
                | that fills this role.  If you are using some other kind of credentials than UsernamePasswordCredentials, you will need to replace
                | DefaultCredentialsToPrincipalResolver with a CredentialsToPrincipalResolver that supports the credentials you are
                | using.
                |
                | Second, AuthenticationManagerImpl uses these resolvers to identify a service requesting a proxy granting ticket. 
                | In the default configuration, it is the HttpBasedServiceCredentialsToPrincipalResolver that serves this purpose. 
                | You will need to change this list if you are identifying services by something more or other than their callback URL.
                +-->
            <property name="credentialsToPrincipalResolvers">
                <list>
                    <!--
                        | UsernamePasswordCredentialsToPrincipalResolver supports the UsernamePasswordCredentials that we use for /login 
                        | by default and produces SimplePrincipal instances conveying the username from the credentials.
                        | 
                        | If you've changed your LoginFormAction to use credentials other than UsernamePasswordCredentials then you will also
                        | need to change this bean declaration (or add additional declarations) to declare a CredentialsToPrincipalResolver that supports the
                        | Credentials you are using.
                        +-->
                    <!--<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" >
                        <property name="attributeRepository" ref="attributeRepository" />
                    </bean>-->
                    <bean 
         class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler"> 
         <property name="filter" value="uid=%u" /> 
         <property name="searchBase" value="DC=MINISTER,DC=FR" />  
         <property 
            name="contextSource" 
            ref="contextSource" /> 
        </bean> 
                    <!--
                        | HttpBasedServiceCredentialsToPrincipalResolver supports HttpBasedCredentials.  It supports the CAS 2.0 approach of
                        | authenticating services by SSL callback, extracting the callback URL from the Credentials and representing it as a
                        | SimpleService identified by that callback URL.
                        |
                        | If you are representing services by something more or other than an HTTPS URL whereat they are able to
                        | receive a proxy callback, you will need to change this bean declaration (or add additional declarations).
                        +-->
                    <bean
                        class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
                </list>
            </property>
     
     
     
    <!--
        Config CAS with LDAP
        -->
        <bean id="contextSource" class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource"> 
     <property name="anonymousReadOnly" value="false" /> 
     <property name="pooled" value="true"/> 
     <property name="urls"> 
        <list> 
       <value>ldap://192.168.0.88:389/</value> 
     
        </list> 
     </property> 
     <property name="userDn" value="DC=MINISTER,DC=FR"/> 
     <property name="groupDn" value="DC=MINISTER,DC=FR"/> 
     <property name="password" value="userPassword"/> 
     <property name="baseEnvironmentProperties"> 
        <map> 
       <!--entry> 
                <key><value>java.naming.security.protocol</value></key> 
                <value>ssl</value> 
        </entry--> 
       <entry> 
        <key> 
         <value>java.naming.security.authentication</value> 
        </key> 
        <value>simple</value> 
       </entry> 
        </map> 
     </property> 
    </bean>
    2) dans pom.xml

    j'ai ajouté :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    <dependency> 
       <groupId>org.jasig.cas</groupId> 
       <artifactId>cas-server-support-ldap</artifactId> 
       <version>3.5.2</version> 
    </dependency>
    3) dans apache-tomcat-7.0.47\webapps\cas-server-webapp-3.5.2\WEB-INF\lib

    cas-server-support-ldap-3.5.2.jar

    mais quand j'ai essayé de démarrer cas server j'ai trouvé cette erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
         ... 
        Caused by: java.lang.NoClassDefFoundError: org/springframework/ldap/NamingSecuri
        tyException
                at java.lang.Class.getDeclaredConstructors0(Native Method)
                at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
                at java.lang.Class.getConstructor0(Class.java:2699)
                at java.lang.Class.getDeclaredConstructor(Class.java:1985)
                at org.springframework.beans.factory.support.SimpleInstantiationStrategy
        .instantiate(SimpleInstantiationStrategy.java:67)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBean
        Factory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)
                ... 48 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.ldap.NamingSecu
        rityException
                at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
        der.java:1702)
                at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
        der.java:1547)
                ... 54 more
        SafeContextLoaderListener:
        The Spring ContextLoaderListener we wrap threw on contextInitialized.
        But for our having caught this error, the web application context would not have
         initialized.
    ..........
    pour les paramètres de ldap je veux utiliser les mêmes paramètres que j'ai déjà utiliser dans l’intégration de ldap avec liferay

    voici les paramètres de ldap avec liferay


    Base Provider URL
    ldap://192.168.0.88:389


    Base DN
    DC=MINISTER,DC=FR

    Principal
    CN=LDAP Requester,OU=Users,OU=Technical Accounts,OU=P9 Accounts,DC=MINISTER,DC=FR

    Credentials

    minister$9999


    Users

    Authentication Search Filter
    (&(objectClass=person)(mail=@email_address@))

    Import Search Filter
    (objectClass=person)

    User Mapping

    Screen Name
    sAMAccountName

    Password
    userPassword

    Email Address
    mail

    Full Name
    cn

    First Name
    givenName

    Middle Name
    middleName

    Last Name
    sn

    Group
    memberOf

    Groups

    Import Search Filter
    (&(objectClass=group)(|(cn=MinisterUsers)(cn=MinisterAdministrateurs)(cn=Minister_*)))

    Group Mapping

    Group Name
    cn

    Description
    sAMAccountName

    User
    member


    Export

    Users DN
    DC=MINISTER,DC=FR

    Groups DN
    DC=MINISTER,DC=FR



    merci d'avance

  2. #2
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    180
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2012
    Messages : 180
    Points : 73
    Points
    73
    Par défaut
    je donne les paramètres de la connexion de ldap avec liferay dont le but d'utiliser les mêmes paramètres pour intégrer cas avec ldap, comme j'ai déjà dis je veux intégrer cas avec ldap dans mon application qui n'utilise pas liferay.
    mon application est développée avec spring, et pour la rendre fonctionnelle avec ldap je dois faire deux config :

    1) config dans mon application : dans security-app-context.xml

    2) config dans le serveur SAC

Discussions similaires

  1. Intégration de LDAP avec CAS Server
    Par franco9 dans le forum Spring
    Réponses: 1
    Dernier message: 21/01/2014, 13h58
  2. Problème LDAP avec SQL Server
    Par foufidou dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 23/05/2012, 17h55
  3. Utilisation XACML avec CAS et LDAP
    Par jalam dans le forum Développement Web en Java
    Réponses: 2
    Dernier message: 03/05/2010, 11h01
  4. Probleme avec sme-server et son ldap
    Par thorium90 dans le forum Administration système
    Réponses: 2
    Dernier message: 17/11/2009, 21h23
  5. Intégration Continue avec Visual Studio et Team Foundation Server - Partie II, Présen
    Par Louis-Guillaume Morand dans le forum Général Dotnet
    Réponses: 0
    Dernier message: 03/06/2009, 21h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo