<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi folks,</p>
<p> </p>
<p>While running Tempest I ran into a bit of interesting behavior. As part of the Tempest auth client, checks are performed to assure the token in use is still valid. When parsing the expiry timestamp from the auth response, a very specific datetime format
is expected for Keystone v2 and v3 respectively:</p>
<p> </p>
<p><a href="https://github.com/openstack/tempest-lib/blob/master/tempest_lib/auth.py#L232">https://github.com/openstack/tempest-lib/blob/master/tempest_lib/auth.py#L232</a></p>
<p><a href="https://github.com/openstack/tempest-lib/blob/master/tempest_lib/auth.py#L313">https://github.com/openstack/tempest-lib/blob/master/tempest_lib/auth.py#L313</a></p>
<p> </p>
<p>Each of these are formats strings are valid under ISO 8601, but a one to one mapping is being made between Keystone versions and their timestamp formats. This can be problematic if the timestamps generated by your identity provider are valid timestamps,
but vary in the granularity (second vs. millisecond vs. microsecond). In my case, I cannot execute any Tempest tests as this check occurs early in the fixture setup, which halts any test from running.</p>
<p> </p>
<p>The guidance I've observed from the API working group is that any ISO 8601 timestamp format should be sufficient (<a href="https://review.openstack.org/#/c/159892/11/guidelines/time.rst">https://review.openstack.org/#/c/159892/11/guidelines/time.rst</a>).
Since this parsing occurs in client code as opposed to a test, would it be sufficient to verify that the timestamp is of a valid ISO 8601 format before parsing it and leave explicit checking to Keystone tests if necessary? I didn't want to open this as a bug
because I realized there might be some historical context to this decision. I'd be grateful for any feedback on this point.</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Daryl</p>
</body>
</html>