Skip to main content

CloudAuthz

Installation

Install the latest release from PyPi:

pip install cloudauthz

Example

CloudAuthz can authorize access to Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). An example for each provider is given in the following.

  • Amazon Web Services

    from cloudauthz import *
    
    cloudauthz = CloudAuthz()
    config = {
        "id_token": " ... ",
        "role_arn": " ... "
    }
    credentials = cloudauthz.authorize("aws", config)
    

    The credentials object is a dictionary as the following:

    {
      "SecretAccessKey": " ... ", 
      "SessionToken": " ... ", 
      "Expiration": "2019-05-28T02:12:45Z", 
      "AccessKeyId": " ... "
    }
    
  • Microsoft Azure

    from cloudauthz import *
    
    cloudauthz = CloudAuthz()
    config = {
        "tenant_id": " ... ",
        "client_id": " ... ",
        "client_secret": " ... "
    }
    credentials = cloudauthz.authorize("azure", config)
    

    The credentials object is a dictionary as the following:

    {
        "expiresIn": 3599,
        "_authority": "https://login.microsoftonline.com/TENANT_ID",
        "resource": "https://storage.azure.com/",
        "tokenType": "Bearer",
        "expiresOn": "2018-06-28 12:30:24.895661",
        "isMRRT": true,
        "_clientId": " ... ",
        "accessToken": " ... ",
    }
    
  • Google Cloud Platform

    from cloudauthz import *
    
    cloudauthz = CloudAuthz()
    config = {
        "project_id": "...",
        "private_key_id": "...",
        "private_key": "...",
        "client_email": "...",
        "client_id": "..."
    }
    credentials = cloudauthz.authorize("gcp", config)
    

    The credentials object is a dictionary containing the following keys:

    {
      "type": "service_account",
      "project_id": "...",
      "private_key_id": "...",
      "private_key": "...",
      "client_email": "...",
      "client_id": "...",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "..."
    }
    

Metadata

Release files for cloudauthz 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudauthz 0.6.0
File Size Uploaded
cloudauthz-0.6.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudauthz 0.6.0
File Interpreter ABI Platform
cloudauthz-0.6.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 15.1 kB

Release files / cloudauthz-0.6.0.tar.gz

Download URL cloudauthz-0.6.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7e62f3ae04b1842540ca484717d40bd9ec17c6764dd842c1f73f6290b9b54ac1
BLAKE2b-256 checksum
How to use checksums
6546639ff537ab106ae3fd16a60b949d983acf78d8e065cb3454df340b4e1724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.10

Release files / cloudauthz-0.6.0-py2.py3-none-any.whl

Download URL cloudauthz-0.6.0-py2.py3-none-any.whl
Size 8.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e76e65c9fa3f3e1c63d44bd4488e0d75c0ede919870e0e9f08eae21f1316193b
BLAKE2b-256 checksum
How to use checksums
614f390c7c2d1b2777e8a4a70c295e911778b41a14f5936dec70ed5646d0c767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.10

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page