Skip to main content

OpenStack Keystone auth plugin for HTTPie.

Project description

OpenStack Keystone auth plugin for HTTPie.

Installation

$ pip install --upgrade httpie-keystone-auth

You should now see keystone under --auth-type / -A in $ http --help output.

Usage

Plugin uses openstacksdk library to parse the clouds.yaml file and get the token from Keystone.

A simple example of a clouds.yaml file is:

clouds:
  mycloud:
    auth:
      auth_url: <url of keystone endpoint>
      username: <username>
      password: <password>
      user_domain_name: <user domain name>
      project_name: <name of the project to authorize to>
      project_domain_name: <domain of the project>
 othercloud:
   auth:
     . . .

Read more about the format of the file and where to place it in openstacksdk docs

Using env var

You can set OS_CLOUD env var to a name of one of the clouds in the clouds.yaml file, which will be then used by plugin:

export OS_CLOUD=mycloud
http -A keystone devstack.local/images/v2/images

Passing cloud name explicitly

Alternatively you can pass the name of the cloud from the clouds.yaml file to use as ‘username’ to HTTPie:

https -A keystone -a myothercloud images.othercloud.com/v2/images

Notes

For now tested only with standard password auth type of Keystone, but should work with any auth_type supported in the clouds.yaml file.

TODO

  • simplify usage by allowing URLs in the form of <service-type-or-service-name> by getting them out from Keystone catalog of the cloud being used

  • for password-like auth type, check that the password is provided in the clouds.yaml and prompt for password if it is not

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

httpie-keystone-auth-0.1.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

httpie_keystone_auth-0.1.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page