A keyring backend that authenticates to Azure DevOps package feeds using browser-based OAuth2 with PKCE.
Project description
ado-keyring
A keyring backend in pure python that authenticates to Azure DevOps package feeds using browser-based OAuth2 with PKCE.
Once installed, keyring automatically discovers ado-keyring as a backend. Any tool that uses keyring, such as uv for alternative indexes, will trigger browser auth when accessing Azure DevOps feeds.
Install from PyPi
uv tool install keyring --with ado-keyring
Features
- Browser-based OAuth2 + PKCE — secure, no secrets stored in config files
- Persistent token cache — avoids repeated browser prompts (
~/.ado-keyring/) - Automatic token refresh — uses refresh tokens to silently renew access
- Per-org session tokens — supports multiple Azure DevOps organizations
- WSL-aware — opens the Windows browser from WSL via
cmd.exe - No .NET dependency — pure Python, unlike
artifacts-keyring
Install from source
just install
Install on WSL from source
tdnf install -y python3 python3-pip
python3 -m pip install
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
uv tool install rust-just
just install
How It Works
- Binds a localhost callback server on a random port
- Opens the browser to Azure AD's OAuth2 authorize endpoint (PKCE,
select_accountprompt) - Receives the authorization code via redirect
- Exchanges the code for access + refresh tokens
- Exchanges the access token for a
VssSessionTokenscoped tovso.packaging - Caches all tokens to
~/.ado-keyring/token-cache.json(file:0600, dir:0700) - On subsequent calls, uses cached session tokens or silently refreshes via the refresh token
License
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 ado_keyring-0.1.1.tar.gz.
File metadata
- Download URL: ado_keyring-0.1.1.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e15ff221ac8f80db28b92c588a09abf2986765a75d9cb510af51dc34b1533f3c
|
|
| MD5 |
df588ea38217c0ae59b8de08fdc95d1a
|
|
| BLAKE2b-256 |
4cbdae14bd6401743095dba4ba98c4b9c0e993979ac5783a0d64d390c066da96
|
Provenance
The following attestation bundles were made for ado_keyring-0.1.1.tar.gz:
Publisher:
pypi.yml on cataggar/ado-keyring
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ado_keyring-0.1.1.tar.gz -
Subject digest:
e15ff221ac8f80db28b92c588a09abf2986765a75d9cb510af51dc34b1533f3c - Sigstore transparency entry: 1093540912
- Sigstore integration time:
-
Permalink:
cataggar/ado-keyring@f3867e8b02cb81565723729fdf53cfdbafbe2b22 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/cataggar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f3867e8b02cb81565723729fdf53cfdbafbe2b22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ado_keyring-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ado_keyring-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e006f49df6e37102bca05cae38834676faf729fe4e7458ab689fd091805c0057
|
|
| MD5 |
5cc36ac9fd30e8ca2da1f7c448c22677
|
|
| BLAKE2b-256 |
746032f85489d60ab69f46c9c39be8f71650064cbf92e7d16e7d3a4a4813de4f
|
Provenance
The following attestation bundles were made for ado_keyring-0.1.1-py3-none-any.whl:
Publisher:
pypi.yml on cataggar/ado-keyring
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ado_keyring-0.1.1-py3-none-any.whl -
Subject digest:
e006f49df6e37102bca05cae38834676faf729fe4e7458ab689fd091805c0057 - Sigstore transparency entry: 1093540965
- Sigstore integration time:
-
Permalink:
cataggar/ado-keyring@f3867e8b02cb81565723729fdf53cfdbafbe2b22 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/cataggar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f3867e8b02cb81565723729fdf53cfdbafbe2b22 -
Trigger Event:
push
-
Statement type: