【问题标题】:Pentaho more authentication providersPentaho 更多身份验证提供程序
【发布时间】:2016-05-05 11:17:30
【问题描述】:

我需要开发两个能够处理 2 个主要用例的自定义身份验证提供程序:

  • 通过用户名密码表单认证登录

  • 通过令牌进行身份验证

我已经开发了我的 CustomFormAuthProvider 和 CustomTokenAuthProvider。

在 Pentaho appContext-spring-security.xml 中,我已经用

声明了两个提供程序 bean
providername=custom 

因此我已将相应的属性(在 security.properties 中)设置为“自定义”。

当我启动 pentaho 时,我可以看到 AccessManager 对象只加载了两个提供者中的一个......所以当我使用两种身份验证方法之一时它会捕获一个错误。

有没有办法在提供者列表中加载两个提供者,访问管理器可以加载支持当前令牌类型的正确的提供者的方式?

谢谢

【问题讨论】:

    标签: authentication pentaho provider


    【解决方案1】:

    这可能是答案 https://help.pentaho.com/Documentation/5.4/0P0/150/010/080

    编辑

    applicationcontext-spring-security.xml
    

    可以在 ProviderManager 提供者列表中添加更多提供者,如下面的代码

     <bean id="authenticationManager"class="org.springframework.security.providers.ProviderManager">
    <property name="providers">
        <list>
            <pen:bean class="org.springframework.security.providers.AuthenticationProvider">
                    <pen:attributes>
                        <pen:attr key="providerName" value="jackrabbit"/> 
                    </pen:attributes></pen:bean>
            <pen:bean class="org.springframework.security.providers.AuthenticationProvider">     
                     <pen:attributes> 
                        <pen:attr key="providerName" value="webservice"/>
                      </pen:attributes>
            </pen:bean>
            <ref local="anonymousAuthenticationProvider" />
        </list>
        </property> 
    </bean>
    

    我会试试的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-25
      • 1970-01-01
      • 2021-02-28
      • 2015-08-24
      • 2023-03-15
      • 2012-02-18
      • 2020-08-21
      • 2020-09-28
      相关资源
      最近更新 更多