You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Robert Munteanu <ro...@apache.org> on 2020/08/21 16:47:31 UTC
[filevault] Installing users and access control entries in the same
package
Hi,
I am trying to install a content package that includes:
- two users under /home/users/slingshot
- content with ACEs that reference the two users under
/content/slingshot
When installing the content packages I see that the /content entry is
processed first, leading to errors like
E /content/slingshot/users/slingshot1/rep:policy
! org.xml.sax.SAXException:
javax.jcr.security.AccessControlException: Unknown principal slingshot1
javax.jcr.security.AccessControlException: Unknown principal slingshot1
and only later on is the user created
- /home
- /home/users
A /home/users/slingshot
A /home/users/slingshot/slingshot1
Obviously, reinstalling the content package fixes the problem but I'm
looking for a more error-safe way of installing the content package.
How can I install this content package with users and ACEs from without
errors?
Thanks,
Robert
Re: [filevault] Installing users and access control entries in the
same package
Posted by Angela Schreiber <an...@adobe.com.INVALID>.
hi robert
glad that it helped.
for features like jackrabbit fvault or sling content distribution the contract imposed by the specification seems just a bit too restrictive... also the specification doesn't define how principals are managed (easy way out 😉).
anyway.... that's why the additional import-behavior option exists both for access control content as well as for user management (group membership, impersonating principals) in oak.
kind regards
angela
________________________________
From: Robert Munteanu <ro...@apache.org>
Sent: Tuesday, August 25, 2020 1:24 PM
To: oak-dev@jackrabbit.apache.org <oa...@jackrabbit.apache.org>
Subject: Re: [filevault] Installing users and access control entries in the same package
Hi Angela,
On Tue, 2020-08-25 at 07:39 +0000, Angela Schreiber wrote:
> hi robert
>
> without having a closer look, i would suspect that your repository
> comes with default import-behavior configuration that strictly
> follows JCR specification which mandates a given principal to exist
> when dealing with access control management. oak comes with a variety
> of import-behavior options and if you configure it to be
> 'besteffort', it will allow to create ACEs for principals, which do
> not yet exist.
That does help, thank you. I've swiched the Sling Starter to use this
configuration from now on.
Best regards,
Robert
>
> hope that helps
> angela
> ________________________________
> From: Robert Munteanu <ro...@apache.org>
> Sent: Friday, August 21, 2020 6:47 PM
> To: oak-dev@jackrabbit.apache.org <oa...@jackrabbit.apache.org>
> Subject: [filevault] Installing users and access control entries in
> the same package
>
> Hi,
>
> I am trying to install a content package that includes:
>
> - two users under /home/users/slingshot
> - content with ACEs that reference the two users under
> /content/slingshot
>
> When installing the content packages I see that the /content entry is
> processed first, leading to errors like
>
> E /content/slingshot/users/slingshot1/rep:policy
> ! org.xml.sax.SAXException:
> javax.jcr.security.AccessControlException: Unknown principal
> slingshot1
> javax.jcr.security.AccessControlException: Unknown principal
> slingshot1
>
> and only later on is the user created
>
> - /home
> - /home/users
> A /home/users/slingshot
> A /home/users/slingshot/slingshot1
>
> Obviously, reinstalling the content package fixes the problem but I'm
> looking for a more error-safe way of installing the content package.
>
> How can I install this content package with users and ACEs from
> without
> errors?
>
> Thanks,
> Robert
>
Re: [filevault] Installing users and access control entries in the
same package
Posted by Robert Munteanu <ro...@apache.org>.
Hi Angela,
On Tue, 2020-08-25 at 07:39 +0000, Angela Schreiber wrote:
> hi robert
>
> without having a closer look, i would suspect that your repository
> comes with default import-behavior configuration that strictly
> follows JCR specification which mandates a given principal to exist
> when dealing with access control management. oak comes with a variety
> of import-behavior options and if you configure it to be
> 'besteffort', it will allow to create ACEs for principals, which do
> not yet exist.
That does help, thank you. I've swiched the Sling Starter to use this
configuration from now on.
Best regards,
Robert
>
> hope that helps
> angela
> ________________________________
> From: Robert Munteanu <ro...@apache.org>
> Sent: Friday, August 21, 2020 6:47 PM
> To: oak-dev@jackrabbit.apache.org <oa...@jackrabbit.apache.org>
> Subject: [filevault] Installing users and access control entries in
> the same package
>
> Hi,
>
> I am trying to install a content package that includes:
>
> - two users under /home/users/slingshot
> - content with ACEs that reference the two users under
> /content/slingshot
>
> When installing the content packages I see that the /content entry is
> processed first, leading to errors like
>
> E /content/slingshot/users/slingshot1/rep:policy
> ! org.xml.sax.SAXException:
> javax.jcr.security.AccessControlException: Unknown principal
> slingshot1
> javax.jcr.security.AccessControlException: Unknown principal
> slingshot1
>
> and only later on is the user created
>
> - /home
> - /home/users
> A /home/users/slingshot
> A /home/users/slingshot/slingshot1
>
> Obviously, reinstalling the content package fixes the problem but I'm
> looking for a more error-safe way of installing the content package.
>
> How can I install this content package with users and ACEs from
> without
> errors?
>
> Thanks,
> Robert
>
Re: [filevault] Installing users and access control entries in the
same package
Posted by Angela Schreiber <an...@adobe.com.INVALID>.
hi robert
without having a closer look, i would suspect that your repository comes with default import-behavior configuration that strictly follows JCR specification which mandates a given principal to exist when dealing with access control management. oak comes with a variety of import-behavior options and if you configure it to be 'besteffort', it will allow to create ACEs for principals, which do not yet exist.
hope that helps
angela
________________________________
From: Robert Munteanu <ro...@apache.org>
Sent: Friday, August 21, 2020 6:47 PM
To: oak-dev@jackrabbit.apache.org <oa...@jackrabbit.apache.org>
Subject: [filevault] Installing users and access control entries in the same package
Hi,
I am trying to install a content package that includes:
- two users under /home/users/slingshot
- content with ACEs that reference the two users under
/content/slingshot
When installing the content packages I see that the /content entry is
processed first, leading to errors like
E /content/slingshot/users/slingshot1/rep:policy
! org.xml.sax.SAXException:
javax.jcr.security.AccessControlException: Unknown principal slingshot1
javax.jcr.security.AccessControlException: Unknown principal slingshot1
and only later on is the user created
- /home
- /home/users
A /home/users/slingshot
A /home/users/slingshot/slingshot1
Obviously, reinstalling the content package fixes the problem but I'm
looking for a more error-safe way of installing the content package.
How can I install this content package with users and ACEs from without
errors?
Thanks,
Robert
Re: [filevault] Installing users and access control entries in the
same package
Posted by Robert Munteanu <ro...@apache.org>.
Hi Kondrad,
On Fri, 2020-08-21 at 23:10 +0200, Konrad Windszus wrote:
> I would suggest to split it up into two packages and make the ACL
> package depend on the user package. You can even put those two
> packages into a common container package. The dependencies will
> enforce the right installation order.
Thanks for the suggestion, but I would like to avoid that duplication
if possible. I am currently splitting this application from a single
bundle to a bundle + two content packages ( sample content + apps ).
Splitting it further would make even more complicated to understand
IMO.
I am not sure if principal-based authentication would work here, but I
could give it a try.
Robert
Re: [filevault] Installing users and access control entries in the same package
Posted by Konrad Windszus <ko...@gmx.de>.
I would suggest to split it up into two packages and make the ACL package depend on the user package. You can even put those two packages into a common container package. The dependencies will enforce the right installation order.
Konrad
> Am 21.08.2020 um 18:47 schrieb Robert Munteanu <ro...@apache.org>:
>
> Hi,
>
> I am trying to install a content package that includes:
>
> - two users under /home/users/slingshot
> - content with ACEs that reference the two users under
> /content/slingshot
>
> When installing the content packages I see that the /content entry is
> processed first, leading to errors like
>
> E /content/slingshot/users/slingshot1/rep:policy
> ! org.xml.sax.SAXException:
> javax.jcr.security.AccessControlException: Unknown principal slingshot1
> javax.jcr.security.AccessControlException: Unknown principal slingshot1
>
> and only later on is the user created
>
> - /home
> - /home/users
> A /home/users/slingshot
> A /home/users/slingshot/slingshot1
>
> Obviously, reinstalling the content package fixes the problem but I'm
> looking for a more error-safe way of installing the content package.
>
> How can I install this content package with users and ACEs from without
> errors?
>
> Thanks,
> Robert
>