APM Cookbook: Modify LDAP Attribute Values using iRulesLX
on TMOS 13.1, I followed this example exactly, but I get an error right away when it's trying to parse the URL to create the LDAP client (note: this is an error constructing the objects (parsing the URL), not connecting to the server!)
Here are the errors that get logged (I removed the timestamp and other extraneous data from these log messages):
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] Creating LDAP Client.
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] /var/sdm/plugin_store/plugins/:Common:ldap_modify_plugin_118679_3/extensions/ldap_modify_extension/node_modules/ldapjs/lib/url.js:15
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] throw new TypeError(urlStr + ' is an invalid LDAP url (scope)')
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] TypeError: ldaps://10.1.30.101:636 is an invalid LDAP url (scope)
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] at Object.parse (/var/sdm/plugin_store/plugins/:Common:ldap_modify_plugin_118679_3/extensions/ldap_modify_extension/node_modules/ldapjs/lib/url.js:15:13)
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] at new Client (/var/sdm/plugin_store/plugins/:Common:ldap_modify_plugin_118679_3/extensions/ldap_modify_extension/node_modules/ldapjs/lib/client/client.js:114:33)
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] at Object.createClient (/var/sdm/plugin_store/plugins/:Common:ldap_modify_plugin_118679_3/extensions/ldap_modify_extension/node_modules/ldapjs/lib/client/index.js:17:12)
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] at Object.ldap_modify (/var/sdm/plugin_store/plugins/:Common:ldap_modify_plugin_118679_3/extensions/ldap_modify_extension/index.js:55:28)
plugin[/Common/ldap_modify_plugin.ldap_modify_extension] at ILXServerWrap.ilxServerMessageCallback [as onmessage] (/var/sdm/plugin_store/plugins/:Common:ldap_modify_plugin_118679_3/extensions/ldap_modify_extension/node_modules/f5-nodejs/lib/ilx_server.js:150:44)
Note: I looked at line 15 of url.js and here are the lines leading up to that and including line 15:
try {
parsedURL = new url.URL(urlStr)
} catch (error) {
throw new TypeError(urlStr + ' is an invalid LDAP url (scope)')
}
Note that although the error message says "(scope)", I do not believe the error lies with the scope since the example didn't even contain a scope. I think (scope) is a typo by the developer.
Anyone have any ideas?