Authentication - ActorsPage added by Felix MeschbergerActorsThe authentication process involves a number of actors contributing to the concepts, the API and the particular implementations. OSGi Http Service SpecificationThe main support for authentication is defined by the OSGi Http Service specification. This specification defines how an OSGi application can register servlets and resources to build web applications. As part of the servlet and/or resource registration a HttpContext may be provided, which allows for additional support. The main method of interest to the authentication process is the handleSecurity method. This is called by the OSGi Http Service implementation before the registered servlet is called. Its intent is to authenticate the request and to provide authentication information for the request object: the authentication type and the remote user name. The Sling Commons Auth bundle provides the AuthenticationSupport service which may be used to the implement the HttpContext.handleSecurity method. Sling EngineThe Sling Engine implements the main entry point into the Sling system by means of the SlingMainServlet. This servlet is registered with the OSGi Http Service and provides a custom HttpContext whose handleSecurity method is implemented by the AuthenticationSupport service. When the request hits the service method of the Sling Main Servlet, the resource resolver provided by the AuthenticationSupport service is extract from the request attributes and used as the resource resolver for the request. That's all there is for the Sling Engine to do with respect to authentication. Sling Commons AuthThe support for authenticating client requests is implemented in the Sling Commons Auth bundle. As such this bundle provides three areas of support
JCR RepositoryThe actual process of logging into the repository and provided a Session is implementation dependent. In the case of Jackrabbit extensibility is provided by configuration of the Jackrabbit repository by means of an interface and two helper classes:
The Sling Jackrabbit Embedded Repository bundle provides additional plugin interfaces to extend the login process dynamically using OSGi services. To this avail the bundle configures a LoginModule with the provided default Jackrabbit configuration supporting these plugins:
Sling ApplicationsSling Applications requiring authenticed requests should not care about how authentication is implemented. To support such functionality the Authenticator service is provided with two methods:
Sling Applications should never directly use any knowledge of any authentication handler or directly call into an authentication handler. This will certainly break the application and cause unexpected behaviour.
Change Notification Preferences
View Online
|
Add Comment
|
