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 |
---|---|---|---|
execution_id | int | The ID of the connection execution | |
message | str | The ended message for the connection. If the connection ended with an error, the message will contain information about what went wrong | |
response | object | ||
result | object | ||
status | str | The ended status for the connection. Either "success" or "error". |
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 ()
log (message)
one_of_inputs (options)
run ()
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')