libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-665) OpenStack identity component does not refresh auth tokens automatically
Date Thu, 12 Feb 2015 16:11:11 GMT


Jacob commented on LIBCLOUD-665:

A fix for this would be to override the authenticated_request function in OpenStackIdentity_3_0_Connection
ensuring that the auth token is refreshed if it is not available.

    def authenticated_request(self, action, params=None, data=None,
                              headers=None, method='GET', raw=False):
        Perform an authenticated request against the identity API.
        self.authenticate()                 <===================
        if not self.auth_token:
            raise ValueError('Not to be authenticated to perform this request')

        headers = headers or {}
        headers['X-Auth-Token'] = self.auth_token

        return self.request(action=action, params=params, data=data,
                            headers=headers, method=method, raw=raw)

> OpenStack identity component does not refresh auth tokens automatically
> -----------------------------------------------------------------------
>                 Key: LIBCLOUD-665
>                 URL:
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.15.1
>            Reporter: Jacob
> After initialization of OpenStackIdentity_3_0_Connection class and authentication, it
is possible to invoke functions to list_users etc.
> After a period of time, these function calls will fail since the auth token has expired
and calls to authenticated_request() expect a valid auth token.

This message was sent by Atlassian JIRA

View raw message