GET /api/auth_source_ldaps
Afficher toutes les sources d'authentification LDAP

GET /api/locations/:location_id/auth_source_ldaps
Afficher toutes les sources d'authentification LDAP par emplacement

GET /api/organizations/:organization_id/auth_source_ldaps
Afficher toutes les sources d'authentification LDAP par organisation

Exemples

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

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

search
optionel

filtrer les résultats

Validations:

  • Must be a String

order
optionel

Champ et sens de tri, ex: ‘id DESC’

Validations:

  • Must be a String

page
optionel

Numéro de la page, commençant par 1

Validations:

  • Must be a number.

per_page
optionel

Nombre de résultats par page à renvoyer

Validations:

  • Must be a number.

Rechercher les champs

Nom du champ Type Valeurs possibles
location string
location_id integer
name string
organization string
organization_id integer

GET /api/auth_source_ldaps/:id
Afficher une source d'authentification LDAP

Exemples

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
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

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
Créer une source d'authentification LDAP

Exemples

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": []
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

auth_source_ldap
requis

Validations:

  • Must be a Hash

auth_source_ldap[name]
requis

Validations:

  • Must be a String

auth_source_ldap[host]
requis

Validations:

  • Must be a String

auth_source_ldap[port]
optionel , nil autorisé

par défaut à 389

Validations:

  • Must be a number.

auth_source_ldap[account]
optionel , nil autorisé

Validations:

  • Must be a String

auth_source_ldap[base_dn]
optionel , nil autorisé

Validations:

  • Must be a String

auth_source_ldap[account_password]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_login]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_firstname]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_lastname]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_mail]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_photo]
optionel , nil autorisé

Validations:

  • Must be a String

auth_source_ldap[onthefly_register]
optionel , nil autorisé

Validations:

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

auth_source_ldap[usergroup_sync]
optionel , nil autorisé

Synchroniser les groupes externes à la connexion

Validations:

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

auth_source_ldap[tls]
optionel , nil autorisé

Validations:

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

auth_source_ldap[groups_base]
optionel , nil autorisé

base DN des Groupes

Validations:

  • Must be a String

auth_source_ldap[use_netgroups]
optionel , nil autorisé

utiliser les netgroups NIS au lieu des groupes posix, uniquement lorsque server_type a la valeur posix ou free_ipa

Validations:

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

auth_source_ldap[server_type]
optionel , nil autorisé

Type de serveur LDAP

Validations:

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

auth_source_ldap[ldap_filter]
optionel , nil autorisé

Filtre LDAP

Validations:

  • Must be a String

auth_source_ldap[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

auth_source_ldap[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


PUT /api/auth_source_ldaps/:id
Mise à jour d'une source d'authentification LDAP

Exemples

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
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

Validations:

  • Must be a String

auth_source_ldap
requis

Validations:

  • Must be a Hash

auth_source_ldap[name]
optionel

Validations:

  • Must be a String

auth_source_ldap[host]
optionel

Validations:

  • Must be a String

auth_source_ldap[port]
optionel , nil autorisé

par défaut à 389

Validations:

  • Must be a number.

auth_source_ldap[account]
optionel , nil autorisé

Validations:

  • Must be a String

auth_source_ldap[base_dn]
optionel , nil autorisé

Validations:

  • Must be a String

auth_source_ldap[account_password]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_login]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_firstname]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_lastname]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_mail]
optionel , nil autorisé

requis si onthefly_register est vrai

Validations:

  • Must be a String

auth_source_ldap[attr_photo]
optionel , nil autorisé

Validations:

  • Must be a String

auth_source_ldap[onthefly_register]
optionel , nil autorisé

Validations:

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

auth_source_ldap[usergroup_sync]
optionel , nil autorisé

Synchroniser les groupes externes à la connexion

Validations:

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

auth_source_ldap[tls]
optionel , nil autorisé

Validations:

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

auth_source_ldap[groups_base]
optionel , nil autorisé

base DN des Groupes

Validations:

  • Must be a String

auth_source_ldap[use_netgroups]
optionel , nil autorisé

utiliser les netgroups NIS au lieu des groupes posix, uniquement lorsque server_type a la valeur posix ou free_ipa

Validations:

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

auth_source_ldap[server_type]
optionel , nil autorisé

Type de serveur LDAP

Validations:

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

auth_source_ldap[ldap_filter]
optionel , nil autorisé

Filtre LDAP

Validations:

  • Must be a String

auth_source_ldap[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

auth_source_ldap[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


PUT /api/auth_source_ldaps/:id/test
Tester la connexion LDAP

Exemples

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

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

Validations:

  • Must be a String


DELETE /api/auth_source_ldaps/:id
Supprimer une source d'authentification LDAP

Exemples

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
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

Validations:

  • Must be a String