sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1784576 - /sling/site/trunk/content/documentation/the-sling-engine/service-authentication.mdtext
Date Mon, 27 Feb 2017 14:57:36 GMT
Author: kwin
Date: Mon Feb 27 14:57:36 2017
New Revision: 1784576

document configuration and ServiceUserMapped service


Modified: sling/site/trunk/content/documentation/the-sling-engine/service-authentication.mdtext
--- sling/site/trunk/content/documentation/the-sling-engine/service-authentication.mdtext
+++ sling/site/trunk/content/documentation/the-sling-engine/service-authentication.mdtext
Mon Feb 27 14:57:36 2017
@@ -106,6 +106,8 @@ The `ServiceUserMapper` defines the foll
     String getServiceUserID(Bundle bundle, String subServiceName);
+In addition a service named `ServiceUserMapped` is registered for each bundle and subservice
name for which a service user mapping is configured ([SLING-4312](
By explicitly defining a (static) reference towards `ServiceUserMapped` one can defer starting
the service until that service user mapping is available.
 ### `ResourceResolverFactory`
 The second part is support for service access to the Resource Tree. To this
@@ -142,7 +144,16 @@ service bundle is the bundle actually us
 service. The additional Subservice Name may be provided with the
 `subServiceName` parameter.
+## Configuration
+### Service User Mappings
+For each service/subservice name combination an according mapping needs to be provided. The
mapping binds a service name/subservice name to a JCR system user.
+This is configured through an OSGi configuration for the factory configuration with PID ``
[SLING-3578]( There you can set one configuration
property named `user.mapping` getting a String array as value where each entry must stick
to the following format:
+    <service-name>[:<subservice-name>]=<authorizable id of a JCR system user>]
+The according user must exist at the point in time where `ResourceResolverFactory.getServiceResourceResolver(...)`
or `SlingRepository.loginService(...)` is called.
 ## Deprecation of administrative authentication

View raw message