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

Spring Web Java Discussion :

Nouveau problème ACEGI


Sujet :

Spring Web Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Inscrit en
    Avril 2007
    Messages
    94
    Détails du profil
    Informations forums :
    Inscription : Avril 2007
    Messages : 94
    Par défaut Nouveau problème ACEGI
    Bonjour,
    J'ai plusieurs soucis avec ACEGI :

    - Lorsque lors de l'authentification je rentre un mauvais login ou mot de passe et qu'il me rejette. Si ensuite je tape un bon mot de passe et un bon login ça ne passe pas et j'ai une erreur 404

    - Lorsque je m'authentifie et que je veux accéder à une page pour laquelle je n'ai pas droit j'ai un ecran d'erreur AccesDenied et si je tape directement le lien pour accéder à cette page (sans m'authetifier) j'y accède directement.

    J'ai retourné le sujet dans tous le sens et je n'y arrive pas.

    Merci de m'aider

  2. #2
    Membre confirmé
    Inscrit en
    Avril 2007
    Messages
    94
    Détails du profil
    Informations forums :
    Inscription : Avril 2007
    Messages : 94
    Par défaut
    encore un autre problème

    seulement la première page après connection est conrôlée par acégi les autres lien sont accéssibles malgrés les restrictions

  3. #3
    Membre chevronné

    Inscrit en
    Avril 2005
    Messages
    317
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 317
    Par défaut
    Peux-tu nous montrer tes fichiers de configuration ?

  4. #4
    Membre confirmé
    Inscrit en
    Avril 2007
    Messages
    94
    Détails du profil
    Informations forums :
    Inscription : Avril 2007
    Messages : 94
    Par défaut
    voila mon fichier de config


    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
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <!-- $Id: module.xml,v 1.40 2008/10/16 15:46:34 bbarban Exp $ -->
     
    <beans>
    	<bean id="filterChainProxy"
    		class="org.acegisecurity.util.FilterChainProxy">
    		<property name="filterInvocationDefinitionSource">
    			<value>
    				CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    				PATTERN_TYPE_APACHE_ANT
     
                    /**=httpSessionContextIntegrationFilter,logoutFilter,formAuthenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor  
                            </value>
                    </property>
            </bean>
     
            <bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/>
     
             <bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
                     <constructor-arg value="/"/>  <!-- URL redirected to after logout -->
                     <constructor-arg>
                              <list>
                                    <!-- <ref bean="rememberMeServices"/> -->
                                    <bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
                            </list>
                    </constructor-arg>
            </bean> 
            <!-- fr.gouv.equipement.sytadin.opencms.AuthenticationProcessingFilterSytadin -->
            <bean id="formAuthenticationProcessingFilter"
                    class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
                    <property name="authenticationManager">
                            <ref bean="authenticationManager" />
                    </property>
                    <property name="authenticationFailureUrl">
                            <value>/access/erreur.jsp</value>
                    </property>
                    <property name="defaultTargetUrl">
                            <value>/access/index.jsp</value>
                    </property>
                    <property name="filterProcessesUrl">
                            <value>/j_acegi_security_check</value>
                    </property>
                    <property name="rememberMeServices" ref="rememberMeServices"/>
            </bean>
     
            <bean id="securityContextHolderAwareRequestFilter" class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/>
     
            <bean id="rememberMeProcessingFilter" class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter">
                    <property name="authenticationManager" ref="authenticationManager"/>
                    <property name="rememberMeServices" ref="rememberMeServices"/>
            </bean>
     
            <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
                    <property name="key" value="changeThis"/>
                    <property name="userAttribute" value="anonymousUser,ROLE_ANONYMOUS"/>
            </bean>
       <!-- =================== exceptionTranslationFilter ==================== -->
            <bean id="exceptionTranslationFilter"
                    class="org.acegisecurity.ui.ExceptionTranslationFilter">
                    <property name="authenticationEntryPoint">
                            <ref bean="formLoginAuthenticationEntryPoint" />
                    </property>
                    
            </bean>
        <!-- ================= formLoginAuthenticationEntryPoint ================ -->
            <bean id="formLoginAuthenticationEntryPoint"
          class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
                    <property name="loginFormUrl">
                            <value>/access/lienAcces.jsp</value>
                    </property>
                    <property name="forceHttps">
                            <value>false</value>
                    </property>
            </bean>
                    <!--  <property name="accessDeniedHandler">
                            <bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
                                    <property name="errorPage" value="/"/>
                            </bean>
                    </property>-->
            
     
         
       <bean id="filterInvocationInterceptor"
                      class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
                    <property name="authenticationManager">
                            <ref bean="authenticationManager" />
                    </property>
                    <property name="accessDecisionManager">
                            <ref bean="accessDecisionManager" />
                    </property>
                    <property name="objectDefinitionSource">
                            <value>
                                    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
                                    PATTERN_TYPE_APACHE_ANT
                                    /access/index.jsp=ROLE_AUTH
                                    /**/rep1/**=60_AUTH
                                    /**/rep2/**=48_AUTH
                                    /**/*.do=60_AUTH
    				/http://www.ai.univ-paris8.fr/~djedi/poo/partiel.pdf=60_AUTH
     
    			</value>
    		</property>
    	</bean>
    	<!--  <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
    		<property name="authenticationManager" ref="authenticationManager"/>
    		<property name="accessDecisionManager">
    			<bean class="org.acegisecurity.vote.AffirmativeBased">
    				<property name="allowIfAllAbstainDecisions" value="false"/>
    				<property name="decisionVoters">
    					<list>
    						<ref bean="roleVoter" />
    						<ref bean="authenticatedVoter" />
    						 <ref bean="projetVoter" />
    						 <ref bean="modelisationVoter" />  
     
    					</list>
    				</property>
    			</bean>
    		</property>
    		<property name="objectDefinitionSource">
    			<value><![CDATA[
    				CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    				PATTERN_TYPE_APACHE_ANT
    				/opencms/connexionpro.do=ROLE_ANONYMOUS
    				/connexionpro.do=ROLE_ANONYMOUS
    				/**=ROLE_AUTH
    				/index.jsp=projetPRO
    			]]></value>
    		</property>
    	</bean>-->
     
     
    	<bean id="accessDecisionManager"
    		  class="org.acegisecurity.vote.UnanimousBased">
    		<property name="allowIfAllAbstainDecisions" value="false"/>
    		<property name="decisionVoters">
    					<list>
    						<ref bean="roleVoter" />
    						<ref bean="authenticatedVoter" />
    						 <ref bean="projetVoter" />
    						 <ref bean="modelisationVoter" />  
    						 <ref bean="modelisationVoter2" />
     
    					</list>
    		  </property>
    	</bean>
    	<bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter">
    		<property name="rolePrefix">
    			<value>ROLE_</value>
    		</property>
    	</bean>
     
    	<bean id="projetVoter" class="org.acegisecurity.vote.RoleVoter">
    		<property name="rolePrefix">
    			<value>projetPRO</value>
    		</property>
    	</bean> 
    	<bean id="modelisationVoter" class="org.acegisecurity.vote.RoleVoter">
    		<property name="rolePrefix">
    			<value>60_</value>
    		</property>
    	</bean> 
    	<bean id="modelisationVoter2" class="org.acegisecurity.vote.RoleVoter">
    		<property name="rolePrefix">
    			<value>48_</value>
    		</property>
    	</bean> 
     
     
    	<bean id="authenticatedVoter" class="org.acegisecurity.vote.AuthenticatedVoter"/>
     
    	<bean id="rememberMeServices" class="org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices">
    		<property name="userDetailsService" ref="userDetailsService"/>
    		<property name="key" value="changeThis"/>
    	</bean>
     
    	<bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
    		<property name="providers">
    			<list>
    				<ref local="daoAuthenticationProvider"/>
    			</list>
    		</property>
    	</bean>
     
    	<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
    		<property name="userDetailsService" ref="userDetailsService"/>
    		<property name="passwordEncoder"><ref local="passwordEncoder"/></property>
    	</bean>
     
    	<!-- UserDetailsService is the most commonly frequently Acegi Security interface implemented by end users -->
    	<bean id="userDetailsService" class="fr.gouv.equipement.projet.opencms.Authentificationprojet">
    	</bean>
     
    	<!-- This bean is optional; it isn't used by any other bean as it only listens and logs -->
    	<bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener"/>
     
    	<bean id="passwordEncoder" class="org.acegisecurity.providers.encoding.Md5PasswordEncoder"/>
     
    </beans>

Discussions similaires

  1. [C#] utilisation d'évênements [nouveau problème]
    Par legillou dans le forum Windows Forms
    Réponses: 10
    Dernier message: 18/08/2006, 09h37
  2. [PHP & HTML] Nouveau : Problème
    Par Jihnn dans le forum Langage
    Réponses: 15
    Dernier message: 27/06/2006, 20h08
  3. nouveau problème sur un searchResults
    Par nighthammer dans le forum Zope
    Réponses: 8
    Dernier message: 27/06/2006, 11h08
  4. nouveau problème avec le separator
    Par boudou dans le forum AWT/Swing
    Réponses: 2
    Dernier message: 21/02/2006, 14h25
  5. Nouveau problème de récupération de valeurs.
    Par pmboutteau dans le forum ASP
    Réponses: 4
    Dernier message: 09/03/2005, 10h48

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