GET /api/auth_source_ldaps
Vypsat všechny zdroje LDAP ověřování

GET /api/locations/:location_id/auth_source_ldaps
List LDAP authentication sources per location

GET /api/organizations/:organization_id/auth_source_ldaps
List LDAP authentication sources per organization

Examples

GET /api/auth_source_ldaps
403
{
  "error": {
    "message": "Access denied",
    "details": "Missing one of the required permissions: view_authenticators"
  }
}

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

search
Optional

výsledky filtru

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

Číslo stránky, začíná od jedničky

Validations:

  • Must be a number.

per_page
Optional

Number of results per page to return

Validations:

  • Must be a number.

Search fields

Název kolonky Typ Možné hodnoty
location string
location_id integer
name string
organization string
organization_id integer

GET /api/auth_source_ldaps/:id
Zobrazit zdroj LDAP ověřování

Examples

GET /api/auth_source_ldaps/980190962-ldap-server
200
{
  "host": "ldap",
  "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-09-11 14:53:14 UTC",
  "updated_at": "2019-09-11 14:53:14 UTC",
  "id": 980190962,
  "type": "AuthSourceLdap",
  "name": "ldap-server",
  "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 an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/auth_source_ldaps
Vytvořit LDAP zdroj ověřování

Examples

POST /api/auth_source_ldaps
{
  "auth_source_ldap": {
    "name": "ldap2",
    "host": "ldap2",
    "server_type": "posix"
  }
}
201
{
  "host": "ldap2",
  "port": 389,
  "account": null,
  "base_dn": null,
  "ldap_filter": null,
  "attr_login": null,
  "attr_firstname": null,
  "attr_lastname": null,
  "attr_mail": null,
  "attr_photo": null,
  "onthefly_register": false,
  "usergroup_sync": true,
  "tls": false,
  "server_type": "posix",
  "groups_base": null,
  "use_netgroups": false,
  "created_at": "2019-09-11 14:55:05 UTC",
  "updated_at": "2019-09-11 14:55:05 UTC",
  "id": 980190963,
  "type": "AuthSourceLdap",
  "name": "ldap2",
  "external_usergroups": [],
  "locations": [],
  "organizations": []
}

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

auth_source_ldap
Required

Validations:

  • Must be a Hash

auth_source_ldap[name]
Required

Validations:

  • Must be a String

auth_source_ldap[host]
Required

Validations:

  • Must be a String

auth_source_ldap[port]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

defaults to 389

Validations:

  • Must be a number.

auth_source_ldap[account]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

auth_source_ldap[base_dn]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

auth_source_ldap[account_password]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_login]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_firstname]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_lastname]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_mail]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_photo]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

auth_source_ldap[onthefly_register]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

auth_source_ldap[usergroup_sync]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

sync external user groups on login

Validations:

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

auth_source_ldap[tls]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

auth_source_ldap[groups_base]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

groups base DN

Validations:

  • Must be a String

auth_source_ldap[use_netgroups]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

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 , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

typ LDAP serveru

Validations:

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

auth_source_ldap[ldap_filter]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

LDAP filter

Validations:

  • Must be a String

auth_source_ldap[location_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

REPLACE locations with given ids

Validations:

  • Must be an array of any type

auth_source_ldap[organization_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/auth_source_ldaps/:id
Update an LDAP authentication source

Examples

PUT /api/auth_source_ldaps/980190962-ldap-server
{
  "organization_names": [
    "Organization 1"
  ],
  "location_ids": [
    255093256
  ],
  "auth_source_ldap": {
    "organization_names": [
      "Organization 1"
    ],
    "location_ids": [
      255093256
    ]
  }
}
200
{
  "host": "ldap",
  "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-09-11 14:55:05 UTC",
  "updated_at": "2019-09-11 14:55:05 UTC",
  "id": 980190962,
  "type": "AuthSourceLdap",
  "name": "ldap-server",
  "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 , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

defaults to 389

Validations:

  • Must be a number.

auth_source_ldap[account]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

auth_source_ldap[base_dn]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

auth_source_ldap[account_password]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_login]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_firstname]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_lastname]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_mail]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

required if onthefly_register is true

Validations:

  • Must be a String

auth_source_ldap[attr_photo]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

auth_source_ldap[onthefly_register]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

auth_source_ldap[usergroup_sync]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

sync external user groups on login

Validations:

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

auth_source_ldap[tls]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

auth_source_ldap[groups_base]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

groups base DN

Validations:

  • Must be a String

auth_source_ldap[use_netgroups]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

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 , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

typ LDAP serveru

Validations:

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

auth_source_ldap[ldap_filter]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

LDAP filter

Validations:

  • Must be a String

auth_source_ldap[location_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

REPLACE locations with given ids

Validations:

  • Must be an array of any type

auth_source_ldap[organization_ids]
Optional , <span class="translation_missing" title="translation missing: cs-CZ.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/auth_source_ldaps/:id/test
Vyzkoušet LDAP propojení

Examples

PUT /api/auth_source_ldaps/980190962-ldap-server/test
{
  "auth_source_ldap": {}
}
500
{
  "error": {
    "message": "wrong number of arguments (given 0, expected 1+)"
  }
}

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


DELETE /api/auth_source_ldaps/:id
Smazat zdroj LDAP ověřování

Examples

DELETE /api/auth_source_ldaps/980190962
{
  "auth_source_ldap": {}
}
200
{
  "id": 980190962,
  "name": "ldap-server",
  "host": "ldap",
  "port": 123,
  "account": null,
  "account_password": null,
  "base_dn": "dn=x,dn=y",
  "attr_login": "uid",
  "attr_firstname": "givenName",
  "attr_lastname": "sn",
  "attr_mail": "mail",
  "onthefly_register": true,
  "tls": true,
  "created_at": "2019-09-11T14:55:05.079Z",
  "updated_at": "2019-09-11T14:55:05.079Z",
  "ldap_filter": null,
  "attr_photo": null,
  "server_type": "posix",
  "groups_base": null,
  "usergroup_sync": true,
  "use_netgroups": false
}

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