【发布时间】:2014-05-12 18:00:14
【问题描述】:
是否有任何将 LDAP 策略用于内部 Apigee LDAP 或外部自定义 LDAP 的示例。每当我尝试时,Apigee 都会告诉我“外部 ldap 引用 {name} 无效”,即使我尝试访问内部 LDAP。
谢谢
【问题讨论】:
-
您能发布您的 LDAP 策略吗?
-
就是这样,我不知道该指定什么,通过文档link不清楚。
标签: apigee
是否有任何将 LDAP 策略用于内部 Apigee LDAP 或外部自定义 LDAP 的示例。每当我尝试时,Apigee 都会告诉我“外部 ldap 引用 {name} 无效”,即使我尝试访问内部 LDAP。
谢谢
【问题讨论】:
标签: apigee
听起来您需要创建 LDAP 资源。尝试使用以下内容:
<LdapResource name="ldap1">
<Connection>
<Hosts> <!-- port is optional: defaults to 389 or 639 based of ssl -->
<Host port="389">fl-console</Host>
</Hosts>
<SSLEnabled>false</SSLEnabled> <!-- optional, defaults to false -->
<Version>3</Version> <!-- optional, defaults to 3-->
<Authentication>simple</Authentication> <!-- optional, only simple supported now -->
<ConnectionProvider>jndi</ConnectionProvider>
</Connection>
<ConnectPool enabled="true"> <!-- enables is optional, degaults to true -->
<Timeout>30000</Timeout> <!-- optional, if not given, there is no timeout -->
<Maxsize>50</Maxsize> <!-- optional, if not given there is no max connections -->
<Prefsize>30</Prefsize> <!-- optional. if not given there is no pref size -->
<Initsize></Initsize> <!-- optional, if not given it defaults to 1 -->
<Protocol></Protocol> <!-- optional, defaults to 'ssl plain' -->
</ConnectPool>
<Admin>
<DN>cn=admin,dc=apigee,dc=com</DN>
<Password>secret</Password>
</Admin>
</LdapResource>
然后通过 MS API 发布:。当然,您需要替换下面的 ${variables}:
curl --basic -u "admin:secret" -X POST -H "Content-Type: application/xml" -d "${ldap_resource}" "http://${mg_host}/v1/organizations/${org}/environments/test/ldapresources"
【讨论】: