lemonldap-ng/doc/sources/admin/applications/spring.rst

49 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2020-05-14 23:29:41 +02:00
Spring Security (ACEGI)
=======================
|image0|
Presentation
------------
`Spring
Security <http://static.springsource.org/spring-security/site/>`__ is
the new ACEGI name. This is a well known security framework for J2EE
applications.
Spring Security provides a default ``pre-authentication`` mechanism that
can be used to connect your J2EE application to LL::NG.
Configuration
-------------
You can find all suitable information here:
http://static.springsource.org/spring-security/site/docs/3.0.x/reference/preauth.html
To summarize, to get the user connected through the ``Auth-User`` HTTP
2020-05-14 23:29:41 +02:00
Header, use this Sping Security configuration:
2020-05-21 15:13:24 +02:00
.. code-block:: xml
2020-05-14 23:29:41 +02:00
<bean id="LemonLDAPNGFilter" class=
"org.springframework.security.web.authentication.preauth.header.RequestHeaderPreAuthenticatedProcessingFilter">
<security:custom-filter position="PRE_AUTH_FILTER" />
<property name="principalRequestHeader" value="Auth-User"/>
<property name="authenticationManager" ref="authenticationManager" />
</bean>
<bean id="preauthAuthProvider" class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider">
<security:custom-authentication-provider />
<property name="preAuthenticatedUserDetailsService">
<bean id="userDetailsServiceWrapper" class="org.springframework.security.userdetails.UserDetailsByNameServiceWrapper">
<property name="userDetailsService" ref="userDetailsService"/>
</bean>
</property>
</bean>
<security:authentication-manager alias="authenticationManager" />
.. |image0| image:: /applications/spring_logo.png
:class: align-center