SystemServerCAMSecurityRequired error when authenticating using Cognos

a 夏天 提交于 2019-12-13 01:27:18

问题


I am using the Cognos TM1 10.1 API to connect to a server. The server uses Cognos for authentication which in turn uses integrated login to authenticate users against our instance of Active Directory. I've tried using TM1SystemServerConnect and TM1SystemServerConnectIntegratedLogin, but they both produce an error.

(note that I've used pseduo-code for simplicity - yes, I've verified all the handles, inputs, etc, are correct and accurate)

// Standard login
TM1V pLogin = TM1ValuePool( hUser );
TM1V hServerName = TM1ValString( pLogin, "server", 0 );
TM1V hUser = TM1ValString( pLogin, "userid", 0 );
TM1V hPassword = TM1ValString( pLogin, "password", 0 );
TM1SystemServerConnect( pLogin, hServerName, hUser, hPassword )
// Integrated Login
TM1V pLogin = TM1ValuePool( hUser );
TM1V hServerName = TM1ValString( pLogin, "server", 0 );
TM1V hServer = TM1SystemServerConnectIntegratedLogin( pLogin, hServerName );

The handle I get back from both (hServer) points to an error with code 199 and the message SystemServerCAMSecurityRequired. I've search through IBM's TM1 API Guide and I can't find a solution (or any documentation for this error message)... what's going on? The logs on the server show failed login attemtps, but provide no additional information.


回答1:


The error is because the two documented login functions used above are specificaly for IntegratedSecurityMode 1, 2 and 3.

You've indicated that you are using Cognos to handle user authentication, which is either mode 4 or 5. There are two more-or-less "undocumented" functions for logging in to the server using Cognos authentication:

  • TM1SystemServerConnectWithCAMNamespace

  • TM1SystemServerConnectWithCAMPassport

Here's a sample, written in C++ (copied from here) which you can use a reference for connecting using Cognos authentication:

TM1V voServerName = TM1ValStringW( hPool, (TM1_UTF16_T *)pszServerName, 0 );

TM1V voPasswd = TM1ValStringEncryptW( hPool, (TM1_UTF16_T*)pszPassword, 0 );

TM1V vArray[3];
vArray[0] = TM1ValStringW( hPool, (TM1_UTF16_T*)szCAMNamespace, 0 );        
vArray[1] = TM1ValStringW( hPool, (TM1_UTF16_T*)admin_login_name, 0 );
vArray[2] = voPasswd;

TM1V vCAMArgArr = TM1ValArray(hPool, vArray, 3);
TM1V vTmpServer =
    TM1SystemServerConnectWithCAMNamespace(hPool, voServerName, vCAMArgArr);


来源:https://stackoverflow.com/questions/21336817/systemservercamsecurityrequired-error-when-authenticating-using-cognos

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!