You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Adrian Cole <no...@github.com> on 2014/11/26 19:15:33 UTC
[jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
cc @jdaggett
You can merge this Pull Request by running:
git pull https://github.com/adriancole/jclouds adrian.swift-tempauth
Or you can view, comment on it, or merge it online at:
https://github.com/jclouds/jclouds/pull/616
-- Commit Summary --
* JCLOUDS-523 add openstack-swift-tempauth
-- File Changes --
A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/TempAuthSwiftApiMetadata.java (95)
A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/TempAuthModule.java (175)
M apis/openstack-swift/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (1)
A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/TempAuthMockTest.java (92)
-- Patch Links --
https://github.com/jclouds/jclouds/pull/616.patch
https://github.com/jclouds/jclouds/pull/616.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by Adrian Cole <no...@github.com>.
I'm going to land this in master, 1.8.x
That way, we can remove apis/swift and common/openstack in 1.9.x
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64733813
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by Adrian Cole <no...@github.com>.
@demobox PTAL. This is now controlled by a property. required rethinking a little.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64729490
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by Adrian Cole <ad...@gmail.com>.
I've on more idea I will try before punting to someone else (where that
probably means no one).
Will update in a bit
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by Adrian Cole <no...@github.com>.
@demobox if the KeystoneAuthenticationModule wasn't so self-coupled (ex. needs to use multibindings to unwind itself), the following might have worked to support what you are asking for.
```java
@Override
protected void configure() {
// magic needed to defer resolution of AnnotatedHttpApiProvider.get()
binder().bind(new TypeLiteral<Class<TempAuthApi>>() {
}).toInstance(TempAuthApi.class);
binder().bind(new TypeLiteral<Class<AuthenticationApi>>() {
}).toInstance(AuthenticationApi.class);
}
@Provides @Singleton AuthenticationApi authenticationApi(@Named(CREDENTIAL_TYPE) String credentialType,
AnnotatedHttpApiProvider<AuthenticationApi> viaKeystone, AnnotatedHttpApiProvider<TempAuthApi> viaTempAuth) {
if (credentialType.equals("tempAuthCredentials")) {
return new TempAuthAuthenticationApi(viaTempAuth.get());
}
return viaKeystone.get();
}
```
Regardless, someone could possibly make this work on properties alone, just I'd estimate it at 1-2 days work. I'm over my jclouds budget at the moment, by about 50 hours or so.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64726154
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #1955](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1955/) 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/jclouds/pull/616#issuecomment-64696721
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by Andrew Phillips <no...@github.com>.
@adriancole To clarify: the idea here would be that users would have to create a different context (with a different key) to authenticate against an OpenStack instance using this auth type. Just wondering if there's no easy way to support both auth types from the same context..?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64713692
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by Adrian Cole <no...@github.com>.
>
>
> jclouds-pull-requests-java-7 #328
> <https://github.com/jclouds/jclouds/pull/328> FAILURE
>
> The test failure is in an AWS EC2 test that seems unrelated to this PR, so
> it shouldn't hold it up. Aany idea where that might be coming from, though?
>
> Tests run: 303, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 21.624 sec <<< FAILURE! - in TestSuite
> addIpPermissionGroupFromIpPermission(org.jclouds.aws.ec2.compute.extensions.AWSEC2SecurityGroupExtensionApiMockTest) Time elapsed: 0.166 sec <<< FAILURE!
> org.jclouds.http.HttpResponseException: Unexpected end of file from server connecting to POST http://localhost:38030/ HTTP/1.1
> at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:772)
>
> Not sure, but I've pretty much had it with TestNG. I'd love to switch to
junit so I can use test rules and avoid all this base test class
subclassing dance, and stop worrying about which fields are shared, etc.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64733736
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by Adrian Cole <no...@github.com>.
ps rather than nagging, I will just plan to merge this in 3 days, if no feedback.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64710525
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #1956](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1956/) 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/jclouds/pull/616#issuecomment-64733214
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by Andrew Phillips <no...@github.com>.
This looks pretty cool, although I don't know enough about TempAuth to comment on the technical details. An addition to jclouds-examples would probably help, but that can be covered in a different PR.
> jclouds-pull-requests-java-7 #328 FAILURE
The test failure is in an AWS EC2 test that seems unrelated to this PR, so it shouldn't hold it up. Aany idea where that might be coming from, though?
```
Tests run: 303, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 21.624 sec <<< FAILURE! - in TestSuite
addIpPermissionGroupFromIpPermission(org.jclouds.aws.ec2.compute.extensions.AWSEC2SecurityGroupExtensionApiMockTest) Time elapsed: 0.166 sec <<< FAILURE!
org.jclouds.http.HttpResponseException: Unexpected end of file from server connecting to POST http://localhost:38030/ HTTP/1.1
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:772)
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64732579
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by Adrian Cole <no...@github.com>.
I know what you are getting at, but that implies conditional bindings. Ex.
https://github.com/google/guice/wiki/AvoidConditionalLogicInModules
I tried to start doing that, but KeyStone is very strict. ex.
KeystoneAuthenticationModule.authenticationMethods is a bit of a stroll.
Since temp auth is edge case, I can't justify the time to unwind everything
to support it via property+conditional binding.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64725549
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests-java-7 #327](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-7/327/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64690592
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #1417](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1417/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64731919
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests-java-7 #328](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-7/328/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64730823
Re: [jclouds] JCLOUDS-523 add tempAuthCredentials to openstack-swift
(#616)
Posted by Adrian Cole <no...@github.com>.
merged
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64734019
Re: [jclouds] JCLOUDS-523 add openstack-swift-tempauth (#616)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #1416](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1416/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64692894