Bug 45560 - SAML Traceback if DC Master time is not synchronized
SAML Traceback if DC Master time is not synchronized
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: SAML
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
https://packages.debian.org/stretch-b...
:
: 45866 54401 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-18 13:58 CEST by Dirk Wiesenthal
Modified: 2022-02-11 13:07 CET (History)
9 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022020921000613, 2021031121001457, 2021032621000591, 2021032621000742, 2021100821000361, 2019031521001151, 2019031821001225, 2019010721001115, 2017110921000661, 2019040321000994, 2019122821000075, 2020012721000095, 2020062121000122
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2017-10-18 13:58:30 CEST
My DC Slave uses the current time. My DC Master still thinks it is yesterday. Logging in on the slave shows:

Interner Server-Fehler.
The server encountered an unexpected condition which prevented it from fulfilling the request.


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1145, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1155, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1272, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python2.7/dist-packages/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "/usr/lib/python2.7/dist-packages/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 776, in _assertion
    self.authn_statement_ok()
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 542, in authn_statement_ok
    self.timeslack):
  File "/usr/lib/python2.7/dist-packages/saml2/validate.py", line 86, in validate_on_or_after
    (nooa, now))
Exception: Can't use it, it's too old 1508282811 > 1508327729
Comment 1 Florian Best univentionstaff 2017-10-18 14:57:00 CEST
We should upgrade to a newer version of python-saml2. Then the exception changed into ResponseLifetimeExceed and we can handle it.
Comment 2 Florian Best univentionstaff 2017-11-10 15:27:49 CET
Version: 4.2-2 errata216 (Lesum)
Comment 3 Florian Best univentionstaff 2017-11-10 15:28:05 CET
Internal server error.
The server encountered an unexpected condition which prevented it from fulfilling the request.


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1145, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1155, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1272, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python2.7/dist-packages/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "/usr/lib/python2.7/dist-packages/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 780, in _assertion
    if not self.condition_ok():
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 575, in condition_ok
    conditions.not_on_or_after, self.timeslack)
  File "/usr/lib/python2.7/dist-packages/saml2/validate.py", line 86, in validate_on_or_after
    (nooa, now))
Exception: Can't use it, it's too old 1510243624 > 1510243774
Comment 4 Philipp Hahn univentionstaff 2018-03-08 06:24:38 CET
*** Bug 45866 has been marked as a duplicate of this bug. ***
Comment 5 Philipp Hahn univentionstaff 2018-03-08 06:25:05 CET
UCS Technical training 2017-12-1[23]
And today on laiva
Comment 6 Philipp Hahn univentionstaff 2018-03-08 06:26:19 CET
Interner Server-Fehler.
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1161, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1171, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1288, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python2.7/dist-packages/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "/usr/lib/python2.7/dist-packages/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 780, in _assertion
    if not self.condition_ok():
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 577, in condition_ok
    validate_before(conditions.not_before, self.timeslack)
  File "/usr/lib/python2.7/dist-packages/saml2/validate.py", line 97, in validate_before
    raise Exception("Can't use it yet %d <= %d" % (nbefore, now))
Exception: Can't use it yet 1520485621 <= 1520485592
Comment 7 Jürn Brodersen univentionstaff 2018-08-17 17:40:04 CEST
simplesamlphp (our IdP) subtracts 30 sec from its server time. That means the slaves time can't be more than 30 sec in the past otherwise saml fails.

In the other direction the slaves time can be 5 min into the future.

The umc (the SP in this case) can the configured to allow a bit more room by setting: accepted_time_diff in univention-management-console/usr/share/univention-management-console/saml/sp.py


30 sec feels quite strict. But in any case we should throw a more meaningful error message (Adjust the server time).
Comment 8 Philipp Hahn univentionstaff 2018-10-09 17:52:42 CEST
Interner Server-Fehler.
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1184, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1194, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1314, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python2.7/dist-packages/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "/usr/lib/python2.7/dist-packages/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 780, in _assertion
    if not self.condition_ok():
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 575, in condition_ok
    conditions.not_on_or_after, self.timeslack)
  File "/usr/lib/python2.7/dist-packages/saml2/validate.py", line 86, in validate_on_or_after
    (nooa, now))
Exception: Can't use it, it's too old 1539099963 > 1539100270
Comment 9 Arvid Requate univentionstaff 2018-10-09 20:41:27 CEST
See also Bug #27728 and Bug #23266
Comment 10 Philipp Hahn univentionstaff 2018-11-30 18:58:41 CET
Again: UCS technical training 2018-11-29
Comment 11 Johannes Keiser univentionstaff 2019-01-31 14:50:46 CET
Reported again:  Version: 4.3-3 errata390 (Neustadt)

Internal server error.
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1184, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1194, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1314, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python2.7/dist-packages/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "/usr/lib/python2.7/dist-packages/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 780, in _assertion
    if not self.condition_ok():
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 577, in condition_ok
    validate_before(conditions.not_before, self.timeslack)
  File "/usr/lib/python2.7/dist-packages/saml2/validate.py", line 97, in validate_before
    raise Exception("Can't use it yet %d <= %d" % (nbefore, now))
Exception: Can't use it yet 1546901080 <= 1546901055


Role: domaincontroller_slave
Comment 12 Johannes Keiser univentionstaff 2019-03-22 12:56:02 CET
Reported again: Version: 4.3-3 errata456 (Neustadt) - UCS@school 4.3 v6
Traceback: Same as comment #11
Comment 13 Johannes Keiser univentionstaff 2019-03-25 14:10:06 CET
Reported again: Version: 4.4-0 errata5 (Blumenthal)
Traceback: Same as Comment #11
Role: domaincontroller_backup
Comment 14 Nico Stöckigt univentionstaff 2019-04-08 15:07:15 CEST
Reported again: Version: 4.3-3, UCS@school 4.3
Two different Tracebacks at Ticket#2019040321000994 (one is similar to #1, the other is similar to #6)
The environment is virtualized via HyperV.
Comment 15 Ingo Steuwer univentionstaff 2020-07-03 20:54:21 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 16 Christian Castens univentionstaff 2020-09-30 09:35:04 CEST
reported again

Version: 4.4-3 errata427 (Blumenthal)

Traceback(d41d8cd98f00b204e9800998ecf8427e):
Internal server error.
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1155, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1165, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1285, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python2.7/dist-packages/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "/usr/lib/python2.7/dist-packages/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 780, in _assertion
    if not self.condition_ok():
  File "/usr/lib/python2.7/dist-packages/saml2/response.py", line 577, in condition_ok
    validate_before(conditions.not_before, self.timeslack)
  File "/usr/lib/python2.7/dist-packages/saml2/validate.py", line 97, in validate_before
    raise Exception("Can't use it yet %d <= %d" % (nbefore, now))
Exception: Can't use it yet 1580111685 <= 1580111668


Role: domaincontroller_master
Comment 17 Florian Best univentionstaff 2020-10-01 12:25:40 CEST
This has been fixed in UCS 5.0 in git:6247389ecdaf818985737d764d018aa0b692066f.
In UCS 4 the python-pysaml2 version is to old to fix it.
Comment 18 Maximilian Janßen univentionstaff 2021-11-19 14:00:29 CET
Reported again:
Version: 4.4-8 errata1043 (Blumenthal)


Error: 
Traceback (most recent call last):
  File "%PY2.7%/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "%PY2.7%/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "%PY2.7%/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1221, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1229, in attribute_consuming_service
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1350, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "%PY2.7%/saml2/client_base.py", line 580, in parse_authn_request_response
    binding, **kwargs)
  File "%PY2.7%/saml2/entity.py", line 1087, in _parse_response
    response = response.verify(keys)
  File "%PY2.7%/saml2/response.py", line 975, in verify
    if self.parse_assertion(keys):
  File "%PY2.7%/saml2/response.py", line 895, in parse_assertion
    if not self._assertion(assertion, False):
  File "%PY2.7%/saml2/response.py", line 780, in _assertion
    if not self.condition_ok():
  File "%PY2.7%/saml2/response.py", line 577, in condition_ok
    validate_before(conditions.not_before, self.timeslack)
  File "%PY2.7%/saml2/validate.py", line 97, in validate_before
    raise Exception("Can't use it yet %d <= %d" % (nbefore, now))
Exception: Can't use it yet 1633696159 <= 1633696074
Comment 19 Maximilian Janßen univentionstaff 2022-02-01 11:51:02 CET
*** Bug 54401 has been marked as a duplicate of this bug. ***