[英]Shibboleth idp configuration for ldap authentication
I am novice to shibboleth and I am attempting to use LDAP with Shibboleth .我是 shibboleth 的新手,我正在尝试将 LDAP 与 Shibboleth 一起使用。 i tried a lot but i could not make it happen.我尝试了很多,但我无法实现。 Can any one tell me what should be the AttributeDefinition, DataConnector and login.config for the following java code which working fine.任何人都可以告诉我以下运行良好的java代码的AttributeDefinition、DataConnector和login.config应该是什么。 please help请帮忙
Hashtable env = new Hashtable();
String ldapSearchBase = "dc=samplehro,dc=india";
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put("com.sun.jndi.ldap.read.timeout", "4000");
env.put(Context.PROVIDER_URL, "ldap://smplchn-adsvr.samplehro.india");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, username + "@samplehro.india");
env.put(Context.SECURITY_CREDENTIALS, password);
The accepted answer is a link-only answer and the link is dead, so here is one that, essentially, just copies an example from the official Shibboleth documentation.接受的答案是仅链接的答案,并且链接已失效,因此这里的答案基本上只是从Shibboleth 官方文档中复制了一个示例。 : :
# Put in attribute-resolver.xml
<DataConnector id="myLDAP" xsi:type="LDAPDirectory"
ldapURL="%{idp.attribute.resolver.LDAP.ldapURL}"
baseDN="%{idp.attribute.resolver.LDAP.baseDN}"
principal="%{idp.attribute.resolver.LDAP.bindDN}"
principalCredential="%{idp.attribute.resolver.LDAP.bindDNCredential}"
trustFile="%{idp.attribute.resolver.LDAP.trustCertificates}"
useStartTLS="%{idp.attribute.resolver.LDAP.useStartTLS:true}"
noResultIsError="%{idp.attribute.resolver.LDAP.noResultsIsError:false}"
multipleResultsIsError="%{idp.attribute.resolver.LDAP.multipleResultsIsError:true}">
<FilterTemplate>
<![CDATA[
%{idp.attribute.resolver.LDAP.searchFilter}
]]>
</FilterTemplate>
<LDAPProperty name="name1" value="%{idp.attribute.resolver.LDAP.prop1}"/>
<LDAPProperty name="name2" value="%{idp.attribute.resolver.LDAP.prop2}"/>
<StartTLSAuthenticationCredential xsi:type="security:X509Filesystem" xmlns:security="urn:mace:shibboleth:2.0:security" id="IdPtoLDAPCredential">
<security:PrivateKey>%{idp.attribute.resolver.LDAP.authenticationKey}</security:PrivateKey>
<security:Certificate>%{idp.attribute.resolver.LDAP.authenticationCertificate}</security:Certificate>
</StartTLSAuthenticationCredential>
</DataConnector>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.