issue-creds
Vend short-lived, scope-limited AWS S3 credentials from inside the hub. Wraps
STS AssumeRoleWithWebIdentity and applies an inline session policy that can
only intersect with the role's identity policy — it can shrink permissions,
never widen them.
Install
pip install issue-creds # from a built wheel/sdist or your index
# or, from a checkout:
pip install .
This installs an issue-creds command on $PATH.
Usage
# Read the whole bucket for 30 minutes
issue-creds --role download --lifetime 30m
# Read a single prefix
issue-creds --role download --prefix lagranto/runs
# Upload — defaults to your own JUPYTERHUB_USER prefix; --prefix overrides it
issue-creds --role upload
issue-creds --role upload --prefix shared/inbox
# Full role (the legacy "power user" behaviour)
issue-creds --role power
Inspect what would be requested without calling STS:
issue-creds --role upload --bucket-scope reflective-persistent-prod --dry-run
Other formats: --format env (default), --format profile, --format json.
Roles
| role | grants | prefix scoping |
|---|---|---|
download |
Get/List (+versions), GetBucketLocation | optional --prefix (whole bucket if omitted) |
upload |
Put, multipart, List/ListMultipart, GetBucketLocation (no Get) | defaults to JUPYTERHUB_USER/*; --prefix overrides |
Configuration (environment)
| variable | purpose |
|---|---|
AWS_ROLE_ARN |
default role ARN (fallback for all roles) |
ISSUE_CREDS_DOWNLOAD_ROLE_ARN |
dedicated download role ARN (optional; overrides the fallback) |
ISSUE_CREDS_UPLOAD_ROLE_ARN |
dedicated upload role ARN (optional) |
ISSUE_CREDS_POWER_ROLE_ARN |
dedicated power role ARN (optional) |
ISSUE_CREDS_MAX_LIFETIME |
cap on --lifetime (default 1h; upload allows up to 6h); also raise the role's MaxSessionDuration |
AWS_WEB_IDENTITY_TOKEN_FILE |
OIDC token file (set by the hub) |
JUPYTERHUB_USER |
default upload prefix (overridable with --prefix) and CloudTrail session name |
Security note
The session policy is defense-in-depth, not a boundary. Any user who can read
AWS_WEB_IDENTITY_TOKEN_FILE can call AssumeRoleWithWebIdentity themselves
without the restrictive policy and get whatever the underlying role allows. Real
enforcement comes from separate, tightly-scoped IAM roles per download /
upload / power, gated by the OIDC trust policy. Set the dedicated role ARN
env vars above to switch from advisory to enforced — no code change required.
Development
pip install -e .[dev]
pytest
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 issue_creds-0.1.1.tar.gz.
File metadata
- Download URL: issue_creds-0.1.1.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ab713eba07073cfe0ee180417cf40f8940594369c9646abf9d901f786bd3cde
|
|
| MD5 |
f2b82cb805d45ac68c39ced5fc9ae44c
|
|
| BLAKE2b-256 |
05c6a93a80577830b138c52deca21507a86d9a57a03a165915a017913aed4eac
|
Provenance
The following attestation bundles were made for issue_creds-0.1.1.tar.gz:
Publisher:
ci.yml on ReflectiveCloud/hub-token-vending-machine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
issue_creds-0.1.1.tar.gz -
Subject digest:
1ab713eba07073cfe0ee180417cf40f8940594369c9646abf9d901f786bd3cde - Sigstore transparency entry: 2584817147
- Sigstore integration time:
-
Permalink:
ReflectiveCloud/hub-token-vending-machine@c438d8cda954cb854036a50b824e0bf7d6be9381 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ReflectiveCloud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c438d8cda954cb854036a50b824e0bf7d6be9381 -
Trigger Event:
push
-
Statement type:
File details
Details for the file issue_creds-0.1.1-py3-none-any.whl.
File metadata
- Download URL: issue_creds-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58e9f08feefc7aaf048b96576f79921059c91727150cafd3f9b8b799c6be4d80
|
|
| MD5 |
d2a1674c1fd2c132e255aab7e10a8506
|
|
| BLAKE2b-256 |
8e4aaf7a0eb9847b4e5d4eb6ce1c6c97174e8563fe209ee9922f19965b74dc85
|
Provenance
The following attestation bundles were made for issue_creds-0.1.1-py3-none-any.whl:
Publisher:
ci.yml on ReflectiveCloud/hub-token-vending-machine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
issue_creds-0.1.1-py3-none-any.whl -
Subject digest:
58e9f08feefc7aaf048b96576f79921059c91727150cafd3f9b8b799c6be4d80 - Sigstore transparency entry: 2584817187
- Sigstore integration time:
-
Permalink:
ReflectiveCloud/hub-token-vending-machine@c438d8cda954cb854036a50b824e0bf7d6be9381 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ReflectiveCloud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c438d8cda954cb854036a50b824e0bf7d6be9381 -
Trigger Event:
push
-
Statement type: