libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtekel <...@git.apache.org>
Subject [GitHub] libcloud pull request: google: Update generic auth error message
Date Wed, 02 Sep 2015 11:12:38 GMT
GitHub user mtekel opened a pull request:

    https://github.com/apache/libcloud/pull/571

    google: Update generic auth error message

    Google authentication will fail if your time drift (difference between your local time
and time on google servers) is bigger than 5 minutes. This often happens on the VM instances
running in various cloud providers. Google itself doesn't provide any helpful indication of
the issue, the response is just {u'error': u'invalid_grant'}.
    
    There is also problem in the `_get_error(self, body)`, line 205: the error response returned
by google above will mean that err is a string, not a dictionary. `err.get` will then throw
attribute error, which displays generic error message. I think it is better to display the
generic error message than not so helpful 'invalid_grant' response from google. You might
decide to fix or change that later, but for now I think it's important to hint about time
drift to the user, as this happens quite often and it's hard to find, if you only check whether
your credentials are correct (which they can be, but you'll still fail auth with big time
drift).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mtekel/libcloud trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/571.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #571
    
----
commit 2135b145ea868d537bb01a35c3b1cbbe2eed1f3a
Author: Michal Tekel <mtekel@gmail.com>
Date:   2015-09-02T11:03:40Z

    google: Update generic auth error message
    
    Google authentication will fail if your time drift (difference between your local time
and time on google servers) is bigger than 5 minutes. This often happens on the VM instances
running in various cloud providers. Google itself doesn't provide any helpful indication of
the issue, the response is just {u'error': u'invalid_grant'}.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message