Development #29386
ordre des backends d'utilisateurs (db, ldap)
100%
Description
Sur un site configuré avec un LDAP qui timeout, l'authentification des utilisateurs stockés dans la db échoue aussi.
Fichiers
Révisions associées
ldap: set default timeout to 5 seconds (fixes #29386)
Also change behaviour to set the network and default timeout, see
ldap.conf(5) :
NETWORK_TIMEOUT <integer>
Specifies the timeout (in seconds) after which the poll(2)/select(2)
following a connect(2) returns in case of no activity.
TIMEOUT <integer>
Specifies a timeout (in seconds) after which calls to synchronous
LDAP APIs will abort if no response is received. Also used for any
ldap_result(3) calls where a NULL timeout parameter is supplied.
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 5 ans
C'est parce que le timeout dépasse le timeout de nginx ou tu vois une exception qui empêche d'enchaîner sur le backend db ?
Si c'est le premier la solution la plus immédiate c'est de définir un timeout par défaut plus faible (disons 5 secondes), si c'est la deuxième il faut corriger le backend LDAP pour ne pas crasher dans ce cas (mais je n'ai pas souvenir de ce genre de traces).
Mis à jour par Frédéric Péters il y a plus de 5 ans
C'est parce que le timeout dépasse le timeout de nginx ou tu vois une exception qui empêche d'enchaîner sur le backend db ?
De mémoire c'était coupure nginx, avant d'avoir pu éventuellement rencontrer un timeout.
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Fichier 0002-ldap-set-default-timeout-to-5-seconds-fixes-29386.patch 0002-ldap-set-default-timeout-to-5-seconds-fixes-29386.patch ajouté
- Fichier 0001-settings-move-LDAP-authentication-backend-after-mode.patch 0001-settings-move-LDAP-authentication-backend-after-mode.patch ajouté
- Patch proposed changé de Non à Oui
Le premier bouge le backend LDAP après les autres.
Le deuxième augmente le timeout à 5 secondes et le définit pour la connection
initiale et chaque appel synchrone.
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Tracker changé de Support à Development
- Statut changé de Nouveau à Solution proposée
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Fichier 0002-ldap-set-default-timeout-to-5-seconds-fixes-29386.patch 0002-ldap-set-default-timeout-to-5-seconds-fixes-29386.patch ajouté
- Fichier 0001-settings-move-LDAP-authentication-backend-after-mode.patch 0001-settings-move-LDAP-authentication-backend-after-mode.patch ajouté
DummyModelBackend ne doit pas passer avant LDAPBackendPasswordLost, sinon la
récupération de mot de passe pour les comptes LDAP ne marche pas.
Mis à jour par Serghei Mihai il y a environ 5 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 3988b6fb379cf3459a014116d5bcb09ceb5d3afa Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Tue Mar 12 12:33:23 2019 +0100 ldap: set default timeout to 5 seconds (fixes #29386) Also change behaviour to set the network *and* default timeout, see ldap.conf(5) : NETWORK_TIMEOUT <integer> Specifies the timeout (in seconds) after which the poll(2)/select(2) following a connect(2) returns in case of no activity. TIMEOUT <integer> Specifies a timeout (in seconds) after which calls to synchronous LDAP APIs will abort if no response is received. Also used for any ldap_result(3) calls where a NULL timeout parameter is supplied. commit a31a99b13f2f6da72bffabd4143b67614d262d6c Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Tue Mar 12 12:30:38 2019 +0100 settings: move LDAP authentication backend after model (#29386)
Mis à jour par Benjamin Dauvergne il y a environ 5 ans
- % réalisé changé de 0 à 100
Appliqué par commit authentic2|3988b6fb379cf3459a014116d5bcb09ceb5d3afa.
Mis à jour par Frédéric Péters il y a environ 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
settings: move LDAP authentication backend after model (#29386)