Hi,
For SLING-10844 [1] I am trying to add a feature to the resource
resolver console plugin which allows the map/resolve test to optionally
run as a specific user.
The code I'm using is very simple
Map<String, Object> authenticationInfo = new HashMap<>();
authenticationInfo.put(ResourceResolverFactory.USER_IMPERSONATION,
user);
resolver = resolverFactory.getResourceResolver(authenticationInfo);
A failure is thrown from Oak, even though I'm logging in as
admin/admin:
Caused by: javax.security.auth.login.FailedLoginException:
Impersonation not allowed.
at
org.apache.jackrabbit.oak.security.user.UserAuthentication.checkSuccess
(UserAuthentication.java:186)
at
org.apache.jackrabbit.oak.security.user.UserAuthentication.authenticate
(UserAuthentication.java:126)
at
org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl.
authenticate(LoginModuleImpl.java:261)
at
org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl.
login(LoginModuleImpl.java:130)
at
org.apache.felix.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java
:52)
(I've ommitted the full stack trace).
Does anyone know whether I'm missing something from the code or if this
is a limitation of the web console? If it's a limitation, is there a
place where I can try and fix it?
Thanks,
Robert
[1]: https://issues.apache.org/jira/browse/SLING-10844