Skip to content

Add OIDC-authenticated key-value store actions - #30

Merged
zanieb merged 1 commit into
astral-sh:mainfrom
zaniebot:zb/oidc-key-value-actions
Oct 22, 2026
Merged

zanieb merged 1 commit into
astral-sh:mainfrom
zaniebot:zb/oidc-key-value-actions

Conversation

@zaniebot

@zaniebot zaniebot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Add key-value-store/get, key-value-store/put, and key-value-store/delete to share small values within a GitHub Actions OIDC context. Each invocation exchanges a fresh OIDC token for a short-lived session. The service assigns separate namespaces to different pull requests; workflows for the same pull request and environment can share keys.

All three actions take service-url, key, and an optional audience, and require id-token: write. put accepts UTF-8 text through value or raw bytes through path, up to 64 KiB. get returns found, value, path, and expires-at; a missing key succeeds with found: 'false', while an empty value has found: 'true'. When get writes to path, the file must not already exist. Deleting an absent key succeeds.

Namespace isolation is enforced by the service. All actors and jobs within one accepted OIDC context share read, write, and delete access, and anyone holding a session token can use it until expiry. OIDC and session tokens are not action outputs, redirects are rejected, and retrieved text is masked by default. The service endpoint, audience, and file paths must be trusted, including the parent directories of file paths; retrieved values remain untrusted data.

The README includes usage examples and documents the action inputs, outputs, and service API.

@zaniebot
zaniebot force-pushed the zb/oidc-key-value-actions branch from 6e01e0c to a45012f Compare October 22, 2026 04:18
@zanieb
zanieb marked this pull request as ready for review October 22, 2026 04:22
@zanieb
zanieb merged commit c4f6c50 into astral-sh:main Oct 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants