Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
> +import org.jclouds.rest.AuthorizationException; > + > +import com.google.common.base.Function; > +import com.google.common.base.Supplier; > +import com.google.common.collect.ImmutableList; > + > +public final class ClaimsToAssertion implements Function { > + private static final List SUPPORTED

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrew Phillips
> - expirationSeconds = expirationSeconds > 30 ? expirationSeconds - 30 : > expirationSeconds; > - return CacheBuilder.newBuilder().expireAfterWrite(expirationSeconds, > SECONDS).build(CacheLoader.from(getAccess)); > - } > - > - /** > -* Defers instantiation of {@linkplain SignO

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrew Phillips
Just a couple of minor comments. +1 - looks good to me. Thanks, @adriancole! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63563273

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrew Phillips
> +import org.jclouds.rest.AuthorizationException; > + > +import com.google.common.base.Function; > +import com.google.common.base.Supplier; > +import com.google.common.collect.ImmutableList; > + > +public final class ClaimsToAssertion implements Function { > + private static final List SUPPORTED

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
> @Provides > - @Singleton > - public LoadingCache > provideAccessCache(Function getAccess, > - > @Named(PROPERTY_SESSION_INTERVAL) long expirationSeconds) { > - // since the session interval is also the token expiration t

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrew Phillips
> @Provides > - @Singleton > - public LoadingCache > provideAccessCache(Function getAccess, > - > @Named(PROPERTY_SESSION_INTERVAL) long expirationSeconds) { > - // since the session interval is also the token expiration t

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
Closed #96. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#event-195048816

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
and.. in --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63522384

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
GCE tests were doing fine, then I screwed up my classpath working on something unrelated about 30m in. I'm going to merge, and certainly run live tests again on next change --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
similar error ratio on google storage ``` Tests run: 101, Failures: 7, Errors: 0, Skipped: 55 ``` --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63514650

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
Live test from oauth passed --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63513431

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrea Turli
I'd like to see the LiveTests result to +1 unless @nacx @ccustine have other thoughts --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63509637

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Adrian Cole
Simplifications are made around JWT actually, not necessarily google. For example, I used salesforce docs to clarify terminology! https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrea Turli
don't have a way to run LiveTests, can you report the result from your tests? If they are ok, I think the assumptions done to simplify the implementation are ok for Google's product. If we then want to support OAuth for other providers will probably need to revisit that again, correct? --- Repl

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-18 Thread Andrea Turli
> @@ -35,7 +35,7 @@ > import > org.jclouds.googlecloudstorage.domain.templates.BucketAccessControlsTemplate; > import org.jclouds.http.HttpResponse; > import org.jclouds.javax.annotation.Nullable; > -import org.jclouds.oauth.v2.filters.OAuthAuthenticationFilter; > +import org.jclouds.oauth.v2.f

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread BuildHive
[jclouds » jclouds-labs-google #1746](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1746/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jc

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread CloudBees pull request builder plugin
[jclouds-labs-google-pull-requests #302](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/302/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63428398

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread BuildHive
[jclouds » jclouds-labs-google #1745](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1745/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jc

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread CloudBees pull request builder plugin
[jclouds-labs-google-pull-requests #301](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/301/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63427590

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread BuildHive
[jclouds » jclouds-labs-google #1744](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1744/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jc

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread Adrian Cole
> > import com.google.common.base.Function; > import com.google.common.base.Joiner; > import com.google.common.base.Supplier; > > /** Builds the default token request with the following claims: {@code > iss,scope,aud,iat,exp}. */ > -public class BuildTokenRequest implements Function TokenR

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread Adrian Cole
> + > + @Inject ClaimsToAssertion(@Named(JWS_ALG) String alg, @Authorization > Supplier privateKey, Json json) { > + this.alg = alg; > + checkArgument(SUPPORTED_ALGS.contains(alg), "%s %s not in supported > list", JWS_ALG, alg, SUPPORTED_ALGS); > + this.privateKey = privateKey; >

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread CloudBees pull request builder plugin
[jclouds-labs-google-pull-requests #300](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/300/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63426957

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread Adrian Cole
and now.. the 1k less lines edition! @ccustine @nacx ptal --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63426892

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread BuildHive
[jclouds » jclouds-labs-google #1743](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1743/) UNSTABLE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread CloudBees pull request builder plugin
[jclouds-labs-google-pull-requests #299](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/299/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63422931

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread BuildHive
[jclouds » jclouds-labs-google #1742](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1742/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jc

Re: [jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread CloudBees pull request builder plugin
[jclouds-labs-google-pull-requests #298](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/298/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/96#issuecomment-63419376

[jclouds-labs-google] OAuth cleanup round... 5? (#96)

2014-11-17 Thread Adrian Cole
OAuth smoke and mirror indirection is coming to an end. Through tracing code, I've found that we only actually issue Bearer tokens. I've renamed accordingly, and flattened a complex cache mapping. There's at least one more cleanup round to do, but this should be the last api-breaker TODO for im