ConnectorTypeLDAP
class connector_types.connector_type_ldap.ConnectorTypeLDAP
Call a LDAP service.
Inputs
Name | Type | Default | Description |
---|---|---|---|
encoding | str | utf-8 | The encoding of the return values of the LDAP server |
host | str | The LDAP server to connect to | |
ignore_decoding_errors | bool | True | If set, decoding errors will be ignored. Values which cannot be decoded into strings will be returned as bytes:base64:[base64-string] . |
include_raw_results | bool | False | If set, raw results will also be returned. Raw fields are not transformed into a human-readable format and returned as-is. Fields which are affected include timestamps, UUIDs, and SIDs. Binary data will be returned as bytes:base64:[base64-string] . |
paged_search | bool | False | Perform a paged search until the enpoint is exhausted |
password | str | The password used to bind to the LDAP server | |
port | int | None | The port number to use. If unset port 389 for ldap:// and port 636 for ldaps:// will be used |
search | dict | Perform a LDAP search. Pass a dictionary containing the parameters of the search. e.g. {'search_base': 'o=test', 'search_filter': '(objectclass=*)', 'attributes': '*'} | |
use_ssl | bool | True | Will use ldap:// if set to False , ldaps:// otherwise |
user | str | The username used to bind to the LDAP server |
Outputs
Name | Type | Default | Description |
---|---|---|---|
response | object | ||
result | object |
Constants
input_list = ['encoding', 'host', 'ignore_decoding_errors', 'include_raw_results', 'paged_search', 'password', 'port', 'search', 'use_ssl', 'user'] output_list = ['response', 'result'] ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca'] version = 1Methods
execute
details
log
details
one_of_inputs
details
run
details
Example
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution):
this.connect(
connector_type='LDAP',
host='my-ldap-server',
user='cn=user,dc=example,dc=com',
password='my-secret-password',
search={
'search_base': 'dc=example,dc=com',
'search_filter': '(objectclass=*)',
'attributes': '*',
},
)
return this.success('all done')