dn missing in attributes ?
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- php
- Domaine
- authentication
Piste de recherche
Commencez par modules/ldap/src/Auth/Process/AttributeAddUsersGroups.php à la ligne 229, puis comparez la configuration ldap:AttributeAddFromLDAP précédente avec les paramètres de AttributeAddUsersGroups dans le rapport. Reproduisez l’avertissement à l’aide des deux appels authproc et examinez les attributs transmis entre eux. C’est terminé lorsque la recherche de groupes basée sur le DN ne déclenche plus l’avertissement de clé manquante et renvoie les groupes attendus.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
I've got a simple authproc that calls ldap:AttributeAddUsersGroups to get the user's group information. Our LDAP is OpenLDAP that has groups with both groupOfNames and posixGroup objectclasses. So we have both uniqueMember and memberuid attributes our groups.
If I call that authproc like this - it works, the uid is used and matches the memberUid attribute:
50 => [
'class' => 'ldap:AttributeAddUsersGroups',
'authsource' => 'ldap',
'ldap.product' => 'OpenLDAP',
'search.base' => [
'ou=Groups,dc=mycompany,dc=com',
],
'attribute.dn' => 'dn',
'attribute.return' => 'cn',
'attribute.groups' => 'groups',
'attribute.username' => 'uid',
'attribute.memberOf' => 'memberuid',
'timeout' => 30,
],
However if I call it like this:
50 => [
'class' => 'ldap:AttributeAddUsersGroups',
'authsource' => 'ldap',
'ldap.product' => 'OpenLDAP',
'search.base' => [
'ou=Groups,dc=mycompany,dc=com',
],
'attribute.dn' => 'dn',
'attribute.return' => 'cn',
'attribute.groups' => 'groups',
'attribute.username' => 'dn',
'attribute.memberOf' => 'uniquemember',
'timeout' => 30,
],
I get an error telling me 'dn' is not found in the attributes array. So, I added another authproc call to ldap:AttributeAddFromLDAP to go specifically grab 'dn' for the user. To my knowledge 'dn' is always returned by LDAP searches, but I figured let's try this:
40 => [
'class' => 'ldap:AttributeAddFromLDAP',
'authsource' => 'ldap',
'attributes' => ['dn'],
'attribute.policy' => 'add',
'search.filter' => '(cn=%cn%)',
],
Which itself works without error, but I still get the following on the very next call to 'ldap:AttributeAddUsersGroups' :
SimpleSAML\Error\Exception: Warning - Undefined array key "dn" at /usr/local/install/simplesamlphp/modules/ldap/src/Auth/Process/AttributeAddUsersGroups.php:229
I can't find where or if 'dn' is somehow being filtered out but the attribute is definitely being returned by a search.
We'd like to switch to using the DN where we can but this has been a roadblock I can't figure out.
- Langage dominant
- PHP
- Étoiles
- 5
- Forks
- 14
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de simplesamlphp/simplesamlphp-module-ldap
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
simplesamlphp/simplesamlphp-module-ldap#66 · 11 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
simplesamlphp/simplesamlphp-module-ldap#3 · 3 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
simplesamlphp/simplesamlphp-module-ldap#2 · 1 commentaire ·
Toutes les issues de simplesamlphp/simplesamlphp-module-ldap
Issues similaires
-
priority: p3
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Automattic/static-site-importer#1767 ·