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

本文介绍如何在Pentaho 5中实现CAS单点登录,并解决由此导致的报表、元数据及OLAP模型发布问题。通过调整PentahoBasicProcessingFilter配置,兼容CAS单点登录与发布功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原创文章,转载请注明出处: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" /> -->

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值