Index: connector/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- connector/pom.xml	(revision 45536)
+++ connector/pom.xml	(revision )
@@ -69,6 +69,10 @@
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-spi-commons</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.onehippo.cms7</groupId>
+      <artifactId>hippo-cms7-commons</artifactId>
+    </dependency>
 
   </dependencies>
 
Index: connector/src/main/java/org/hippoecm/repository/PasswordHelper.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- connector/src/main/java/org/hippoecm/repository/PasswordHelper.java	(revision 45536)
+++ connector/src/main/java/org/hippoecm/repository/PasswordHelper.java	(revision )
@@ -15,13 +15,10 @@
  */
 package org.hippoecm.repository;
 
-import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
-import java.io.Writer;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.security.SecureRandom;
@@ -34,12 +31,12 @@
  * Password helper utility class for generating and checking password hashes.
  * </p>
  * <p>
- * For the client side the method {@link #getHash(String)} can be used to
+ * For the client side the method {@link #getHash(char[])} can be used to
  * generate a valid password hash for storing in the password field of a
  * user in the repository.
  * </p>
  * <p>
- * For the server side the method {@link #checkHash(String,String)} can be
+ * For the server side the method {@link #checkHash(char[],String)} can be
  * used to verify the (user supplied) password against the hash stored in
  * the repository.
  * </p>
@@ -172,7 +169,6 @@
      * <li>$alogrithm$salt$digest</li>
      * </ul>
      * @param plainText usually the password
-     * @param salt
      * @return
      * @throws NoSuchAlgorithmException
      * @throws IOException
@@ -189,7 +185,7 @@
 
     /**
      * Helper function to build the hash sting in the correct format
-     * @param alogrithm
+     * @param algorithm
      * @param plainText
      * @param salt
      * @return String
Index: pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pom.xml	(revision 45536)
+++ pom.xml	(revision )
@@ -71,7 +71,7 @@
     <!-- use root project name for all project modules NOTICE files, should be the same as in the root NOTICE file -->
     <notice.project.name>Hippo Repository</notice.project.name>
 
-    <hippo.commons.version>1.04.00</hippo.commons.version>
+    <hippo.commons.version>1.04.01-SNAPSHOT</hippo.commons.version>
     <hippo.services.version>1.04.00</hippo.services.version>
     <hippo.services.eventbus.version>1.04.00</hippo.services.eventbus.version>
     <hippo.utilities.version>1.03.00</hippo.utilities.version>
Index: engine/src/main/java/org/hippoecm/repository/security/user/RepositoryUserManager.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- engine/src/main/java/org/hippoecm/repository/security/user/RepositoryUserManager.java	(revision 45536)
+++ engine/src/main/java/org/hippoecm/repository/security/user/RepositoryUserManager.java	(revision )
@@ -17,7 +17,9 @@
 
 import java.io.UnsupportedEncodingException;
 import java.security.NoSuchAlgorithmException;
+import java.util.Arrays;
 
+import javax.jcr.Credentials;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.SimpleCredentials;
@@ -27,18 +29,27 @@
 import org.hippoecm.repository.PasswordHelper;
 import org.hippoecm.repository.api.HippoNodeType;
 import org.hippoecm.repository.security.ManagerContext;
+import org.hippoecm.repository.util.JcrUtils;
+import org.onehippo.cms7.security.JvmJcrUsers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
+import static org.onehippo.cms7.security.JvmJcrUsers.JVM_EMBEDDED_PASSKEY;
+
 /**
  * UserManager backend that stores the users inside the JCR repository
  */
 public class RepositoryUserManager extends AbstractUserManager {
 
+    private static final Logger log = LoggerFactory.getLogger(RepositoryUserManager.class);
+
     /** SVN id placeholder */
 
     private static final String SECURITY_PATH = HippoNodeType.CONFIGURATION_PATH + "/" + HippoNodeType.SECURITY_PATH;
     
     private static final long ONEDAYMS = 1000 * 3600 * 24;
-    
+
+
     private boolean maintenanceMode = false;
     
     public void initManager(ManagerContext context) throws RepositoryException {
@@ -84,11 +95,23 @@
         try {
             char[] password = creds.getPassword();
             Node userinfo = getUser(creds.getUserID());
-            
+
+
+            String passKey = JcrUtils.getStringProperty(userinfo, HippoNodeType.HIPPO_PASSKEY, null);
             // check for pre-authenticated user
-            if (password != null && password.length > 0 && userinfo.hasProperty(HippoNodeType.HIPPO_PASSKEY) &&
-                userinfo.getProperty(HippoNodeType.HIPPO_PASSKEY).getString().equals(new String(password))) {
+            if (password != null && password.length > 0 && password.toString().equals(passKey)) {
                 return true;
+            }
+
+            if (JVM_EMBEDDED_PASSKEY.equals(passKey)) {
+                // check whether it is a known jvm jcr user and check password
+                final SimpleCredentials jvmCredentials = JvmJcrUsers.getJvmCredentials(creds.getUserID());
+                if (Arrays.equals(jvmCredentials.getPassword(), creds.getPassword())){
+                    log.info("User '{}' is a jvm authenticated user. Return logged in", creds.getUserID());
+                    return true;
+                }
+                log.info("Although user {} can be a jvm jcr user, the provided credentials do not match. Fallback " +
+                        "to plain login.", creds.getUserID());
             }
 
             if (maintenanceMode) {
