Pentaho Authentication Method in Silver light Application.

后端 未结 2 900
故里飘歌
故里飘歌 2021-01-21 10:51

I want to integrate Pentaho with Silverlight platform.For the Authentication, there is log in page for user console. I do not want use above login page to login, I want to login

相关标签:
2条回答
  • 2021-01-21 11:28

    Authenticate with query string method is unsecured one, so I found a solution with Basic Authentication method.

    WebClient webClient = new System.Net.WebClient();
    Uri uri = new Uri("http://serverDomain:8080/pentaho/Home");
    //Give user name and password here
    var plainTextBytes = System.Text.Encoding.UTF8.GetBytes("username:password");
    var encodedString = System.Convert.ToBase64String(plainTextBytes);
    webClient.Headers["Authorization"] = "Basic " + encodedString;
    webClient.Encoding = Encoding.UTF8;
    App.WindowManager.ConsoleWrite(uri.ToString());
    webClient.UploadStringAsync(uri, "POST", "");
    
    0 讨论(0)
  • 2021-01-21 11:29

    In previous version we could pass userid=admin&password=password as part of URL while calling prpt, xaction or Analyzer.

    In 5.0 we can authenticate via URL only to Home page.

    Try the following to enable it.


    i) Stop your Bi server.
    ii) Open applicationContext-spring-security.xml and look for filterChainProxy bean.
    iii) Comment the existing value section in the bean and add the new value section provided below.

     <value>
            <![CDATA[CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
            PATTERN_TYPE_APACHE_ANT
            /api/repos/dashboards/print=securityContextHolderAwareRequestFilter,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,preAuthenticatedSecurityFilter,httpSessionReuseDetectionFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
            /webservices/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS
            /api/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,requestParameterProcessingFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS
            /plugin/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,requestParameterProcessingFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS
            /**=securityContextHolderAwareRequestFilter,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,httpSessionReuseDetectionFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor]]>
          </value>
    

    iv) Restart your server, you should be able to call a report or xaction with user credientials in the url.
    v) Use this test URL http://localhost:8080/pentaho/api/repos/:public:Steel%20Wheels:Buyer%20Report%20%28sparkline%20report%29.prpt/viewer?userid=admin&password=password

    0 讨论(0)
提交回复
热议问题