【问题标题】:Using Spring security filters in a OSGI bundle在 OSGI 包中使用 Spring 安全过滤器
【发布时间】:2014-01-15 00:16:39
【问题描述】:

我需要使用 Spring Security 保护 Web 服务(基于 CXF)。

我已经在 Tomcat 上运行了 Web 服务,但是在 Fuse ESB 上的部署无法运行。 我们有一个 Spring 配置文件,其中包含以下内容:

....
<sec:http authentication-manager-ref="authenticationManager"
    use-expressions="true">
    <sec:http-basic />
    <sec:intercept-url pattern="/**" access="isAuthenticated()" />
</sec:http>
...

当我们在 Tomcat 上部署 web 服务时,我们使用以下 web.xml:

...
<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
...

当我们在 Fuse 上部署 bundle 时,由于我们没有 web.xml,web 服务不安全,即 spring 安全过滤器不起作用。 我的问题是:

我们如何在 Fuse ESB 中声明 Spring 安全过滤器?即相当于 web.xml 中的几行

问候,

杰里米

【问题讨论】:

    标签: java web-services spring-security osgi fuseesb


    【解决方案1】:

    Cxf/Fuse ESB 服务将拥有自己的基于标准的安全实施。您可以在他们的项目/产品文档中了解更多信息。如果您正在寻找 osgi 平台上的 spring 应用程序,那么请探索 Spring DM(动态模块)。

    【讨论】:

      猜你喜欢
      • 2015-04-01
      • 2016-05-07
      • 2014-02-02
      • 1970-01-01
      • 2020-12-05
      • 2023-02-04
      • 2015-05-24
      • 1970-01-01
      • 2015-09-06
      相关资源
      最近更新 更多