是否有任何将LDAP策略用于内部Apigee LDAP或外部自定义LDAP的示例。每当我尝试时,Apigee告诉我"无效的外部ldap参考{name}",即使我试图访问内部LDAP。
由于
答案 0 :(得分:0)
听起来您需要创建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"