Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring LDAP';不良凭证';(绑定失败)_Spring_Spring Security_Jasperserver - Fatal编程技术网

Spring LDAP';不良凭证';(绑定失败)

Spring LDAP';不良凭证';(绑定失败),spring,spring-security,jasperserver,Spring,Spring Security,Jasperserver,我正在使用Spring Security(jasper reports server,使用Spring Security)连接到Microsoft广告。但是我的日志中有一个“错误的凭据”,但我知道凭据没有问题,在我的同一台机器上,我可以使用JXplorer连接到我的广告,并且可以使用另一个程序使用此帐户登录。日志显示它正在连接,但失败: Authentication attempt using com.jaspersoft.jasperserver.api.security.externalAu

我正在使用Spring Security(jasper reports server,使用Spring Security)连接到Microsoft广告。但是我的日志中有一个“错误的凭据”,但我知道凭据没有问题,在我的同一台机器上,我可以使用JXplorer连接到我的广告,并且可以使用另一个程序使用此帐户登录。日志显示它正在连接,但失败:

Authentication attempt using com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSLdapAuthenticationProvider
Processing authentication request for user: pharmacy
Searching for user 'pharmacy', with user search [ searchFilter: '(sAMAccountName={0})', searchBase: 'OU=Users', scope: subtree, searchTimeLimit: 0, derefLinkFlag: false ]
Got Ldap context on server 'ldap://10.17.188.4:389/dc=harris,dc=local'
Searching for entry under DN 'dc=harris,dc=local', base = 'ou=Users', filter = '(sAMAccountName={0})'
Found DN: cn=pharmacy,ou=Users
Attempting to bind as cn=pharmacy,ou=Users,dc=harris,dc=local
Removing pooling flag for user cn=pharmacy,ou=Users,dc=harris,dc=local
Failed to bind as cn=pharmacy,ou=Users: org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903AA, comment: AcceptSecurityContext error, data 532, v1772
Bad credentials
在我的广告中,用户如下所示:

<bean id="ldapAuthenticationProvider" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSLdapAuthenticationProvider">
    <constructor-arg>
        <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSBindAuthenticator">
            <constructor-arg>
                <ref local="ldapContextSource"/>
            </constructor-arg>
            <property name="userSearch">
                <ref local="userSearch" />
            </property>
        </bean>
    </constructor-arg>
</bean>


<bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">
    <constructor-arg value="ldap://10.17.188.4:389/DC=harris,DC=local"/>
    <property name="userDn" value="CN=ldadmin,OU=Users,DC=harris,DC=local"/>
    <property name="password" value="xxxxx"/>
    <property name="referral" value="follow" />
</bean>


<bean id="userSearch"
      class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSFilterBasedLdapUserSearch">
    <constructor-arg index="0">
        <value>OU=Users</value>
    </constructor-arg>
    <constructor-arg index="1">
        <value>(sAMAccountName={0})</value>
    </constructor-arg>
    <constructor-arg index="2">
        <ref local="ldapContextSource" />
    </constructor-arg>
    <property name="searchSubtree">
        <value>true</value>
    </property>
</bean>
可分辨名称:CN=药房,OU=用户,DC=哈里斯,DC=本地

我的配置如下:

<bean id="ldapAuthenticationProvider" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSLdapAuthenticationProvider">
    <constructor-arg>
        <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSBindAuthenticator">
            <constructor-arg>
                <ref local="ldapContextSource"/>
            </constructor-arg>
            <property name="userSearch">
                <ref local="userSearch" />
            </property>
        </bean>
    </constructor-arg>
</bean>


<bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">
    <constructor-arg value="ldap://10.17.188.4:389/DC=harris,DC=local"/>
    <property name="userDn" value="CN=ldadmin,OU=Users,DC=harris,DC=local"/>
    <property name="password" value="xxxxx"/>
    <property name="referral" value="follow" />
</bean>


<bean id="userSearch"
      class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSFilterBasedLdapUserSearch">
    <constructor-arg index="0">
        <value>OU=Users</value>
    </constructor-arg>
    <constructor-arg index="1">
        <value>(sAMAccountName={0})</value>
    </constructor-arg>
    <constructor-arg index="2">
        <ref local="ldapContextSource" />
    </constructor-arg>
    <property name="searchSubtree">
        <value>true</value>
    </property>
</bean>

OU=用户
(sAMAccountName={0})
真的
我在互联网上看到很多不同的配置排列,很难知道应该遵循哪一种。对于具有身份验证提供程序的组,我确实有一个DefaultLdapAuthoritiesPopulator构造函数,但这也不起作用


有人能帮忙吗?非常感谢。

这似乎是一个VPN问题。以上是好的:)


离开,以防有人需要让微软广告与Jasper/Spring合作。

这似乎是一个VPN问题。以上是好的:)

离开,以防有人需要让微软广告与Jasper/Spring合作