首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用SAML保护Camel CXFRS消费者

用SAML保护Camel CXFRS消费者
EN

Stack Overflow用户
提问于 2013-11-22 16:20:35
回答 1查看 825关注 0票数 2

我试图使用cxf SamlRedirectBindingFilter用SAML保护camel中定义的CXFRS消费者端点。下面是定义路由/端点的spring:

代码语言:javascript
复制
<cxf:bus>
    <cxf:features>
        <cxf:logging/>
    </cxf:features>
</cxf:bus>

<bean id="stateManager" class="org.apache.cxf.rs.security.saml.sso.state.EHCacheSPStateManager">
    <constructor-arg ref="cxf"/>
</bean>

<bean id="redirectGetFilter" class="org.apache.cxf.rs.security.saml.sso.SamlRedirectBindingFilter">
    <property name="idpServiceAddress" value="http://carnold-linux.ptcnet.ptc.com:9093/idp/profile/SAML2/Redirect/SSO"/>
    <property name="assertionConsumerServiceAddress" value="/racs/sso"/>
    <property name="stateProvider" ref="stateManager"/>
    <property name="addWebAppContext" value="false"/>
</bean>

<camelContext id="camel" trace="false" xmlns="http://camel.apache.org/schema/spring">
    <route id="proxyRoute">
        <from uri="cxfrs://http://0.0.0.0:9092/app?resourceClasses=com.company.FooResource,com.company.BarResource&amp;providers=#redirectGetFilter"/>
    ...rest of route

我遇到的问题是,即使我将SamlRedirectFilter添加到端点的提供程序中,它也没有重定向/身份验证。对这个问题有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-11-25 09:48:57

当前的camel版本不支持配置uri提供的内容。

可以使用cxf:rsServer配置提供程序,如下所示

代码语言:javascript
复制
<cxf:rsServer id="rsServer" address="http://0.0.0.0:9092/app"
    >
    <cxf:providers>
       <ref bean="redirectGetFilter"/>
    </cxf:providers>
    <cxf:serviceBeans>
       <ref bean="fooResource"/>
       <ref bean="barResource"/>
    </cxf:serviceBeans>
 </cxf:rsServer>

<bean id="fooResource" class="com.company.FooResource"/>
<bean id="barResource" class="com.company.BarResource"/>

<camelContext id="camel" trace="false" xmlns="http://camel.apache.org/schema/spring">
    <route id="proxyRoute">
        <from uri="cxfrs://bean:rsServer"/>
    ...rest of route
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20149590

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档