You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Daniel Haeser Rech (JIRA)" <ji...@apache.org> on 2016/08/03 01:46:20 UTC
[jira] [Created] (JCLOUDS-1148) oauth API:
JWTBearerTokenFlow.tokenCache never hits
Daniel Haeser Rech created JCLOUDS-1148:
-------------------------------------------
Summary: oauth API: JWTBearerTokenFlow.tokenCache never hits
Key: JCLOUDS-1148
URL: https://issues.apache.org/jira/browse/JCLOUDS-1148
Project: jclouds
Issue Type: Bug
Affects Versions: 1.9.2
Reporter: Daniel Haeser Rech
I'm using the google-cloud-storage provider version 1.9.2, which in turn uses the oauth API.
I noticed that every new blobstore request was also generating a new token request.
Looking into the oauth API source code, claims are instantiated in JWTBearerTokenFlow.filter(...), setting a new iat and exp for every new request.
Since every new request uses a new iat and exp value, AutoValue_Claims.equals(..) will always returns false, resulting in a cache miss. Thus, claims in the tokenCache are never reused, making the cache useless.
My proposal is to simply override Claims.equals(..), excluding the iat and exp field from the comparison.
If that reasoning makes sense, I should be able to create a pull-request fixing this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)