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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for httpie-keystone-auth-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa0397bbf0497435cdb6345a0a841f9bb7d7682ea44f6e221c78100b241e21fd |
|
MD5 | bd655aabc5bbfd099a2a378abdb04b10 |
|
BLAKE2b-256 | 605fc1019585ca582c6d871111b04b200c848ddba06db89292ff14d58a3a959c |
Hashes for httpie_keystone_auth-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333b37df5447f3467a978509d4ad2efee26f6efe6805cd76a8d442408eb96054 |
|
MD5 | 2e5d110476142f22422b255b333497a8 |
|
BLAKE2b-256 | 74ecfbfb4dbee766e122a32d4cb52a8813396e0f6a8e9be077f58f88c87e2247 |