`

作为一个BI开发人员,我要发布报表,元数据,OLAP的模型到BI服务器

 
阅读更多

原创文章,转载请注明出处:http://qq85609655.iteye.com/blog/2224647

 

在pentaho5上实现了CAS单点登录

参考http://jnwzping.iteye.com/blog/2092849

配置后,单点登录实现了,但是无法再publish了。这个郁闷。

pentaho在国内用的人不少,但是深入研究的人不多。无奈,自己再次搭建环境看源码。

解决办法如下:

pentaho使用Spring Security实现的权限

找到发布的过滤链

/webservices/**=securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,basicProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS

 

这里授权的是basicProcessingFilter

再找到basicProcessingFilter的配置:

	<!-- Automatically receives AuthenticationEvent messages -->
	<bean id="loggerListener"
		class="org.springframework.security.event.authentication.LoggerListener" />
	<bean id="basicProcessingFilter"
		class="org.pentaho.platform.web.http.security.PentahoBasicProcessingFilter">
		<property name="authenticationManager">
			<ref local="authenticationManager" />
		</property>
		<property name="authenticationEntryPoint">
			<ref local="basicProcessingFilterEntryPoint" />
		</property>
	</bean>

 修改,添加默认的AuthenticationProvider

	<bean id="basicAuthenticationManager" class="org.springframework.security.providers.ProviderManager"
		autowire="default" dependency-check="default" lazy-init="default">
		<property name="providers">
			<list>
				<!-- <ref bean="daoAuthenticationProvider" /> -->
				<pen:bean
					class="org.springframework.security.providers.AuthenticationProvider" />
				<ref bean="anonymousAuthenticationProvider" />
			</list>
		</property>
	</bean>

	<!-- Automatically receives AuthenticationEvent messages -->
	<bean id="loggerListener"
		class="org.springframework.security.event.authentication.LoggerListener" />
	<bean id="basicProcessingFilter"
		class="org.pentaho.platform.web.http.security.PentahoBasicProcessingFilter">
		<property name="authenticationManager">
			<ref local="basicAuthenticationManager" />
		</property>
		<property name="authenticationEntryPoint">
			<ref local="basicProcessingFilterEntryPoint" />
		</property>
	</bean>
	

 这样,就实现了CAS的同时,兼容发布报表,元数据,OLAP的模型。

 

 

附件有整合cas的依赖包和配置文件

修改:

  <!-- pentaho-spring-beans.xml文件里面替换权限 -->
  <import resource="applicationContext-spring-security-cas.xml" />
  <!-- <import resource="applicationContext-spring-security.xml" /> -->

 

分享到:
评论
1 楼 hunter123456 2016-08-10  
你好!pentaho5上 cas 单点登录,
除了 修改applicationContext-spring-security.xml
还需要修改哪些啊,我的还是不能实现单点登录!

相关推荐

Global site tag (gtag.js) - Google Analytics