Projets
Pages enfant
  • 3.14 Authentification

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.
Commentaire: Migrated to Confluence 5.3

...

Remarque

Dans les applications d'exemples ESUP-Commons ainsi que dans les archétypes, en plus d'une implémentation de AuthenticationService, on va aussi trouvé un bean métier, nommé authenticator, auquel on va injecter l'authenticationService dont le but sera de transformer l'objet AuthInfo obtenu par l'authenticationService (méthode getAuthInfo) en un objet métier (User).

Ex : AuthenticatorImpl.java dans l'archétype EC2 0.2.8

...

La classe ShibbolethApacheModuleAuthenticationService propose une authentification shib.

Bloc de code
<bean id="delegatingAuthenticationServiceauthenticationService" lazy-init="true"
		class="org.esupportail.commons.services.authentication.ShibbolethApacheModuleAuthenticationService">
            <property name="idHeader" value=""/>
            <property name="attributeHeaders">
               <list>
                   <value></value>
               </list>
            </property>
        </bean>

L'authentification shibboleth est faite par un module apache qui fonctionne en amont de l'application Java. Par l'option "ShibUseHeaders On" le module transmet à l'application Java, sous forme d'entêtes HTTP, l'ensemble des attributs de utilisateur connecté (reçus depuis le fournisseur d'identitésd’identités). Ce sont ces attributs qui sont utilisés par l'implémentation ShibbolethApacheModuleAuthenticationService. L'objet AuthInfo renvoyé par la méthode getAuthInfo() de AuthenticationService implémente 3 méthodes :

  • getId() : Renvoie l'identifiant de l'utilisateur. C'est en fait l'entête http ayant pour nom la valeur de la propriété idHeader de ShibbolethApacheModuleAuthenticationService
  • getType() : Renvoie AuthUtils.SHIBBOLETH
  • getAttributes() : Renvoie une Map d'attributs correspondant à aux noms des entêtes http ciblées par la valeur de la propriété attributeHeaders de ShibbolethApacheModuleAuthenticationService

Authentification par le Remote User

...