Bug #6378
SAML attribute with the same value should be collapsed
100%
Description
Actually if two attributes rules provide the same value for the same attribute, it's encoded two times in the assertion but only one occurence should be kept.
Ex.: extract uid from the Django username attribute or the LDAP uid attribute, if they are the same, keep only one.
Fichiers
Révisions associées
idp/saml: collapse attribute values (fixes #6378)
Coninuation of commit 6ceeff9.
Previous patch was too simple, this one remove any lasso specialization
in the SAMLAttribute model. The method to_lasso_attribute was renamed
to_tuples, it now returns tuples maed of the name, the name format, a
friendly name or None and a value. Lasso specific are now completely in
the add_attributes() function of the saml2_endpoints module.
Tuples are aggregated arround their lasso.Attribute target in a
dictionnary indexed by name and name_format. The dictionnary is
initialized using attributes already present in the assertion, for retro
compatibility with attribute aggregator until its removal. Only values
having an unique MiscTextNode with textChild equals to true are
considered.
Historique
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Assigné à mis à Benjamin Dauvergne
- Priorité changé de Normal à Haut
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Fichier 0001-idp-saml-collapse-attribute-values.patch 0001-idp-saml-collapse-attribute-values.patch ajouté
- Patch proposed changé de Non à Oui
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
Commit log:
commit 6ccb53530f6a9033bcb1dc7ae48e68b4f9698407 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Tue Mar 31 09:28:45 2015 +0200 idp/saml: collapse attribute values If two AttributeValue for the same value, name and name format would be created, we skip its creation. It allows to configure attributes for django_user_username and LDAP uid at the same without getting two times the same value, as LDAP users also expose the Django user attributes.
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit 6ceeff92b4a26a4d69df7b311e312829eb6ad719.
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Statut changé de Résolu (à déployer) à Nouveau
Patch is buggy as value can be multivalued.
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
Appliqué par commit bb1788a1160299df8926c7c236641a5924090d35.
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Statut changé de Solution déployée à Résolu (à déployer)
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Solution déployée à Fermé
idp/saml: collapse attribute values (fixes #6378)
If two AttributeValue for the same value, name and name format would be
created, we skip its creation. It allows to configure attributes for
django_user_username and LDAP uid at the same without getting two times
the same value, as LDAP users also expose the Django user attributes.