icCube - How to do Authentication for icCube using an Apache web server

佐手、 提交于 2019-12-02 07:06:41

You Web App (i.e. Apache) will have to forward calls related to accessing the reports in icCube. You can for example configure Apache to forward everything related to icCube as following:

<VirtualHost *:80>
ServerName your.domain.com

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass        /icCube http://your-ip:8383/icCube
ProxyPassReverse /icCube http://your-ip:8383/icCube

</VirtualHost>

Then the communication between Apache and icCube is secured using Servlet Filters that are part of icCube configuration (icCube.xml):

IcCubeApacheAuthenticationServletFilter
IcCubeApacheGwtAuthenticationServletFilter

The first filter can be used for all services but GWT; for GWT you can use the second one. Here is an extract of a possible icCube.xml:

<xmlaComponentConfiguration>
    <!--<tcpPortNumber>8484</tcpPortNumber>-->
    <httpUrl>/icCube/xmla</httpUrl>
    <enableHttpCompression>true</enableHttpCompression>
    <filter>XMLA (Apache) Authentication</filter>
</xmlaComponentConfiguration>

<gwtServiceComponentConfiguration>
    <enableFileDownloadCompression>true</enableFileDownloadCompression>
    <filter>GWT (Apache) Authentication</filter>
</gwtServiceComponentConfiguration>

<reportingComponentConfiguration>
    <url>/icCube/doc/*</url>
    <enableCompression>true</enableCompression>
    <filter>Report Authentication</filter>
</reportingComponentConfiguration>

<gviComponentConfiguration>
    <url>/icCube/gvi</url>
    <enableCompression>true</enableCompression>
    <filter>GVI Authentication</filter>
    <filter>GVI Authentication (logout)</filter>
</gviComponentConfiguration>

<filterConfiguration>
    <filter>
        <filter-name>XMLA (Apache) Authentication</filter-name>
        <filter-class>crazydev.iccube.server.authentication.IcCubeApacheAuthenticationServletFilter</filter-class>
    </filter>
    <filter>
        <filter-name>GWT (Apache) Authentication</filter-name>
        <filter-class>crazydev.iccube.server.authentication.IcCubeApacheGwtAuthenticationServletFilter</filter-class>
    </filter>
    <filter>
        <filter-name>Report Authentication</filter-name>
        <filter-class>crazydev.iccube.server.authentication.IcCubeApacheAuthenticationServletFilter</filter-class>
    </filter>
    <filter>
        <filter-name>GVI Authentication</filter-name>
        <filter-class>crazydev.iccube.server.authentication.IcCubeApacheAuthenticationServletFilter</filter-class>
        <init-param>
            <param-name>anonymousLogon</param-name>
            <param-value>false</param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>GVI Authentication (logout)</filter-name>
        <filter-class>crazydev.iccube.server.authentication.IcCubeGviLogoutAuthenticationServletFilter</filter-class>
    </filter>
</filterConfiguration>

Hope that helps.

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