Skip to main content
Version: 8 - Apfelstrudel

ConnectorTypeLDAP

class connector_types.connector_type_ldap.ConnectorTypeLDAP

Call a LDAP service.

Input Schema

  • host

    The LDAP server to connect to.

    Type: string

  • port

    Type: anyOf

  • use_ssl

    Will use ldap:// if set to False, ldaps:// otherwise.

    Type: boolean

    Default: True

  • user

    The username used to bind to the LDAP server.

    Type: string

  • password

    The password used to bind to the LDAP server.

    Type: string

  • encoding

    The encoding of the return values of the LDAP server.

    Type: string

    Default: utf-8

  • ignore_decoding_errors

    If set, decoding errors will be ignored.

    Values which cannot be decoded into strings will be returned as bytes:base64:<base64-string>.

    Type: boolean

    Default: True

  • search

    Perform a LDAP search.

    Type: object

    Additional Properties: False

  • paged_search

    Perform a paged search until the enpoint is exhausted.

    Type: boolean

  • include_raw_results

    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>.

    Type: boolean

Output Schema

  • result

    Data

Constants

ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca']

Example

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
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')