Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4B746200B9D for ; Wed, 28 Sep 2016 16:02:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A240160AB4; Wed, 28 Sep 2016 14:02:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 91274160AC1 for ; Wed, 28 Sep 2016 16:02:21 +0200 (CEST) Received: (qmail 81055 invoked by uid 500); 28 Sep 2016 14:02:20 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 81033 invoked by uid 99); 28 Sep 2016 14:02:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2016 14:02:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 77BD12C2A5F for ; Wed, 28 Sep 2016 14:02:20 +0000 (UTC) Date: Wed, 28 Sep 2016 14:02:20 +0000 (UTC) From: "Tobias Bocanegra (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JCRVLT-128) System maintained cache nodes should be ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 28 Sep 2016 14:02:22 -0000 [ https://issues.apache.org/jira/browse/JCRVLT-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15529718#comment-15529718 ] Tobias Bocanegra commented on JCRVLT-128: ----------------------------------------- my fix exactly fixes the update case :-) but I would like to create a test for it. for that I need to create a test user with a {{rep:cache}} node. any hints on how to do this? > System maintained cache nodes should be ignored > ----------------------------------------------- > > Key: JCRVLT-128 > URL: https://issues.apache.org/jira/browse/JCRVLT-128 > Project: Jackrabbit FileVault > Issue Type: Bug > Affects Versions: 3.1.28 > Reporter: Tommaso Teofili > Assignee: Tobias Bocanegra > Attachments: JCRVLT-128.0.patch > > > In OAK-3003 a persisted [principal cache|http://jackrabbit.apache.org/oak/docs/security/principal/cache.html] was introduced that creates _rep:cache_ nodes under authorizables. > Creating a package for such authorizables will result in including the cache node in there, which sounds wrong as that node is an implementation detail which doesn't make sense to install anywhere; however that can be avoided by proper filters. > What is problematic is the installation phase, if an authorizable gets packaged with FileVault (no rep:cache in the package) and the target user/group has a rep:cache node itself the importer will try (and fail as it's protected) to delete the persisted cache node if ImportMode is set to UPDATE. > In my opinion this is wrong, it should be possible to not touch such nodes on package installation, regardless of the chosen ImportMode. > {noformat} > org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage Error during install. > javax.jcr.nodetype.ConstraintViolationException: OakConstraint0034: Attempt to create or change the system maintained cache. > at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:225) > at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:212) > at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:670) > at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:496) > at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:419) > at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:274) > at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:416) > at org.apache.jackrabbit.vault.fs.io.AutoSave.save(AutoSave.java:175) > at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:416) > at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:234) > at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:153) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)