Gitea as an OIDC IdP for Actions #26383
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.
Feature Description
Gitea should issue OIDC ID tokens for Actions jobs. By adding one's Gitea instance as an IdP in, for example, AWS IAM, it would allow jobs to assume IAM roles without the need to store AWS credentials as secrets (and the associated burden of regular rotations).
GitHub can do this: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers
GitLab too: https://docs.gitlab.com/ee/ci/cloud_services/
GitHub requires jobs to hit an endpoint defined in
$ACTIONS_ID_TOKEN_REQUEST_URL
to retrieve a token (typically via an action -- for example -- though it can be done with curl as shown in the above URL), while GitLab automatically generates one and injects it into the job's environment. I find GitLab's approach much more convenient, but I suppose Gitea would follow GitHub's approach given it's copying Actions.The basic plumbing seems to be in place already (notably OIDC Discovery), Gitea would just need to issue ID tokens with the appropriate
aud
andsub
claims.Screenshots
No response
The text was updated successfully, but these errors were encountered: