Skip to main content
Version: 9 - Germknödel

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

  • server_ca

    The CA certificate of the server. To be used for self-signed certificates.

    Type: anyOf

  • client_cert

    A client certificate used to authenticate the SSL transport.

    Type: anyOf

  • client_key

    The key of the client certificate used to authenticate the SSL transport.

    Type: anyOf

  • check_hostname

    If set, the hostname of the server is checked against the server_ca certificate.

    Type: boolean

    Default: True

Output Schema

  • result

    Data

  • response

    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')