[Maas-devel] Clock skew and OAuth

Julian Edwards julian.edwards at canonical.com
Wed Aug 22 03:17:25 UTC 2012


On Tuesday 21 August 2012 06:02:24 Scott Moser wrote:
> The solution that seems to make the most sense to me there is to
> attempt to fix the clock to the server's clock if an Oauthed request fails
> with 403.  I'm concerned that the clock jumping forward or backward at
> this point in boot might have negative affects.  There are possibly some
> things that are sleeping and would have issues with backwards or greatly
> forwards moving clock (dhclient is likely one).

It may be possible to coerce OAuth into using a special timestamp instead of 
violently modifying the system clock.  It needs a change in cloud-init of 
course.

Once you have an OAuthRequest object, you can call this before calling 
sign_request:

    >>> request.set_parameter("oauth_timestamp", <value>)

<value> normally defaults to "int(time.time())".  It should be easy to poke 
the server's value in that you determined earlier.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20120822/3b86b33e/attachment.html>


More information about the Maas-devel mailing list