OpenStack Keystone auth plugin for HTTPie

Overview

httpie-keystone-auth

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: 
   
      username: 
   
      password: 
   
      user_domain_name: 
   
      project_name: 
   
      project_domain_name: 
   
 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

Using service type instead of full service URL

This plugin can also simplify working with OpenStack APIs by allowing you to specify only the service type instead of full URL, e.g

https -A keystone compute/servers

Under the hood, the plugin will check if there's any service in the OpenStack service catalog of your cloud that has the service type as specified in the first part (netloc) of your URL, and replace this first path with endpoint URL for this service as defined in the catalog for the region and endpoint type (interface) as set in your clouds.yaml.

Note on API versions

Services in the OpenStack catalog can be versioned and unversioned. In the case of an unversioned endpoint, you will have to provide the version in your URL explicitly, for example:

  • Image service has catalog entry as "https://glance.mycloud.com" To list images using v2 images API, you will have to call image/v2/images URL with HTTPie.
  • Compute service usually has catalog entry that is both versioned and also contains the OpenStack project UUID the request is scoped to, like "https://nova.mycloud.com/v2.1/1234567890absdef1234567890absdef". In this case you should simply call HTTPie with e.g. compute/servers URL to list servers.

Limitations

If you are using cloud that needs custom CA bundle file to verify the TLS connection, you will still have to pass it explicitly to HTTPie even if it is already set in the clouds.yaml file.

TODO

  • for password-like auth type, check that the password is provided in the clouds.yaml and prompt for password if it is not provided as "password" to HTTPie.
Owner
Pavlo Shchelokovskyy
Pavlo Shchelokovskyy
examify-io is an online examination system that offers automatic grading , exam statistics , proctoring and programming tests , multiple user roles

examify-io is an online examination system that offers automatic grading , exam statistics , proctoring and programming tests , multiple user roles ( Examiner , Supervisor , Student )

Ameer Nasser 4 Oct 28, 2021
Toolkit for Pyramid, a Pylons Project, to add Authentication and Authorization using Velruse (OAuth) and/or a local database, CSRF, ReCaptcha, Sessions, Flash messages and I18N

Apex Authentication, Form Library, I18N/L10N, Flash Message Template (not associated with Pyramid, a Pylons project) Uses alchemy Authentication Authe

95 Nov 28, 2022
JWT authentication for Pyramid

JWT authentication for Pyramid This package implements an authentication policy for Pyramid that using JSON Web Tokens. This standard (RFC 7519) is of

Wichert Akkerman 73 Dec 03, 2021
Flask App With Login

Flask App With Login by FranciscoCharles Este projeto basico é o resultado do estudos de algumas funcionalidades do micro framework Flask do Python. O

Charles 3 Nov 14, 2021
蓝鲸用户管理是蓝鲸智云提供的企业组织架构和用户管理解决方案,为企业统一登录提供认证源服务。

蓝鲸用户管理 简体中文 | English 蓝鲸用户管理是蓝鲸智云提供的企业组织架构和用户管理解决方案,为企业统一登录提供认证源服务。 总览 架构设计 代码目录 功能 支持多层级的组织架构管理 支持通过多种方式同步数据:OpenLDAP、Microsoft Active Directory(MAD)

腾讯蓝鲸 35 Dec 14, 2022
A fully tested, abstract interface to creating OAuth clients and servers.

Note: This library implements OAuth 1.0 and not OAuth 2.0. Overview python-oauth2 is a python oauth library fully compatible with python versions: 2.6

Joe Stump 3k Jan 02, 2023
FastAPI-Login tries to provide similar functionality as Flask-Login does.

FastAPI-Login FastAPI-Login tries to provide similar functionality as Flask-Login does. Installation $ pip install fastapi-login Usage To begin we hav

417 Jan 07, 2023
Crie seus tokens de autenticação com o AScrypt.

AScrypt tokens O AScrypt é uma forma de gerar tokens de autenticação para sua aplicação de forma rápida e segura. Todos os tokens que foram, mesmo que

Jaedson Silva 0 Jun 24, 2022
Implements authentication and authorization as FastAPI dependencies

FastAPI Security Implements authentication and authorization as dependencies in FastAPI. Features Authentication via JWT-based OAuth 2 access tokens a

Jacob Magnusson 111 Jan 07, 2023
This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON)

Welcome to django-rest-auth Repository is unmaintained at the moment (on pause). More info can be found on this issue page: https://github.com/Tivix/d

Tivix 2.4k Jan 03, 2023
Boilerplate/Starter Project for building RESTful APIs using Flask, SQLite, JWT authentication.

auth-phyton Boilerplate/Starter Project for building RESTful APIs using Flask, SQLite, JWT authentication. Setup Step #1 - Install dependencies $ pip

sandhika 0 Aug 03, 2022
Basic auth for Django.

Basic auth for Django.

bichanna 2 Mar 25, 2022
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic

OAuthLib - Python Framework for OAuth1 & OAuth2 *A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python 3.5+

OAuthlib 2.5k Jan 02, 2023
row level security for FastAPI framework

Row Level Permissions for FastAPI While trying out the excellent FastApi framework there was one peace missing for me: an easy, declarative way to def

Holger Frey 315 Dec 25, 2022
A module making it easier to manage Discord oAuth with Quart

quart_discord A module making it easier to manage Discord oAuth with Quart Install pip install git+https://github.com/xelA/ 5 Oct 27, 2022

A Python library to create and validate authentication tokens

handshake A Python library to create and validate authentication tokens. handshake is used to generate and validate arbitrary authentication tokens th

0 Apr 26, 2022
Local server that gives you your OAuth 2.0 tokens needed to interact with the Conta Azul's API

What's this? This is a django project meant to be run locally that gives you your OAuth 2.0 tokens needed to interact with Conta Azul's API Prerequisi

Fábio David Freitas 3 Apr 13, 2022
Implementation of Supervised Contrastive Learning with AMP, EMA, SWA, and many other tricks

SupCon-Framework The repo is an implementation of Supervised Contrastive Learning. It's based on another implementation, but with several differencies

Ivan Panshin 132 Dec 14, 2022
Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.

Flask-User v1.0 Attention: Flask-User v1.0 is a Production/Stable version. The previous version is Flask-User v0.6. User Authentication and Management

Ling Thio 997 Jan 06, 2023
Generate payloads that force authentication against an attacker machine

Hashgrab Generates scf, url & lnk payloads to put onto a smb share. These force authentication to an attacker machine in order to grab hashes (for exa

xct 35 Dec 20, 2022