Hello all,
I am developing a Pentaho plugin in Java that connects to Mondrian via Olap4J like this:
If I test the connection with the password not being encrypted, it works well.
But at this point of my application and as far as I know, I don't have access to the original password, I only have access to the encrypted version of the password with the following code:
Is there any way to specify to the DriverManager the encryption algorithm to use, like MD5, RSA,...?
Or can I get the password of the current user logged to Pentaho from PentahoSession?
Thank you.
I am developing a Pentaho plugin in Java that connects to Mondrian via Olap4J like this:
Code:
Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
Connection cnx = DriverManager.getConnection("jdbc:xmla:" + "Server=http://yourserver.com/applicationContext/xmla", "username", "password")
But at this point of my application and as far as I know, I don't have access to the original password, I only have access to the encrypted version of the password with the following code:
Code:
IPentahoSession pentahoSession = (IPentahoSession) PentahoSessionHolder.getSession();
UsernamePasswordAuthenticationToken token = (UsernamePasswordAuthenticationToken) pentahoSession.getAttribute("SECURITY_PRINCIPAL");
UserDetails user = (UserDetails) token.getPrincipal();
Or can I get the password of the current user logged to Pentaho from PentahoSession?
Thank you.