Robert Munteanu created SLING-6171:
--------------------------------------

             Summary: Unable to set up ACLs for the 'everyone' principal
                 Key: SLING-6171
                 URL: https://issues.apache.org/jira/browse/SLING-6171
             Project: Sling
          Issue Type: Bug
          Components: Repoinit
    Affects Versions: Repoinit JCR 1.0.0
            Reporter: Robert Munteanu


I'm trying to set up ACLs for the {{everyone}} principal, but it seems that 
repoinit does not accept such a setup.

I'm using a provisioning model section:

{noformat}[:repoinit]
  create path (sling:Folder) /content/blog/comments
  
  set ACL for everyone
        allow jcr:addChildNodes,jcr:modifyProperties on /content/blog/comments
  end{noformat}

And when I do that the repository initialisation fails with:

{noformat}
18.10.2016 23:42:26.846 *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.base.internal.LoginAdminWhitelistImpl)] 
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager 
Exception in a SlingRepositoryInitializer, SlingRepository service registration 
aborted
java.lang.RuntimeException: Failed to set ACL (java.lang.IllegalStateException: 
Principal not found:everyone) AclLine ALLOW {paths=[/content/blog/comments], 
privileges=[jcr:addChildNodes, jcr:modifyProperties]}
        at 
org.apache.sling.jcr.repoinit.impl.ServiceAndAclVisitor.setAcl(ServiceAndAclVisitor.java:93)
        at 
org.apache.sling.jcr.repoinit.impl.ServiceAndAclVisitor.visitSetAclPrincipal(ServiceAndAclVisitor.java:102)
        at 
org.apache.sling.repoinit.parser.operations.SetAclPrincipals.accept(SetAclPrincipals.java:48)
        at 
org.apache.sling.jcr.repoinit.impl.JcrRepoInitOpsProcessorImpl.apply(JcrRepoInitOpsProcessorImpl.java:47)
        at 
org.apache.sling.jcr.repoinit.impl.RepositoryInitializer.processRepository(RepositoryInitializer.java:115)
        at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:378)
        at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(AbstractSlingRepositoryManager.java:338)
        at 
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager.activate(OakSlingRepositoryManager.java:269)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)
        at 
org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
        at 
org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
        at 
org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)
        at 
org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)
        at 
org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)
        at 
org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)
        at 
org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)
        at 
org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
        at 
org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
        at 
org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
        at 
org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
        at 
org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
        at 
org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
        at 
org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
        at 
org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
        at 
org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
        at 
org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
        at 
org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
        at 
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
        at 
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
        at 
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4558)
        at org.apache.felix.framework.Felix.registerService(Felix.java:3550)
        at 
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
        at 
org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
        at 
org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
        at 
org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
        at 
org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
        at 
org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
        at 
org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:670)
        at 
org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609)
        at 
org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426)
        at 
org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:273)
        at 
org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2055)
        at 
org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2023)
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Principal not found:everyone
        at org.apache.sling.jcr.repoinit.impl.AclUtil.setAcl(AclUtil.java:62)
        at 
org.apache.sling.jcr.repoinit.impl.ServiceAndAclVisitor.setAcl(ServiceAndAclVisitor.java:91)
        ... 50 common frames omitted{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to