I've been using the opencmis Api to connect a Liferay portal to an Alfresco Repository
The usual way is
Set the session parameters, providing user's login credentials
parameter.put(SessionParameter.USER, "user_name"); parameter.put(SessionParameter.PASSWORD, "user_unencrypted_password");
Get a Session with these parameters
SessionFactory factory = SessionFactoryImpl.newInstance(); Session session = factory.getRepositories(parameter).get(0).createSession();
Now, my problem is that I'm using LDAP authentication, and I cannot know the user's unencrypted password in the session client ( a quite common security requirement). So while my user's password is synchronized between the 2 Systems (web Portal and Alfresco), I'm still not able to create a session.
So is there an alternative way to create a session for a specific user, without knowing the user's unencrypted pass ? For Example, if I connect as an Alfresco Admin, could I impersonate another user?
Edit: I guess there are some workarounds around this, like using alternate APIs (webScript, REST API and custom functions in Alfresco), but I'd prefer a solution that's preferably more straightforward and clean, and if possible, does not use multiple API's