Examples

PUT /api/auth_source_ldaps/980190962-ldap-server
{
  "auth_source_ldap": {
    "name": "ldap2",
    "host": "ldap2",
    "server_type": "posix"
  }
}
200
{
  "host": "ldap2",
  "port": 123,
  "account": null,
  "base_dn": "dn=x,dn=y",
  "ldap_filter": null,
  "attr_login": "uid",
  "attr_firstname": "givenName",
  "attr_lastname": "sn",
  "attr_mail": "mail",
  "attr_photo": null,
  "onthefly_register": true,
  "usergroup_sync": true,
  "tls": true,
  "server_type": "posix",
  "groups_base": null,
  "use_netgroups": false,
  "created_at": "2019-02-20 13:35:01 UTC",
  "updated_at": "2019-02-20 13:35:05 UTC",
  "id": 980190962,
  "type": "AuthSourceLdap",
  "name": "ldap2",
  "external_usergroups": [],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

auth_source_ldap
required

Validations:

  • Must be a Hash

auth_source_ldap[name]
optional

Validations:

  • Must be a String

auth_source_ldap[host]
optional

Validations:

  • Must be a String

auth_source_ldap[port]
optional , nil allowed

defaults to 389

Validations:

  • Must be a number.

auth_source_ldap[account]
optional , nil allowed

Validations:

  • Must be a String

auth_source_ldap[base_dn]
optional , nil allowed

Validations:

  • Must be a String

auth_source_ldap[account_password]
optional , nil allowed

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_login]
optional , nil allowed

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_firstname]
optional , nil allowed

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_lastname]
optional , nil allowed

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_mail]
optional , nil allowed

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_photo]
optional , nil allowed

Validations:

  • Must be a String

auth_source_ldap[onthefly_register]
optional , nil allowed

Validations:

  • Must be one of: true, false, 1, 0.

auth_source_ldap[usergroup_sync]
optional , nil allowed

sync external user groups on login

Validations:

  • Must be one of: true, false, 1, 0.

auth_source_ldap[tls]
optional , nil allowed

Validations:

  • Must be one of: true, false, 1, 0.

auth_source_ldap[groups_base]
optional , nil allowed

groups base DN

Validations:

  • Must be a String

auth_source_ldap[use_netgroups]
optional , nil allowed

use NIS netgroups instead of posix groups, applicable only when server_type is posix or free_ipa

Validations:

  • Must be one of: true, false, 1, 0.

auth_source_ldap[server_type]
optional , nil allowed

type of the LDAP server

Validations:

  • Must be one of: free_ipa, active_directory, posix.

auth_source_ldap[ldap_filter]
optional , nil allowed

LDAP filter

Validations:

  • Must be a String

auth_source_ldap[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

auth_source_ldap[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type