CZ-NIC / django-eidas-specific-node

GNU General Public License v3.0
2 stars 2 forks source link

Cache NameID format from the request to fix missing transient support in IdP #94

Closed jtalir closed 4 years ago

jtalir commented 4 years ago

Cache NameID format in the LightRequest to specific ProxyService and if transient is requested and IdP provides persistant, fill transient in the LightResponse regardless of the IdP response. NameID format is underspecified in eIDAS and has no meaning and no use. There is an initiative to keep the value unspecified only but until then transient must be supported as well.

Name ID Format Matrix

Request Response Result Note
unspecified unspecified ok -
unspecified persistent error -
unspecified transient error -
persistent unspecified error? We cannot ensure a valid persistent id.
persistent persistent ok -
persistent transient error We cannot ensure a valid persistent id.
transient unspecified error → ok We generate a random transient id instead of the persistent id.
transient persistent error → ok We generate a random transient id instead of the persistent id.
transient transient ok -

Settings

Implementation

If the fallback is disabled, nothing happens. Otherwise:

jiri-janousek commented 4 years ago

@tpazderka, could you do a design review?

tpazderka commented 4 years ago

LGTM

Just a note to generating a new transient NameID -> It should be unique (and same) for a given combination of provider/user, so a hash of some sort is probably a good option (provider ID, provided NameID, some salt?)

jtalir commented 4 years ago

Transient NameID is temporary, so it doesn't need to be "same" in this context. I'd say that one-off UUID will fullfil all the requirements. We should consider that this value is not used in eIDAS context and this is just a workaround.

jiri-janousek commented 4 years ago

@jtalir, request=unspecified & response=persistent|transient also fails. Should we fix that as well? By rewriting the type but keeping the value intact?

jiri-janousek commented 4 years ago

It should have been already fixed in the latest eIDAS Node. I'll verify it.