Skip to main content

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

Metadata

Release files for issue-creds 0.1.1

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

Source distribution (sdist)

Source distribution for issue-creds 0.1.1
File Size Uploaded Provenance Actions
issue_creds-0.1.1.tar.gz 18.1 kB With provenance Details for issue_creds-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for issue-creds 0.1.1
File Interpreter ABI Platform Actions
issue_creds-0.1.1-py3-none-any.whl Python 3 none any Details for issue_creds-0.1.1-py3-none-any.whl

Total release size: 33.0 kB

Release files / issue_creds-0.1.1.tar.gz

Download URL issue_creds-0.1.1.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1ab713eba07073cfe0ee180417cf40f8940594369c9646abf9d901f786bd3cde
BLAKE2b-256 checksum
How to use checksums
05c6a93a80577830b138c52deca21507a86d9a57a03a165915a017913aed4eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / issue_creds-0.1.1-py3-none-any.whl

Download URL issue_creds-0.1.1-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58e9f08feefc7aaf048b96576f79921059c91727150cafd3f9b8b799c6be4d80
BLAKE2b-256 checksum
How to use checksums
8e4aaf7a0eb9847b4e5d4eb6ce1c6c97174e8563fe209ee9922f19965b74dc85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Security for issue-creds 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for issue_creds-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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