Skip to main content

This is a shared codebase for gcloud-aio-auth and gcloud-rest-auth

This library implements an IamClient class, which can be used to interact with GCP public keys and URL sign blobs.

It additionally implements a Token class, which is used for authorizing against Google Cloud. The other gcloud-aio-* package components accept a Token instance as an argument; you can define a single token for all of these components or define one for each. Each component corresponds to a given Google Cloud service and each service requires various “scopes”.

Latest PyPI Version (gcloud-aio-auth) Python Version Support (gcloud-aio-auth) Python Version Support (gcloud-rest-auth)

Installation

$ pip install --upgrade gcloud-{aio,rest}-auth

Usage

See our docs.

CLI

This project can also be used to help you manually authenticate to test GCP routes, eg. we can list our project’s uptime checks with a tool such as curl:

# using default application credentials
curl \
  -H "Authorization: Bearer $(python3 -c 'from gcloud.rest.auth import Token; print(Token().get())')" \
  "https://monitoring.googleapis.com/v3/projects/PROJECT_ID/uptimeCheckConfigs"

# using a service account (make sure to provide a scope!)
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service.json
curl \
  -H "Authorization: Bearer $(python3 -c 'from gcloud.rest.auth import Token; print(Token(scopes=["'"https://www.googleapis.com/auth/cloud-platform"'"]).get())')" \
  "https://monitoring.googleapis.com/v3/projects/PROJECT_ID/uptimeCheckConfigs"

# using legacy account credentials
export GOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/legacy_credentials/EMAIL@DOMAIN.TLD/adc.json
curl \
  -H "Authorization: Bearer $(python3 -c 'from gcloud.rest.auth import Token; print(Token().get())')" \
  "https://monitoring.googleapis.com/v3/projects/PROJECT_ID/uptimeCheckConfigs"

Contributing

Please see our contributing guide.

Metadata

Release files for gcloud-aio-auth 4.2.3

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

Source distribution (sdist)

Source distribution for gcloud-aio-auth 4.2.3
File Size Uploaded
gcloud_aio_auth-4.2.3.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gcloud-aio-auth 4.2.3
File Interpreter ABI Platform
gcloud_aio_auth-4.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 kB

Release files / gcloud_aio_auth-4.2.3.tar.gz

Download URL gcloud_aio_auth-4.2.3.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8e12297c5b45cfc20d629b83e1233f83a1c7d5f830f24f31bc5bb8816c0cda1b
BLAKE2b-256 checksum
How to use checksums
79145825fcb319cd0d86e78d6e7f5ab0970be61b56dd5ecc3241fe37abc47794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Linux/5.15.0-1030-aws

Release files / gcloud_aio_auth-4.2.3-py3-none-any.whl

Download URL gcloud_aio_auth-4.2.3-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4adadd36e35eeeb8537b926840372c3080c2f5a6909d44aa1bacbced2260bb1
BLAKE2b-256 checksum
How to use checksums
08edace42eb4216c1a795a396a1b14cf81ba0b1f43cb18ac4f0bb458322e7fb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Linux/5.15.0-1030-aws

Release history Release notifications | RSS feed

5.5.1

2 release files

5.5.0

2 release files

5.4.4

2 release files

5.4.2

2 release files

5.4.1

2 release files

5.4.0

2 release files

5.3.2

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.2

2 release files

5.2.1

2 release files

5.2.0

2 release files

5.1.3

2 release files

5.1.2

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.0

2 release files

This release

4.2.3 This release

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.6

2 release files

4.1.5

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.8.1

2 release files

3.8.0

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.5

2 release files

3.4.4

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.0.0

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