I created ldap resource on centos ldap server:
curl -X POST -H "Content-Type: application/xml" \ http://10.194.22.123:8080/v1/organizations/opdk/environments/test/ldapresources \ -u x_admin@xx.com:password \ -d ' <LdapResource name="ldap1"> <Connection> <Hosts> <Host>10.194.22.99</Host> </Hosts> <SSLEnabled>false</SSLEnabled> <Version>3</Version> <Authentication>simple</Authentication> <ConnectionProvider>unboundid</ConnectionProvider> <ServerSetType>round robin</ServerSetType> </Connection> <ConnectPool enabled="true"> <Timeout>30000</Timeout> <Maxsize>50</Maxsize> <Prefsize>30</Prefsize> <Initsize></Initsize> <Protocol></Protocol> </ConnectPool> <Admin> <DN>cn=ldap-apigeeAdmin,ou=users,o=ude-api-catalog,dc=exc,dc=xx,dc=com</DN> <Password>password</Password> </Admin> </LdapResource>'
Here is my ldap policy:
<Ldap name="LDAP-Validation"> <DisplayName>LDAP-Validation</DisplayName> <LdapResource name="ldap1" /> <Authentication> <UserName ref="request.header.username"/> <Password ref="request.header.password"/> <Scope>subtree</Scope> <BaseDN>ou=users,o=ude-api-catalog,dc=exc,dc=xx,dc=com</BaseDN> </Authentication> <Search> <BaseDN>ou=users,o=ude-api-catalog,dc=exc,dc=xx,dc=com</BaseDN> <SearchQuery>mail={request.header.mail}</SearchQuery> <Attributes> <Attribute>myAttribute</Attribute> </Attributes> <Scope>subtree</Scope> </Search> </Ldap>
While deploying the proxy to the test environment, I get a message "Error Deploying Revision 1 to test.Invalid external ldap reference."
I checked the Audit logs and get the following message:
Update revision 12 of API proxy Python-Web-Service_rev6_2020_10_12 a few seconds ago admin admin 200 Operation UPDATE Time Oct 13, 2020 6:44 PM Request URI /v1/organizations/opdk/apis/Python-Web-Service_rev6_2020_10_12/revisions/1?validate=true User admin admin Response Code 200 Request Body''opdk''
Please help me deploying this proxy to test environment. I have been struggling with this issue for couple of days. Your help fixing this issue will be highly appreciated. Thanks,
can you please frame the codes properly? its difficult to find the code.
during ldap resource creation you missed port.
<Host port="636">foo.com</Host>
Please update the resource you created as below and it will work for you.
<Host port="636">10.194.22.99</Host>
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |