No Results
Update LDAP Connection

EdgeCore version: 4.3.5

Method

PATCH /public/ldap/{ldapName}

Used to update an existing LDAP connection.

Parameters

Name Type Description Mandatory
ldapName
string Name of the shared configuration Yes
adapterConfig[]
array of strings key,value pair

Note: If you want to update credentials, use the following format:
credentials,user:pass (see example below)

Yes

adapterConfig[] example

Retrieve the LDAP connection and then update the desired pair(s). For example, this is the specific LDAP connection we retrieved by calling GET /public/ldap/{ldapName}:

{
    "doClass": "AccountAdapterConfigDO",
    "id": "8crmsb-19b62q96hib8",
    "properties": {
        "doClass": "PropertyBundleDO",
        "propertyValues": [
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "groupAttribute",
                "propertyTypeName": "String",
                "boundToParameter": false,
                "value": null,
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "port",
                "propertyTypeName": "Integer",
                "boundToParameter": false,
                "value": 389,
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "useGroup",
                "propertyTypeName": "Boolean",
                "boundToParameter": false,
                "value": true,
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "credentials",
                "propertyTypeName": "Credentials",
                "boundToParameter": false,
                "value": "{\"doClass\":\"CredentialSetDO\",\"isParameter\":false,\"credentials\":[{\"doClass\":\"CredentialPairDO\",\"key\":\"Username\",\"value\":{\"doClass\":\"SpStringValueDO\",\"isParameter\":false,\"primitiveValue\":\"CN=Administrator,CN=Users,DC=aws,DC=edgeti,DC=com\"},\"hidden\":false,\"required\":false},{\"doClass\":\"CredentialPairDO\",\"key\":\"Password\",\"value\":{\"doClass\":\"SpEncryptedStringValueDO\",\"isParameter\":false,\"plainValue\":\"UNUSED\",\"encryptedValue\":\"#default!63lABR0SLsjoekWFOAn7L8tBRXiCK3OWkg0/k3TqkeZc3Ew4I5FW0Ih9smeBSDw1\"},\"hidden\":true,\"required\":false}]}",
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "groupSearchFilter",
                "propertyTypeName": "String",
                "boundToParameter": false,
                "value": null,
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "name",
                "propertyTypeName": "String",
                "boundToParameter": false,
                "value": "newLDAP",
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "host",
                "propertyTypeName": "String",
                "boundToParameter": false,
                "value": "dev-ad.edge.internal",
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "type",
                "propertyTypeName": "String",
                "boundToParameter": false,
                "value": "Active Directory",
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "useSsl",
                "propertyTypeName": "Boolean",
                "boundToParameter": false,
                "value": false,
                "metaJson": null
            },
            {
                "doClass": "PropertyValueDO",
                "propertyDefName": "groupSearchString",
                "propertyTypeName": "String",
                "boundToParameter": false,
                "value": "DC=aws,DC=edgeti,DC=com",
                "metaJson": null
            }
        ]
    },
    "configTypeName": "LDAP-shared-Active Directory"
}

We want to update groupSearchFilter and groupAttribute (their values are null as you see in the example above).

We want the groupAttribute value to be “cn”, and the groupSearchFilter value to be “(&(objectCategory=group)(member=*))” , so adapterConfig[] will look like this:

groupAttribute,cn
groupSearchFilter,(&(objectCategory=group)(member=*))

cURL example

curl --location --request PATCH 'http://localhost:8080/public/ldap/newLDAP' \
--header 'edgeApiKey: YWRtaW5AZGVmYXVsdHx3IDNHe2tMZTYhMkZkO3J3cipDaSZUdio5' \
--form 'adapterConfig[]=groupAttribute,cn' \
--form 'adapterConfig[]=groupSearchFilter,(&(objectCategory=group)(member=*))'

Example Response

{
  "doClass": "AccountAdapterConfigDO",
  "id": "8crmsb-19b62q96hib8",
  "properties": {
    "doClass": "PropertyBundleDO",
    "propertyValues": [
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "groupAttribute",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "cn",       - updated value
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "credentials",
        "propertyTypeName": "Credentials",
        "boundToParameter": false,
        "value": "{\"doClass\":\"CredentialSetDO\",\"isParameter\":false,\"credentials\":[{\"doClass\":\"CredentialPairDO\",\"key\":\"Username\",\"value\":{\"doClass\":\"SpStringValueDO\",\"isParameter\":false,\"primitiveValue\":\"CN=Administrator,CN=Users,DC=aws,DC=edgeti,DC=com\"},\"hidden\":false,\"required\":false},{\"doClass\":\"CredentialPairDO\",\"key\":\"Password\",\"value\":{\"doClass\":\"SpEncryptedStringValueDO\",\"isParameter\":false,\"plainValue\":\"UNUSED\",\"encryptedValue\":\"#default!ZeEhc/3vhC1cSL1tLT28dkh+Xh+qvudZSI/OXEdoWXt5/1pl3G84JNoVm5ZGl0Ug\"},\"hidden\":true,\"required\":false}]}",
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "failoverPort",
        "propertyTypeName": "Integer",
        "boundToParameter": false,
        "value": 389,
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "followReferrals",
        "propertyTypeName": "Boolean",
        "boundToParameter": false,
        "value": false,
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "type",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "Active Directory",
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "adapterType",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "LDAP",
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "useSsl",
        "propertyTypeName": "Boolean",
        "boundToParameter": false,
        "value": false,
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "groupSearchString",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": null,
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "userGroupMembershipAttribute",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "memberOf",
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "useGroup",
        "propertyTypeName": "Boolean",
        "boundToParameter": false,
        "value": false,
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "port",
        "propertyTypeName": "Integer",
        "boundToParameter": false,
        "value": 389,
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "groupSearchFilter",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "(&(objectCategory=group)(member=*))",   - updated value
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "name",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "newLDAP",
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "host",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "dev-ad.edge.internal",
        "metaJson": null
      },
      {
        "doClass": "PropertyValueDO",
        "propertyDefName": "groupUserMembershipAttribute",
        "propertyTypeName": "String",
        "boundToParameter": false,
        "value": "member",
        "metaJson": null
      }
    ]
  },
  "configTypeName": "LDAP-shared-Active Directory"
}

Updating Credentials cURL example

curl --location --request PATCH 'http://localhost:8080/public/ldap/newLDAP' \ 
--header 'edgeApiKey: YWRtaW5AZGVmYXVsdHx3IDNHe2tMZTYhMkZkO3J3cipDaSZUdio5' \
--form 'adapterConfig[]=credentials,CN=Administrator,CN=Users,DC=aws,DC=edgeti,DC=com:newPassword'

HTTP Response

Code Status Description
201 Created The request has succeeded and a new resource has been created as a result.
404 Not Found The LDAP configuration could not be found.

Terms | Privacy