You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:50:15 UTC
[sling-org-apache-sling-jcr-repoinit] annotated tag
org.apache.sling.jcr.repoinit-1.1.2 created (now 61f9a3f)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git.
at 61f9a3f (tag)
tagging 2fcb3a03029af525d95c09d29cc0bacc9253f570 (commit)
by Robert Munteanu
on Thu Dec 15 11:41:42 2016 +0000
- Log -----------------------------------------------------------------
org.apache.sling.jcr.repoinit-1.1.2
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new ae75f44 SLING-5355 - jcr module added, work in progress
new eabeb26 SLING-5355 - rename jcr to oak-jcr
new 4b89959 SLING-5355 - test with multiple users
new d20da33 SLING-5355 - factor our TestUtil
new d7a5f83 SLING-5355 - AclOperationVisitor partially implemented, and webconsole plugin added
new a52d167 SLING-5355 - cleanup tests
new 909608b SLING-5355 - better error reporting
new de7c980 SLING-5355 - parser service
new 1d0ac30 SLING-5355 - it's ok for service user to already exist
new 1bc8999 SLING-5355 - AclSetupComponent, work in progress
new 8791efe SLING-5355 - fail if Principal not found
new 32f8cf8 SLING-5355 - test ACL definitions in provisioning model
new 15ca220 Switch to parent pom 26
new 77ca4b9 SLING-5449 - rename the modules to 'jcrinit'
new 462ba19 SLING-5449 - the name is 'repoinit' instead as the parser is not JCR-specific
new 6bc3f85 SLING-5449 - the name is 'repoinit' instead as the parser is not JCR-specific
new 8296d7d SLING-5449 - rename packages to repoinit
new 22a05d6 SLING-5449 - remove AclSetup component and adapt integration tests
new 7790424 SLING-5449 - rename the remaining things from ACL to 'repoinit'
new 8a6aec6 SLING-5449 - rename one more thing from ACL to 'repoinit'
new 9bd6e4b SLING-5449 - remove console plugin, we don't want this module to be Sling specific
new 2752857 SLING-5449 - move repoinit under commons
new f8873b8 repoinit: fix SCM urls after move
new 5e4f40b repoinit/oak-jcr: second attempt to fix the scm urls
new 70c5d7b SLING-5449 - initial base tree creation language, see test-20.txt for examples
new 7af1acb SLING-5449 - Implement CreatePath in oak-jcr module
new 5938771 SLING-5449 - move the repoinit modules under extensions, they do contain Sling-specific stuff
new e5e302e SLING-5449 - fix scm strings
new e87acee SLING-5355 - RepositoryInitializer created, reads from provisioning model, WIP:ProvisioningModelIT fails for now
new 4fc1e21 SLING-5355 - ProvisioningModelIT passes
new 029bbe3 SLING-5800 - remove unnecessary snapshots and use current jcr.api snapshot
new 7b78070 SLING-5800 - depend on related releases while releasing this module
new 3663d69 [maven-release-plugin] prepare release org.apache.sling.repoinit.oak-jcr-1.0.0
new 60f5b7b [maven-release-plugin] prepare for next development iteration
new 7dff12f SLING-5800 - back to current snapshots after releases
new 713d36f Rename o.a.s.repoinit.oak-jcr to o.a.s.jcr.repoinit
new 1a15e86 SLING-5819 - jcr.repoinit bundle should only export what's strictly needed
new 4273f56 Remove unused source files and folders
new 92c4254 SLING-5819 - rename repoinit.jcr package to jcr.repoinit
new 533713a Remove unused source code folders
new 014d655 Prepare for release
new bb14f7d [maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.0.0
new 370808a [maven-release-plugin] prepare for next development iteration
new fa4b8d9 SLING-5819 - move jcr.repoinit module under jcr folder
new 2c3076e SLING-5843 - add 'register namespace' statement to repoinit parser
new 0eb0707 SLING-5842 - add 'register nodetypes' statement to repoinit parser
new 552a131 SLING-5842, SLING-5843 - implement the register namespace and nodetype operations in the jcr.repoinit module
new 71c098a SLING-5902 RepositoryInitializer uses name component property instead of label
new 2ea4d7f SLING-5917 parseRawText flag in getRepoInitText() is ambiguous
new 35302c8 SLING-5917 - add RepositoryInitializer tests
new 177001a SLING-5917 - fix 'null section' test
new 4bb31e7 SLING-5923 - Support <RAW> marker in model.section.name config param, same meaning as empty string
new 31b0cec SLING-5923 - clarify description
new 3581dbb SLING-5943 - support explicit format in RepositoryInitializer configuration
new ed70824 SLING-5943 - better config metadata + logging
new 3fa0bab SLING-5943 - support multiple model/raw references in RepositoryInitializer configuration
new b233c66 Prepare to release parser + this module
new 83ea12f [maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.0.2
new 3c7f77c [maven-release-plugin] prepare for next development iteration
new c7c4c20 Back to snapshots after release
new 697158d SLING-6171 Unable to set up ACLs for the 'everyone' principal
new 64abc92 use Sling parent 29 and adjust some dependencies
new b953651 add logging for ACL operations
new 9a17a98 SLING-6179 Remove default value for property references from RepositoryInitializer
new 14e35d0 SLING-6219 - reponit grammar support for create/delete user
new b0edce3 SLING-6219 : Move ACL handling into separate visitor
new 0456e0d SLING-6219 : Allow to create users with repoinit
new e569605 SLING-6219 : Allow to create users with repoinit
new 9afa129 SLING-6219 - reponit grammar support for create/delete user
new 7e3df05 Update to parent pom 29
new 17fb7fc Fix javadoc generation
new 6082cba Use repoinit parser 1.1.0
new 5dc6a49 [maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.1.0
new c4603b9 [maven-release-plugin] prepare for next development iteration
new 0bc31a8 Switch to parser 1.1.1-SNAPSHOT during release vote
new 0556772 Fix NPE in activate
new 5873b64 Use repoinit parser 1.1.0 for release
new 3328d5a [maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.1.0
new 59415e9 [maven-release-plugin] prepare for next development iteration
new af9eb9b Switch back to 1.1.1-SNAPSHOT for parser during release
new c63140f Fix NPE in processing
new ba7aa48 Require configuration
new 9c21077 Switch to repo init parser 1.1.0
new b4485b9 [maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.1.0
new 6804b4b [maven-release-plugin] prepare for next development iteration
new 749016d Switch to repo init parser 1.1.1-SNAPSHOT
new 91804c1 Use released repoinit parser 1.1.0
new e68a508 Make name consistent with module name
new c29c1f8 SLING-6219 - warn if creating users with cleartext passwords
new d043d8c SLING-6368 - Repoinit should not attempt to create access control entries when no changes are needed
new 9781bfd [maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.1.2
new 2fcb3a0 [maven-release-plugin] copy for tag org.apache.sling.jcr.repoinit-1.1.2
The 92 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-jcr-repoinit] 01/08: [maven-release-plugin]
prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 6804b4be9501744f58fbb9fc0902d7305635bfa1
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Nov 9 09:18:54 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1768891 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3ee648c..70307b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<artifactId>org.apache.sling.jcr.repoinit</artifactId>
<packaging>bundle</packaging>
- <version>1.1.0</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>Apache Sling RepoInit JCR module</name>
<description>
Initializes a JCR repository based on the output
@@ -41,9 +41,9 @@
</properties>
<scm>
- <connection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.0</developerConnection>
- <url>https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.0</url>
+ <connection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit</developerConnection>
+ <url>https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 02/08: Switch to repo init
parser 1.1.1-SNAPSHOT
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 749016d2d228a7b1de08b3b31ba74909c079fe7a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Nov 9 09:20:03 2016 +0000
Switch to repo init parser 1.1.1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1768892 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 70307b1..2af22bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,7 +147,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.repoinit.parser</artifactId>
- <version>1.1.0</version>
+ <version>1.1.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 06/08: SLING-6368 - Repoinit
should not attempt to create access control entries when no changes are
needed
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit d043d8c4cb297ed6e6a16996bb5177575a555d80
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Dec 15 10:13:11 2016 +0000
SLING-6368 - Repoinit should not attempt to create access control
entries when no changes are needed
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1774410 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/jcr/repoinit/impl/AclUtil.java | 83 +++++++++++-
.../sling/jcr/repoinit/impl/AclUtilTest.java | 141 +++++++++++++++++++++
.../apache/sling/jcr/repoinit/impl/TestUtil.java | 8 +-
3 files changed, 227 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java b/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
index 43b9445..934fa5f 100644
--- a/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
+++ b/src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
@@ -17,22 +17,31 @@
package org.apache.sling.jcr.repoinit.impl;
import java.security.Principal;
+import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import javax.jcr.PathNotFoundException;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.security.AccessControlEntry;
import javax.jcr.security.AccessControlManager;
import javax.jcr.security.Privilege;
+import org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry;
import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
import org.apache.jackrabbit.api.security.JackrabbitAccessControlManager;
import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/** Utilities for ACL management */
public class AclUtil {
+ private static final Logger LOG = LoggerFactory.getLogger(AclUtil.class);
+
public static JackrabbitAccessControlManager getJACM(Session s) throws UnsupportedRepositoryOperationException, RepositoryException {
final AccessControlManager acm = s.getAccessControlManager();
if(!(acm instanceof JackrabbitAccessControlManager)) {
@@ -49,20 +58,88 @@ public class AclUtil {
final String [] privArray = privileges.toArray(new String[privileges.size()]);
final Privilege[] jcrPriv = AccessControlUtils.privilegesFromNames(s, privArray);
-
for(String path : paths) {
if(!s.nodeExists(path)) {
throw new PathNotFoundException("Cannot set ACL on non-existent path " + path);
}
JackrabbitAccessControlList acl = AccessControlUtils.getAccessControlList(s, path);
+ AccessControlEntry[] existingAces = acl.getAccessControlEntries();
+ boolean changed = false;
for (String name : principals) {
final Principal principal = AccessControlUtils.getPrincipal(s, name);
if (principal == null) {
throw new IllegalStateException("Principal not found: " + name);
}
- acl.addEntry(principal, jcrPriv, isAllow);
+ LocalAccessControlEntry newAce = new LocalAccessControlEntry(principal, jcrPriv, isAllow);
+ if (contains(existingAces, newAce)) {
+ LOG.info("Not adding {} to path {} since an equivalent access control entry already exists", newAce, path);
+ continue;
+ }
+ acl.addEntry(newAce.principal, newAce.privileges, newAce.isAllow);
+ changed = true;
+ }
+ if ( changed ) {
+ getJACM(s).setPolicy(path, acl);
+ }
+
+ }
+ }
+
+ // visible for testing
+ static boolean contains(AccessControlEntry[] existingAces, LocalAccessControlEntry newAce) throws RepositoryException {
+ for (int i = 0 ; i < existingAces.length; i++) {
+ JackrabbitAccessControlEntry existingEntry = (JackrabbitAccessControlEntry) existingAces[i];
+ LOG.debug("Comparing {} with {}", newAce, toString(existingEntry));
+ if (newAce.isContainedIn(existingEntry)) {
+ return true;
}
- getJACM(s).setPolicy(path, acl);
+ }
+ return false;
+ }
+
+ private static String toString(JackrabbitAccessControlEntry entry) throws RepositoryException {
+ return "[" + entry.getClass().getSimpleName() + "# principal: "
+ + "" + entry.getPrincipal() + ", privileges: " + Arrays.toString(entry.getPrivileges()) +
+ ", isAllow: " + entry.isAllow() + ", restrictionNames: " + entry.getRestrictionNames() + "]";
+ }
+
+ /**
+ * Helper class which allows easy comparison of a local (proposed) access control entry with an existing one
+ */
+ static class LocalAccessControlEntry {
+
+ private final Principal principal;
+ private final Privilege[] privileges;
+ private final boolean isAllow;
+
+ LocalAccessControlEntry(Principal principal, Privilege[] privileges, boolean isAllow) {
+ this.principal = principal;
+ this.privileges = privileges;
+ this.isAllow = isAllow;
+ }
+
+ public boolean isContainedIn(JackrabbitAccessControlEntry other) throws RepositoryException {
+ return other.getPrincipal().equals(principal) &&
+ contains(other.getPrivileges(), privileges) &&
+ other.isAllow() == isAllow &&
+ ( other.getRestrictionNames() == null ||
+ other.getRestrictionNames().length == 0 );
+ }
+
+ private boolean contains(Privilege[] first, Privilege[] second) {
+ // we need to ensure that the privilege order is not taken into account, so we use sets
+ Set<Privilege> set1 = new HashSet<Privilege>();
+ set1.addAll(Arrays.asList(first));
+
+ Set<Privilege> set2 = new HashSet<Privilege>();
+ set2.addAll(Arrays.asList(second));
+
+ return set1.containsAll(set2);
+ }
+
+ @Override
+ public String toString() {
+ return "[" + getClass().getSimpleName() + "# principal " + principal+ ", privileges: " + Arrays.toString(privileges) + ", isAllow : " + isAllow + "]";
}
}
}
diff --git a/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java b/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java
new file mode 100644
index 0000000..0fb5a42
--- /dev/null
+++ b/src/test/java/org/apache/sling/jcr/repoinit/impl/AclUtilTest.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.jcr.repoinit.impl;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.security.Principal;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.security.Privilege;
+
+import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
+import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
+import org.apache.sling.repoinit.parser.RepoInitParsingException;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.junit.SlingContext;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class AclUtilTest {
+
+ @Rule
+ public final SlingContext context = new SlingContext(ResourceResolverType.JCR_OAK);
+
+ private TestUtil U;
+
+ private JackrabbitAccessControlList acl;
+
+ @Before
+ public void setup() throws RepositoryException, RepoInitParsingException {
+ U = new TestUtil(context);
+ U.parseAndExecute("create service user " + U.username);
+
+ final String aclSetup =
+ "set ACL for " + U.username + "\n"
+ + "allow jcr:read on /\n"
+ + "allow jcr:write on /\n"
+ + "end"
+ ;
+
+ U.parseAndExecute(aclSetup);
+ acl = AccessControlUtils.getAccessControlList(U.adminSession, "/");
+ }
+
+ @After
+ public void cleanup() throws RepositoryException, RepoInitParsingException {
+ U.cleanupUser();
+ }
+
+ @Test
+ public void entryIsContained() throws Exception {
+
+ // validates that an exact match of the username, privilege list and isAllow is contained
+
+ assertIsContained(acl, U.username, new String[]{ Privilege.JCR_READ, Privilege.JCR_WRITE }, true);
+ }
+
+ @Test
+ public void entryWithFewerPrivilegesIsContained() throws Exception {
+
+ // validates that an exact match of the username and isAllow but with fewer privileges is contained
+ assertIsContained(acl, U.username, new String[]{ Privilege.JCR_WRITE }, true);
+ }
+
+ @Test
+ public void entryWithDifferentPrivilegeIsNotContained() throws Exception {
+ // validates that an exact match of the username and isAllow but with different privileges is contained
+ assertIsNotContained(acl, U.username, new String[]{ Privilege.JCR_ALL }, true);
+ }
+
+ @Test
+ public void entryWithPartiallyMatchingPrivilegesIsNotContained() throws Exception {
+ // validates that an exact match of the username and isAllow but with privileges partially overlapping is contained
+ // existing: JCR_READ, JCR_WRITE
+ // new: JCR_READ, JCR_MODIFY_PROPERTIES
+ assertIsNotContained(acl, U.username, new String[]{ Privilege.JCR_READ, Privilege.JCR_MODIFY_PROPERTIES }, true);
+ }
+
+ @Test
+ public void entryWithDifferentUserIsNotContained() throws Exception {
+
+ // validates that an exact match of the privileges and isAllow but with different username is not contained
+ String otherPrincipalName = U.username + "_";
+ try {
+ U.parseAndExecute("create service user " + otherPrincipalName);
+ assertIsNotContained(acl, otherPrincipalName, new String[]{ Privilege.JCR_READ, Privilege.JCR_WRITE }, true);
+ } finally {
+ U.cleanupServiceUser(otherPrincipalName);
+ }
+ }
+
+ @Test
+ public void entryWithDifferentIsAllowIsNotContained() throws Exception {
+ // validates that an exact match of the username and privileges but with different is allow is not contained
+ assertIsNotContained(acl, U.username, new String[]{ Privilege.JCR_READ, Privilege.JCR_WRITE }, false);
+ }
+
+ private void assertIsContained(JackrabbitAccessControlList acl, String username, String[] privilegeNames, boolean isAllow) throws RepositoryException {
+ assertIsContained0(acl, username, privilegeNames, isAllow, true);
+ }
+
+ private void assertIsNotContained(JackrabbitAccessControlList acl, String username, String[] privilegeNames, boolean isAllow) throws RepositoryException {
+ assertIsContained0(acl, username, privilegeNames, isAllow, false);
+ }
+
+ private void assertIsContained0(JackrabbitAccessControlList acl, String username, String[] privilegeNames, boolean isAllow, boolean contained) throws RepositoryException {
+ AclUtil.LocalAccessControlEntry localAce = new AclUtil.LocalAccessControlEntry(principal(username), privileges(privilegeNames), isAllow);
+
+ if ( contained ) {
+ assertTrue("ACL does not contain an entry for " + localAce, AclUtil.contains(acl.getAccessControlEntries(), localAce));
+ } else {
+ assertFalse("ACL contains an entry for " + localAce, AclUtil.contains(acl.getAccessControlEntries(), localAce));
+ }
+
+ }
+
+ private Principal principal(String principalName) throws RepositoryException {
+ return AccessControlUtils.getPrincipal(U.adminSession, principalName);
+ }
+
+ private Privilege[] privileges(String... privilegeNames) throws RepositoryException {
+ return AccessControlUtils.privilegesFromNames(U.adminSession, privilegeNames);
+ }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/sling/jcr/repoinit/impl/TestUtil.java b/src/test/java/org/apache/sling/jcr/repoinit/impl/TestUtil.java
index 2ff0101..24e0ae1 100644
--- a/src/test/java/org/apache/sling/jcr/repoinit/impl/TestUtil.java
+++ b/src/test/java/org/apache/sling/jcr/repoinit/impl/TestUtil.java
@@ -112,8 +112,12 @@ public class TestUtil {
}
public void cleanupUser() throws RepositoryException, RepoInitParsingException {
- parseAndExecute("delete service user " + username);
- assertServiceUser("in cleanupUser()", username, false);
+ cleanupServiceUser(username);
+ }
+
+ public void cleanupServiceUser(String principalName) throws RepositoryException, RepoInitParsingException {
+ parseAndExecute("delete service user " + principalName);
+ assertServiceUser("in cleanupUser()", principalName, false);
}
public Session loginService(String serviceUsername) throws RepositoryException {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 07/08: [maven-release-plugin]
prepare release org.apache.sling.jcr.repoinit-1.1.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 9781bfd223c7115db9a70156b125ce7f09c17aef
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Dec 15 11:41:29 2016 +0000
[maven-release-plugin] prepare release org.apache.sling.jcr.repoinit-1.1.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1774419 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 190c0c3..9211ad6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<artifactId>org.apache.sling.jcr.repoinit</artifactId>
<packaging>bundle</packaging>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.2</version>
<name>Apache Sling JCR RepoInit module</name>
<description>
Initializes a JCR repository based on the output
@@ -41,9 +41,9 @@
</properties>
<scm>
- <connection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit</developerConnection>
- <url>https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit</url>
+ <connection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.2</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.2</developerConnection>
+ <url>https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.2</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 08/08: [maven-release-plugin]
copy for tag org.apache.sling.jcr.repoinit-1.1.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 2fcb3a03029af525d95c09d29cc0bacc9253f570
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Dec 15 11:41:42 2016 +0000
[maven-release-plugin] copy for tag org.apache.sling.jcr.repoinit-1.1.2
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.repoinit-1.1.2@1774420 13f79535-47bb-0310-9956-ffa450edef68
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 04/08: Make name consistent
with module name
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit e68a508eea5513f9aa38e62bf4340c98b4383701
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Nov 25 09:22:18 2016 +0000
Make name consistent with module name
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1771260 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 70307b1..190c0c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
<artifactId>org.apache.sling.jcr.repoinit</artifactId>
<packaging>bundle</packaging>
<version>1.1.1-SNAPSHOT</version>
- <name>Apache Sling RepoInit JCR module</name>
+ <name>Apache Sling JCR RepoInit module</name>
<description>
Initializes a JCR repository based on the output
of the RepoInit Language parser.
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 05/08: SLING-6219 - warn if
creating users with cleartext passwords
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit c29c1f8e36c74d25748fb6e3bc50b701402279f2
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Nov 25 09:32:10 2016 +0000
SLING-6219 - warn if creating users with cleartext passwords
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1771262 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/jcr/repoinit/impl/UserVisitor.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/jcr/repoinit/impl/UserVisitor.java b/src/main/java/org/apache/sling/jcr/repoinit/impl/UserVisitor.java
index 28ad210..5612c0a 100644
--- a/src/main/java/org/apache/sling/jcr/repoinit/impl/UserVisitor.java
+++ b/src/main/java/org/apache/sling/jcr/repoinit/impl/UserVisitor.java
@@ -68,8 +68,16 @@ class UserVisitor extends DoNothingVisitor {
final String id = u.getUsername();
try {
if(!UserUtil.serviceExists(session, id)) {
- log.info("Creating user {}", id);
- UserUtil.createUser(session, id, u.getPassword());
+ final String pwd = u.getPassword();
+ if(pwd != null) {
+ // TODO we might revise this warning once we're able
+ // to create users by providing their encoded password
+ // using u.getPasswordEncoding - for now I think only cleartext works
+ log.warn("Creating user {} with cleartext password - should NOT be used on production systems", id);
+ } else {
+ log.info("Creating user {}", id);
+ }
+ UserUtil.createUser(session, id, pwd);
} else {
log.info("User {} already exists, no changes made", id);
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-jcr-repoinit] 03/08: Use released repoinit
parser 1.1.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.repoinit-1.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 91804c1cee74c1a4ac1a6ae3263a037fe40b31a7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sat Nov 12 14:42:02 2016 +0000
Use released repoinit parser 1.1.0
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/repoinit@1769382 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 2af22bc..70307b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,7 +147,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.repoinit.parser</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.