Dapla Auth Client
Project description
Dapla Auth Client
Features
- Detects Dapla environment, service, and region via environment variables
- Retrieves current Dapla region (e.g., checks for DAPLA_LAB)
- Reads Kubernetes service-account token from filesystem
- Exchanges Kubernetes token for Keycloak token in Dapla Lab
- Overrides Google-Auth refresh handler to use custom token fetch logic
- Fetches Google ADC credentials
Requirements
- Python >3.8 (3.10 is preferred)
- Poetry, install via curl -sSL https://install.python-poetry.org | python3 -
Installation
You can install Dapla Auth Client via pip from PyPI:
pip install dapla-auth-client
Usage
# This code snippet demonstrates how to use the Dapla Auth Client to fetch a personal token.
from dapla_auth_client import AuthClient
print(AuthClient.fetch_personal_token())
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, Dapla Auth Client is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from Statistics Norway's SSB PyPI Template.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dapla_auth_client-0.0.2.tar.gz.
File metadata
- Download URL: dapla_auth_client-0.0.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
773eb615c8e2a5110a9b9b0757981ecafb36232bd16c9a5fdc2f3fc2a677b502
|
|
| MD5 |
6946d53cbd8f501eafb0a721faf323fa
|
|
| BLAKE2b-256 |
dc94de6bb248e1f5340661b1172fe9aebfc13e158be797888209f174797c0ba9
|
Provenance
The following attestation bundles were made for dapla_auth_client-0.0.2.tar.gz:
Publisher:
release.yml on statisticsnorway/dapla-auth-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dapla_auth_client-0.0.2.tar.gz -
Subject digest:
773eb615c8e2a5110a9b9b0757981ecafb36232bd16c9a5fdc2f3fc2a677b502 - Sigstore transparency entry: 230096662
- Sigstore integration time:
-
Permalink:
statisticsnorway/dapla-auth-client@ef61f51692ad450321fd517ea03e3a048b22f128 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/statisticsnorway
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ef61f51692ad450321fd517ea03e3a048b22f128 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dapla_auth_client-0.0.2-py3-none-any.whl.
File metadata
- Download URL: dapla_auth_client-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae28cfb5048918b2f26bcb231d3aaae1e4a05b9dc5e9ee8eaf34d7edf50c93c
|
|
| MD5 |
26bdfe9eeb5c8a327fbbf209455a5a5a
|
|
| BLAKE2b-256 |
55f99030c25b73d5e94594d17487f1ec3bda4705827b1c63b55e23a42a54322e
|
Provenance
The following attestation bundles were made for dapla_auth_client-0.0.2-py3-none-any.whl:
Publisher:
release.yml on statisticsnorway/dapla-auth-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dapla_auth_client-0.0.2-py3-none-any.whl -
Subject digest:
0ae28cfb5048918b2f26bcb231d3aaae1e4a05b9dc5e9ee8eaf34d7edf50c93c - Sigstore transparency entry: 230096664
- Sigstore integration time:
-
Permalink:
statisticsnorway/dapla-auth-client@ef61f51692ad450321fd517ea03e3a048b22f128 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/statisticsnorway
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ef61f51692ad450321fd517ea03e3a048b22f128 -
Trigger Event:
push
-
Statement type: