Skip to content

Simplify Authentication for Vanilla OpenStack - #547

Merged
carolynvs merged 3 commits into
openstacknetsdk:masterfrom
carolynvs:simplify-vanilla-auth
Aug 5, 2015
Merged

Simplify Authentication for Vanilla OpenStack#547
carolynvs merged 3 commits into
openstacknetsdk:masterfrom
carolynvs:simplify-vanilla-auth

Conversation

@carolynvs

Copy link
Copy Markdown
Member

When writing integration tests against vanilla OpenStack, two usability concerns jumped out at me:

First, that I had to specify the identity twice (see example below) as it wasn't using the identity provider's default identity.

var identity = new CloudIdentity{ Username= "{username}", Password= "{password}" };
var identityProvider = new OpenStackIdentityProvider("{identity-url}", identity);

// before, passing null would cause an exception because the default identity wasn't used
var userAccess = identityProvider.Authenticate(identity);

// after
var userAccess = identityProvider.Authenticate();

Second, when authenticating, if both the project/tenant name and project/tenant id wasn't provided, an exception was thrown. The project/tenant id is now optional (see example below), as that seemed a bit redundant.

var identity = new CloudIdentityWithProject
    {
        Username = "{username}",
        Password = "{password}",
        ProjectName = "{project}"
    };

The integration test configuration has been updated to use vanilla OpenStack instead of Rackspace. In order to run the tests, you must have the following environment variables set:

  • OPENSTACKNET_IDENTITY_URL - The url to the identity endpoint
  • OPENSTACKNET_USER - The user name
  • OPENSTACKNET_PASSWORD - The user password
  • OPENSTACKNET_PROJECT - The project name

When authenticating to vanilla openstack, if an identity
is not explicitly provided, use the provider's default
identity
@carolynvs carolynvs added this to the v1.5.0 milestone Aug 4, 2015
carolynvs added a commit that referenced this pull request Aug 5, 2015
Simplify Authentication for Vanilla OpenStack
@carolynvs
carolynvs merged commit 4ce3d9c into openstacknetsdk:master Aug 5, 2015
@carolynvs
carolynvs deleted the simplify-vanilla-auth branch August 5, 2015 22:35
carolynvs added a commit that referenced this pull request Aug 11, 2015
Simplify Authentication for Vanilla OpenStack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants