This article covers a Bloomreach Experience Manager version 13. There's anupdated version available that covers our most recent release.
JVM Enabled User
Within one and the same JVM, we support to be able to login a JCR Session programmatically without requiring a password if and only if the user to login contains:
hipposys:passkey = jvm://
By default for example theHST users are configured to be JVM enabled.
Use Case
When you want to retrieve a JCR Session from a webapp other than where Hippo Repository runs in, and you don't want to configure and maintain a password in that webapp (or outside the webapp) per cluster node where the webapp runs, you can choose for a JVM enabled user. Also between DTAP environments, you don't have to worry about setting different passwords per environment.
Howto
Configuration
For a user as explained inUsers, addhipposys:passkey = jvm://. For example
/hippo:configuration: /hippo:users: /myWebappUser: jcr:primaryType: hipposys:user hipposys:active: true hipposys:passkey: jvm://
note that if you want to be able to login withmyWebappUser into the repository servlet, you still need to configurehipposys:password. If you don't have hipposys:password configured, myWebappUser can only be used as JVM enabled user and not to login with in for example the repository servlet.
Code
final HippoRepository repository = HippoRepositoryFactory.getHippoRepository("vm://");JvmCredentials credentials = JvmCredentials.getCredentials("myWebappUser");session = repository.login(credentials);