简体   繁体   English

Java EE WebLogic和带SSO的Spring

[英]Java EE WebLogic and Spring with SSO

I'm trying to get SSO working in my Spring app deployed on WebLogic 11. I'm using Waffle implementation for this. 我正在尝试使用部署在WebLogic 11上的Spring应用程序中运行SSO。我正在使用Waffle实现。

I set: 我设置:
entry-point-ref="negotiateSecurityFilterEntryPoint"
and
<custom-filter ref="waffleNegotiateSecurityFilter" position="BASIC_AUTH_FILTER" />

I've also added 我还补充道

<beans:bean id="waffleWindowsAuthProvider" class="waffle.windows.auth.impl.WindowsAuthProviderImpl" />

<beans:bean id="negotiateSecurityFilterProvider" class="waffle.servlet.spi.NegotiateSecurityFilterProvider">
    <beans:constructor-arg ref="waffleWindowsAuthProvider" />
</beans:bean>

<beans:bean id="basicSecurityFilterProvider" class="waffle.servlet.spi.BasicSecurityFilterProvider">
    <beans:constructor-arg ref="waffleWindowsAuthProvider" />
</beans:bean>

<beans:bean id="waffleSecurityFilterProviderCollection" class="waffle.servlet.spi.SecurityFilterProviderCollection">
    <beans:constructor-arg>
        <beans:list>
            <beans:ref bean="negotiateSecurityFilterProvider" />
            <beans:ref bean="basicSecurityFilterProvider" />
        </beans:list>
    </beans:constructor-arg>
</beans:bean>

<beans:bean id="negotiateSecurityFilterEntryPoint" class="waffle.spring.NegotiateSecurityFilterEntryPoint">
    <beans:property name="Provider" ref="waffleSecurityFilterProviderCollection" />
</beans:bean>

<beans:bean id="waffleNegotiateSecurityFilter" class="com.myapp.security.CustomNegotiateSecurityFilter">
    <beans:property name="Provider" ref="waffleSecurityFilterProviderCollection" />
</beans:bean>

My CustomNegotiateSecurityFilter is just a copy of standard Waffle class so it has no impact. 我的CustomNegotiateSecurityFilter只是标准Waffle类的副本,因此它没有任何影响。

This configuration works fine when I use IP address to access app, but when hostname is used (with domain) I can't get SSO to work - 401 Unauthorised response. 当我使用IP地址访问应用程序时,此配置正常工作,但是当使用主机名(使用域)时,我无法使SSO工作 - 401未经授权的响应。

Maybe somebody can advise the reason of such behaviour. 也许有人可以告知这种行为的原因。

Since using the IP works, but using the name doesn't, this is most likely a problem with the SPN. 由于使用IP工作,但使用名称不起作用,这很可能是SPN的问题。 You will need to use setspn to fix it. 您将需要使用setspn来修复它。 Start with the standard troubleshooting: https://github.com/dblock/waffle/blob/master/Docs/Troubleshooting.md 从标准故障排除开始: https//github.com/dblock/waffle/blob/master/Docs/Troubleshooting.md

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM