Hi,
I am trying to connect to BO using Trusted Authentication.
- Updated the Authentication settings on BO CMS, and then downloaded a TrustedPrincipal.conf
- Placed this file in D:\Test
- The problem is with the generated TrustedPrincipal.conf file, it seems to have a linefeed and carriage-return as part of the SharedSecret property
SharedSecret=
100
BAAAAAAaAwEAEAAA56qQ1v4CyAM4siqb2HMLFwR7Q32eR5pVSnvEGK2FVk4Qw7d/NNy6fcUfQppvBNL2e+bSVwpNxrhewpI+649k7S8erV7YaanCK/351pWLT034CidiFZ0H0llhl0F+OK0NW1XprNvQs4tiBn85F4vg842MOCJ+hhsdJyiGFfdDAv/iOXuzCq5d0Fd50l0qozIPoYCkdj7OFDsU4NG9urFrBf52QZJ9/HFER2QbWMJG5RPSKjbTvGy6BKZIGPsoKbpoxK4uWhJChbc9xtrCDrMMmOh5ABtmiQvCK+f93rnrfUsAQPjqr4CyLRhB5QeQJAn1rT6LZ5eWE3AV2mOi+pasergEn4Wtoh5ixHDbWMfRiVn1QSz51Vf7JlpXEmnXtrHtQi+MTC3V8V+Iuq8QczJmYGP2RmAqUvQiiV3y/iJ2pMcDj/RDPv3Q+BUir74L9cwECqQ1Ojm9wrElmnlnc60EDopVOWy32n5Lcx2AQI8GahGzYbWbRjKShkcUinUpCTZU/8eLAvZ+
Below is the code in the decompiled TrustedPrincipal.class :
byte[] content = new byte[avail];
fis.read(content);
String contentStr = new String(content, "UTF-8");
int carrigeReturnIndex = contentStr.indexOf("\r");
String line = null;
if (carrigeReturnIndex != -1) {
line = contentStr.substring(0, carrigeReturnIndex);
}
else {
int lineFeedIndex = contentStr.indexOf("\n");
if (lineFeedIndex != -1)
line = contentStr.substring(0, lineFeedIndex);
else {
line = contentStr;
}
}
int equalSignIndex = line.indexOf("=");
if (equalSignIndex != -1)
m_sharedSecret = line.substring(equalSignIndex + 1);
else {
m_sharedSecret = line;
}
Below is the code I am using to connect:
public static void main(String args[]){
try{
System.setProperty("bobj.trustedauth.home", "D:\\test");
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
ITrustedPrincipal trustedPrincipal = sessionMgr.createTrustedPrincipal("someid", "cmshost:port");
IEnterpriseSession enterpriseSession = sessionMgr.logon(trustedPrincipal);
System.out.println(enterpriseSession.getSerializedSession());
} catch (SDKException e) {
System.out.println(e.getDetailMessage());
}
}
Error Message:There was an error reading the shared secret from the trusted principal configuration file. (FWM 02045)
I have seen many examples online nobody seems to mention anything about the special characters in the 'SharedSecret'
Thanks,
Sid.