Projet

Général

Profil

Development #5530

Faciliter la migration des fédérations

Ajouté par Benjamin Dauvergne il y a plus de 9 ans. Mis à jour il y a plus de 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
17 septembre 2014
Echéance:
13 mars 2015
% réalisé:

100%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Depuis le commit 21dfe1306 les identity dump sont de nouveaux générés à partir des champs name_id_qualifier et name_id_sp_name_qualifier de l'objet LibertyFederation ce qui fait que la migration de fédérations n'est pas évidente.

L'idée serait de stocker dans ses deux champs des sentinelles, par exemple la valeur http://authentic.entrouvert.org/same_id/, pour dire que la valeur à y mettre et la même que l'entity ID de l'IdP ou du SP.

Il faut pour cela une migration pour corriger les fédérations un peu partout et modifier le code de création de l'identity dump et le code de sauvegarde des fédérations.


Fichiers

Révisions associées

Révision 8d8edc9c (diff)
Ajouté par Benjamin Dauvergne il y a environ 9 ans

Modify federation storage so that we can store federation relative to the provider model (fixes #5530)

If the content of name_id_qualifier or name_id_sp_name_qualifier is
equals to the issuer or service provider entity ID then we store a
sentinel value instead, meaning 'same as provider entity ID'. If we
change the provider entity, all federations are still correct.

Historique

#1

Mis à jour par Benjamin Dauvergne il y a plus de 9 ans

  • Fichier 0001-Modify-federation-storage-so-that-we-can-store-feder.patch ajouté
  • Patch proposed changé de Non à Oui
#2

Mis à jour par Benjamin Dauvergne il y a plus de 9 ans

  • Statut changé de Nouveau à En cours
#3

Mis à jour par Frédéric Péters il y a plus de 9 ans

Detail, could AUTHENTIC_SAME_ID_SENTINEL be urn:authentic:same-as-provider-entity-id, rather than an URL ? (I think it makes the usage clearer)

And would it be possible to use that AUTHENTIC_SAME_ID_SENTINEL constant in 0040_plug_sentinel_value_in_libertyfederation_qualifiers.py?

The migration calls raw_input(), I fear this won't fly with packages :/ there's no way to get the entity id from the database?

#4

Mis à jour par Benjamin Dauvergne il y a plus de 9 ans

Frédéric Péters a écrit :

Detail, could AUTHENTIC_SAME_ID_SENTINEL be urn:authentic:same-as-provider-entity-id, rather than an URL ? (I think it makes the usage clearer)

Ok. I'm not fan of using URNs as to do it really formally we should obtain the namespace from IANA but that's just pedantery.

And would it be possible to use that AUTHENTIC_SAME_ID_SENTINEL constant in 0040_plug_sentinel_value_in_libertyfederation_qualifiers.py?

Of course.

The migration calls raw_input(), I fear this won't fly with packages :/

It will block automatic updates, but it should work if the update is attended. What do you think ?

there's no way to get the entity id from the database?

Not with 100% certainty; we do not use django.contrib.sites and it does not have the schema only the domain, it could be extracted from LibertyFederation if there are some but it does not make the update safe.

#5

Mis à jour par Benjamin Dauvergne il y a plus de 9 ans

Updated patch. Sentinel changed to urn:authentic.entrouvert.org:same-as-provider-entity-id and SAME_ID constant re-used in migration.

#6

Mis à jour par Frédéric Péters il y a plus de 9 ans

It will block automatic updates, but it should work if the update is attended. What do you think ?

I still don't like it :/ Here's kind of a proposal: look for the value in the environment (let's say AUTHENTIC_IDP_ENTITY_ID_MIGRATION), and fallback on raw_input() if it's missing (or even abort) if it's missing (and there are existing LibertyFederation and LibertyProvider objects); and add this info in the "How to upgrade to a new version of authentic" section of the README file, along as the recommended way to get the value from a running instance (is it looking in the saml metadata, or is there a better way?).

#7

Mis à jour par Benjamin Dauvergne il y a plus de 9 ans

Frédéric Péters a écrit :

(is it looking in the saml metadata, or is there a better way?).

The URL is generated from each HTTP request, there is really no automatic way to get it from a script :/ You can deduct it from the virtual host configuration.

It will block automatic updates, but it should work if the update is attended. What do you think ?

I still don't like it :/ Here's kind of a proposal: look for the value in the environment (let's say AUTHENTIC_IDP_ENTITY_ID_MIGRATION), and fallback on raw_input() if it's missing (or even abort) if it's missing (and there are existing LibertyFederation and LibertyProvider objects); and add this info in the "How to upgrade to a new version of authentic" section of the README file, along as the recommended way to get the value from a running instance

Ok.

#8

Mis à jour par Frédéric Péters il y a plus de 9 ans

Benjamin Dauvergne a écrit :

Frédéric Péters a écrit :

(is it looking in the saml metadata, or is there a better way?).

The URL is generated from each HTTP request, there is really no automatic way to get it from a script :/ You can deduct it from the virtual host configuration.

That's what I meant, so the instruction to get the value would be along the lines of "go to your site /idp/saml2/metadata, and take the entityId attribute", ok.

#9

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Version cible mis à future
#10

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Patch proposed changé de Oui à Non
#11

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Echéance mis à 13 mars 2015
  • Patch proposed changé de Non à Oui
#12

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Patch proposed changé de Oui à Non
#13

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Fichier 0001-Modify-federation-storage-so-that-we-can-store-feder.patch supprimé
#14

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

This new version contains a Django 1.7 migration, it does not ask anymore for the current IdP entity ID; we just logically imply that if name_id_qualifier is not empty then it must contain the current IdP entity id; if it's empty then it should stay so.

Federations as a service provider are completely ignored as authsaml2 is deprecated and new SAML 2.0 support as a service provider will be remade with django-mellon and will not use current SAML framework.

#15

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Version cible changé de future à 2.1.13
#16

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Version cible changé de 2.1.13 à 2.2.0
#17

Mis à jour par Benjamin Dauvergne il y a environ 9 ans

  • Statut changé de En cours à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#18

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#19

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF