Author: buildbot
Date: Mon Jul 10 16:07:47 2017
New Revision: 1015213

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    
websites/staging/sling/trunk/content/documentation/the-sling-engine/service-authentication.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jul 10 16:07:47 2017
@@ -1 +1 @@
-1801436
+1801488

Modified: 
websites/staging/sling/trunk/content/documentation/the-sling-engine/service-authentication.html
==============================================================================
--- 
websites/staging/sling/trunk/content/documentation/the-sling-engine/service-authentication.html
 (original)
+++ 
websites/staging/sling/trunk/content/documentation/the-sling-engine/service-authentication.html
 Mon Jul 10 16:07:47 2017
@@ -222,9 +222,11 @@ such that system administrators are in f
 <p>The implementation uses two fallbacks in case no mapping can be found for 
the given subServiceName</p>
 <ol>
 <li>Use user mapping for the serviceName only (not considering 
subServiceName)</li>
-<li>Use default user (if one is configured).</li>
+<li>Use default user (if one is configured in the OSGi configuration for PID 
<code>org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl</code>).</li>
+<li>Use default mapping (if it is enabled in the OSGi configuration for PID 
<code>org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl</code>) 
which looks up a user with id 
<code>serviceuser--&lt;bundleId&gt;[--&lt;subservice-name&gt;]</code> (since 
Service User Mapper 1.3.0, <a 
href="https://issues.apache.org/jira/browse/SLING-6772";>SLING-6227</a>).</li>
 </ol>
-<p>In addition a service named <code>ServiceUserMapped</code> is registered 
for each bundle and subservice name for which a service user mapping is 
configured (<a 
href="https://issues.apache.org/jira/browse/SLING-4312";>SLING-4312</a>). By 
explicitly defining a (static) reference towards <code>ServiceUserMapped</code> 
one can defer starting the service until that service user mapping is 
available.</p>
+<p>In addition a service named <code>ServiceUserMapped</code> is registered 
for each bundle and subservice name for which a service user mapping is 
explicitly configured (<a 
href="https://issues.apache.org/jira/browse/SLING-4312";>SLING-4312</a>).  By 
explicitly defining a (static) reference towards <code>ServiceUserMapped</code> 
one can defer starting the service until that service user mapping is available.
+Please note, that the two last default mappings are not represented as a 
ServiceUserMapped service and therefore the above mentioned reference does not 
work.</p>
 <h3 id="resourceresolverfactory"><code>ResourceResolverFactory</code><a 
class="headerlink" href="#resourceresolverfactory" title="Permanent 
link">&para;</a></h3>
 <p>The second part is support for service access to the Resource Tree. To this
 avail, the <code>ResourceResolverFactory</code> service is enhanced with a new 
factory
@@ -262,11 +264,11 @@ service. The additional Subservice Name
 <h3 id="service-user-mappings">Service User Mappings<a class="headerlink" 
href="#service-user-mappings" title="Permanent link">&para;</a></h3>
 <p>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 
<code>org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended</code>
 <a href="https://issues.apache.org/jira/browse/SLING-3578";>SLING-3578</a>. 
There you can set one configuration property named <code>user.mapping</code> 
getting a String array as value where each entry must stick to the following 
format:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span 
class="n">service</span><span class="o">-</span><span 
class="n">name</span><span class="o">&gt;</span><span class="p">[:</span><span 
class="o">&lt;</span><span class="n">subservice</span><span 
class="o">-</span><span class="n">name</span><span class="o">&gt;</span><span 
class="p">]=</span><span class="o">&lt;</span><span 
class="n">authorizable</span> <span class="n">id</span> <span 
class="n">of</span> <span class="n">a</span> <span class="n">JCR</span> <span 
class="n">system</span> <span class="n">user</span><span 
class="o">&gt;</span><span class="p">]</span>
+<div class="codehilite"><pre><span class="o">&lt;</span><span 
class="n">service</span><span class="o">-</span><span 
class="n">name</span><span class="o">&gt;</span><span class="p">[:</span><span 
class="o">&lt;</span><span class="n">subservice</span><span 
class="o">-</span><span class="n">name</span><span class="o">&gt;</span><span 
class="p">]=</span><span class="o">&lt;</span><span 
class="n">authorizable</span> <span class="n">id</span> <span 
class="n">of</span> <span class="n">a</span> <span class="n">JCR</span> <span 
class="n">system</span> <span class="n">user</span><span class="o">&gt;</span>
 </pre></div>
 
 
-<p>The according user must exist at the point in time where 
<code>ResourceResolverFactory.getServiceResourceResolver(...)</code> or 
<code>SlingRepository.loginService(...)</code> is called. If you rely on one of 
those methods in your <code>activate</code> method of an OSGi component you 
should make sure that you defer starting your OSGi component until the 
according service user mapping is in place. For that you can reference the OSGi 
service <code>ServiceUserMapped</code> (<a 
href="https://issues.apache.org/jira/browse/SLING-4312";>SLING-4312</a>), 
optionally with a target filter on property <code>subServiceName</code> (in 
case such a subservice name is used). The service 
<code>ServiceUserMapped</code> does not expose any methods but is only a marker 
interface exclusively used to defer starting of other OSGi components. However 
this waits only for the mapping configuration to be available, it does not wait 
for the service user itself to be available.</p>
+<p>The according user must exist at the point in time where 
<code>ResourceResolverFactory.getServiceResourceResolver(...)</code> or 
<code>SlingRepository.loginService(...)</code> is called. If you rely on one of 
those methods in your <code>activate</code> method of an OSGi component you 
should make sure that you defer starting your OSGi component until the 
according service user mapping is in place. For that you can reference the OSGi 
service <code>ServiceUserMapped</code> (see Section 
<code>ServiceUserMapper</code> above), optionally with a target filter on 
property <code>subServiceName</code> (in case such a subservice name is used). 
The service <code>ServiceUserMapped</code> does not expose any methods but is 
only a marker interface exclusively used to defer starting of other OSGi 
components. However this waits only for the mapping configuration to be 
available, it does not wait for the service user itself to be available.</p>
 <p>Example OSGi DS Component</p>
 <div class="codehilite"><pre><span class="nd">@Component</span><span 
class="o">(</span>
     <span class="n">reference</span> <span class="o">=</span> <span 
class="o">{</span>
@@ -281,7 +283,6 @@ This is configured through an OSGi confi
 </pre></div>
 
 
-<p>There is a default mapping applied if no OSGi configuration is available 
for the mapping. The default is: "serviceuser--" + bundleId [ + "--" + 
subservice-name]. Please note, that these default mappings are not represented 
as a ServiceUserMapped service and therefore the above mentioned reference does 
not work.</p>
 <h2 id="deprecation-of-administrative-authentication">Deprecation of 
administrative authentication<a class="headerlink" 
href="#deprecation-of-administrative-authentication" title="Permanent 
link">&para;</a></h2>
 <p>Originally the 
<code>ResourceResolverFactory.getAdministrativeResourceResolver</code>
 and <code>SlingRepository.loginAdministrative</code> methods have been defined 
to
@@ -387,7 +388,7 @@ It supports the following configuration
 </tbody>
 </table>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
-        Rev. 1794603 by cziegeler on Tue, 9 May 2017 15:57:52 +0000
+        Rev. 1801488 by kwin on Mon, 10 Jul 2017 16:07:24 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project


Reply via email to