Skip to content

Unavailable attribute causes 'Unknown error'  #86

Closed
@jkakavas

Description

@jkakavas

If an attribute has been defined in the hash dictionary in the configuration and this attribute is not available for a given transaction, this causes SAtoSA to fail with an 'Unknown error'

The stacktrace is as follows:

[2017-04-28 07:48:24] [ERROR]: Unknown error
Traceback (most recent call last):
  File "/home/debian/vopaas/virtualenv/lib/python3.4/site-packages/satosa/base.py", line 255, in run
    resp = self._run_bound_endpoint(context, spec)
  File "/home/debian/vopaas/virtualenv/lib/python3.4/site-packages/satosa/base.py", line 203, in _run_bound_endpoint
    return spec(context)
  File "/home/debian/vopaas/virtualenv/lib/python3.4/site-packages/satosa/micro_services/consent.py", line 79, in _handle_consent_response
    return self._end_consent(context, internal_response)
  File "/home/debian/vopaas/virtualenv/lib/python3.4/site-packages/satosa/micro_services/consent.py", line 218, in _end_consent
    return super().process(context, internal_response)
  File "/home/debian/vopaas/virtualenv/lib/python3.4/site-packages/satosa/micro_services/base.py", line 33, in process
    return self.next(context, data)
  File "/home/debian/vopaas/virtualenv/lib/python3.4/site-packages/satosa/base.py", line 139, in _auth_resp_finish
    for v in internal_attributes[attribute]]
KeyError: 'edupersonprincipalname'

This happens because an assumption has been made that if a attribute is configured for hashing, it will always be available.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions