IdentityPython / SATOSA

Proxy translating between different authentication protocols (SAML2, OpenID Connect and OAuth2)
https://idpy.org
Apache License 2.0
201 stars 123 forks source link

Can internal response attributes have emptyvalues? #151

Open jkakavas opened 7 years ago

jkakavas commented 7 years ago

Hi,

I've come across a setup/configuration where we have internal_response attributes which value is an empty list. Something like :

{'edupersonorcid': [],
 'eppn': ['ikakavas@myscope.gr'],
 'surname': ['Kakavas']}

The attributes get their value from the ldap_attribute_store microservice (in this example edupersonorcid has no values in LDAP ) and the frontend that breaks because of this is the openid_connect plugin, specifically https://github.com/SUNET/SATOSA/blob/d20500117c22f891ca44f7808a1ed6fab70738d7/src/satosa/frontends/openid_connect.py#L118

which raises IndexError: list index out of range as expected.

So the question is :

skoranda commented 7 years ago

I think it would be good to fix it in both places. I have the ldap_attribute_store.py code open now and can easily fix this.

jkakavas commented 7 years ago

That'd be great Scott, thanks!