Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native OIDC Token for workload identity federation #33681

Open
Ali-Gamal opened this issue Feb 21, 2025 · 0 comments
Open

Native OIDC Token for workload identity federation #33681

Ali-Gamal opened this issue Feb 21, 2025 · 0 comments
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Ali-Gamal
Copy link

Ali-Gamal commented Feb 21, 2025

Feature Description

Hello,

I would like to request a feature enhancement that allows Gitea Actions to produce a fully compliant OIDC token (including standard claims such as iss, sub, aud) for each job.

Use Case:
We want to use Gitea's CI to securely authenticate with Google Cloud via Workload Identity Federation (WIF). Currently, the ACTIONS_RUNTIME_TOKEN is an internal token that doesn't meet Google's OIDC requirements (for example, it doesn't contain the standard iss or sub claims). Because of this, Google's Security Token Service (STS) rejects it, and we cannot perform ephemeral, keyless authentication from Gitea Actions to GCP.

Why It's Important:

  • A real OIDC token from Gitea would let us avoid storing long-lived credentials or rolling our own JWT signing mechanism.
  • Many users want a "GitHub Actions–like" OIDC approach, so they can seamlessly integrate Gitea with GCP (and potentially other OIDC providers) in a secure, short-lived token scenario.
  • This is more secure than storing service account keys, and is increasingly becoming the standard for CI-to-cloud authentication.

Request:

  • Add a configuration or built-in feature that emits a proper OIDC token for each Gitea Actions job, with standard claims (iss, sub, exp, etc.), so it can be exchanged at Google's STS endpoint.
  • Possibly provide a permissions.id-token: write–style configuration (similar to GitHub's approach), letting maintainers or repository owners enable/disable issuance of an OIDC token
@Ali-Gamal Ali-Gamal added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Feb 21, 2025
@techknowlogick techknowlogick added the topic/gitea-actions related to the actions of Gitea label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants