I am trying to deny access on a libs path (/libs/cq/core/content/nav/tools/security) using the repoinit and it's working fine on the local SDK but failing the pipeline on the cloud. Any recommendation on how to fix it?
Use case : "test-demo" Group is created in admin console and synced to AEM so group already exists in AEM.
The below code is adding to "org.apache.sling.jcr.repoinit.RepositoryInitializer~projectName.cfg.json" :
Solved! Go to Solution.
Views
Replies
Total Likes
Below one workes. Make sure that the spaces and characters are replaced with encoded format
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
scripts="[set ACL for content-writer-service
 allow jcr:read\,rep:write\,jcr:versionManagement\, jcr:modifyAccessControl\,jcr:readAccessControl\,jcr:lockManagement on /var
 end, set ACL for content-writer-service
 allow jcr:read\ on /
 end, set ACL for content-writer-service
 allow jcr:read\,rep:write\,jcr:versionManagement\, jcr:modifyAccessControl\,jcr:readAccessControl\,jcr:lockManagement on /etc
 end, set ACL for content-writer-service
 allow jcr:read\,rep:write\,jcr:versionManagement\, jcr:modifyAccessControl\,jcr:readAccessControl\,jcr:lockManagement on /content
 end, set ACL for content-reader-service
 allow jcr:read\ on /content
 end, set ACL for content-reader-service
 allow jcr:read\ on /etc
 end]"/>
Below one workes. Make sure that the spaces and characters are replaced with encoded format
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
scripts="[set ACL for content-writer-service
 allow jcr:read\,rep:write\,jcr:versionManagement\, jcr:modifyAccessControl\,jcr:readAccessControl\,jcr:lockManagement on /var
 end, set ACL for content-writer-service
 allow jcr:read\ on /
 end, set ACL for content-writer-service
 allow jcr:read\,rep:write\,jcr:versionManagement\, jcr:modifyAccessControl\,jcr:readAccessControl\,jcr:lockManagement on /etc
 end, set ACL for content-writer-service
 allow jcr:read\,rep:write\,jcr:versionManagement\, jcr:modifyAccessControl\,jcr:readAccessControl\,jcr:lockManagement on /content
 end, set ACL for content-reader-service
 allow jcr:read\ on /content
 end, set ACL for content-reader-service
 allow jcr:read\ on /etc
 end]"/>
Create file in ui.config folder:
scripts=[" # These paths must exist otherwise the following ACL applicaiton will fail, resulting in err'ing build create path /libs/cq/core/content/nav/tools/security # Create a group create group test-demo set ACL for test-demo deny jcr:read on /libs/cq/core/content/nav/tools/security end "]
Can you please share the error of pipeline failure ?
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies