-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use Identity v2 AuthOptionsBuilder #2651
Comments
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The gophercloud.AuthOptions already implements this interface so there is no change to the API and no functional change for stock gophercloud usage but it would allow others to implement their own identity v2 authentication schemes. fixes gophercloud#2651.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. Lastly add an AuthenticateV2Ext function which will allow an out of tree identity v2 auth mechanism to be implemented. fixes gophercloud#2651.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. Lastly add an AuthenticateV2Ext function which will allow an out of tree identity v2 auth mechanism to be implemented. fixes gophercloud#2651. ref gophercloud#1330.
If Rackspace is still using identity v2, I don't see a problem leaving it in gophercloud, unless of course, you're looking for an excuse to speed up the adoption of v3 😄 |
Hi @cardoe ! Thank you for this contribution. I particularly appreciate the rationale behind it. I could give this PR a brief look and I think it would be a nice addition to Gophercloud to accept an interface rather than a bare type for the auth v2 options, so that users have more room to support different methods. I am going to review this PR in detail next week. |
Thanks for the review @pierreprinetti. @mandre I'd love to have Rackspace adopt identity v3 however I think that's still a ways off. Dropping identity v2 won't make them speed up adopting v3. I used this PR to implement Rackspace auth in a PR to clean up my original implementation. The PR for that is os-pc/cloud-provider-rackspace#13 but it's a bit ugly to follow. I can make a gist as an example. I'm also willing to update any gophercloud docs to give examples of how to implement different auth types much like the examples that the Python keystoneauth package provides if you link me to the relevant docs repo. |
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The gophercloud.AuthOptions already implements this interface so there is no change to the API. To avoid any API change, add AuthenticateV2Ext() as a version of AuthenticateV2() accepting the interface. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
Rather than creating a tokens2.AuthOptions inside the authentication flow for identity v2, allow any structure that implements the tokens2.AuthBuilderOptions interface to be used. The interface is modified to add a CanReauth function like the v3 version has but provides a default implementation. The gophercloud.AuthOptions already implements this interface so there is no change to its API. This will allow an out of tree identity v2 auth mechanism to be implemented, just like the v3. fixes gophercloud#2651. ref gophercloud#1330.
So for Identity v3, gophercloud takes in an
AuthOptionsBuilder
from thetoken3
which ensures that the data to authenticate with will conform to the Identity v3 APIs. This allows people to implement their own custom auth mechanisms like exist in the Python ecosystem which is great. This same support/ecosystem exists for Identity v2. In fact gophercloud originated from https://github.com/rackspace/gophercloud which has their own Identity v2 auth mechanism using an "API key". When gophercloud moved from under the Rackspace umbrella it rightfully removed all the "Rackspace-isms", however there's no mechanism by which to add this back.I'm proposing using
tokens2.AuthOptionsBuilder
similar to how the Identity v3 auth works in gophercloud. This would improve #1330. However I'm aware of #2577 wanting to remove Identity v2 support, however Rackspace is still using Identity v2. I'd like to get Rackspace contributing more to gophercloud and using it more in the future.As a first attempt of getting Rackspace to use upstream gophercloud I implemented os-pc/cloud-provider-rackspace@56cf8a1#diff-b5b02d252ffde072fea7841ee6419db056b027d7f365193f0d33fad8294ffedc but I've now seen how the interfaces can be used and implemented and will improve it.
The text was updated successfully, but these errors were encountered: