mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-05 00:39:38 +03:00
🚀 Feature: Workload identity federation #554
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yyuemii on GitHub (Nov 29, 2025).
Feature description
Workload identity federation would allow for automation to authenticate with Pocket through an OIDC identity from another provider. An admin could create an OIDC Client and define a federated issuer, acceptable claims/subjects, and an audience (example of Azure Entra ID setup with AWS Cognito):

This is somewhat related to #902 where this seemingly used to be possible before federation was brought more in line with RFC 7523 (using
subasclient_id). While you could workaround this by setting a custom client ID in some cases, several providers include invalid characters in theirsubsuch as GitHub:I'd be happy to contribute to implementing this since it would benefit my personal use case significantly. Apologies if this is out of scope!
Pitch
Workload identity federation would simplify the process of accessing services from automation (ci/cd, cloud machines) while at the same time improving security by reducing the need for storing secrets. For example:
iss,sub(or claims), andaudmatches, before finally exchanging the identity a client token with access to internal services, kubernetes, etc.Providers like AWS, Azure, and Google Cloud have also implemented similar solutions for exchanging OIDC identities for access to their resources:
@vsarunas commented on GitHub (Dec 3, 2025):
Yes also just tried to authenticate a CLI tool using a Federated GitHub OIDC Token that can be retrieved using:
Decode token and try to authenticate locally:
Results in logs:
@michaelbeaumont commented on GitHub (Dec 18, 2025):
How is this different than the existing federated identity feature? See https://pocket-id.org/docs/guides/oidc-client-authentication#using-federated-client-credentials
#902 is about violation of the RFC along with a bug that has gone unsolved.
There is no new feature here, it's about solving existing bugs
@yyuemii commented on GitHub (Dec 18, 2025):
I mentioned this in the description of this request; it seemingly used to be possible with the existing federated identity feature before it was brought closer in line with the RFC, which was highlighted in that issue:
Workload identity federation is different than RFC 7523 as the
subvalue will likely always be different then theclient_idsince it's more for identifying a running workload. As an example a GitHub Actions ID token contains asubwith the organization, repo, and environment it's running for.@michaelbeaumont commented on GitHub (Dec 18, 2025):
That breakage was unintentional, it was not intentionally brought closer to the RFC, that's the discussion in #902. It's completely broken at the moment anyway, even for RFC 7523.
What you're asking for is basically what the original feature was actually intended to do/how it was originally implemented https://github.com/pocket-id/pocket-id/issues/361
@michaelbeaumont commented on GitHub (Dec 18, 2025):
To clarify, how exactly do you want to interact with Pocket ID using this token?
@yyuemii commented on GitHub (Dec 19, 2025):
Pocket would validate the incoming workload identity token and return a client credentials access token, without the need for the source of the workload (ex: github actions workflow) to store a client/secret pair. I linked a few articles in the original description that explain the concept.
@michaelbeaumont commented on GitHub (Dec 19, 2025):
Yeah this is just a duplicate of the existing issues. There's no reason to not follow RFC7523 except that pocket ID doesn't allow you to authenticate an
(issuer, sub), one of the suggestions from #902. The only reason one even imagines needing a separate client ID is to use as a pointer to a configuration in pocket ID.@yyuemii commented on GitHub (Dec 19, 2025):
I would disagree that this is a duplicate if Pocket were to follow the RFC, since for workload identity in most cases you would have a different
subdefined by a cloud provider then theclient_id, violating the RFC. This is a seperate flow that can be seen in Azure Entra, AWS Cognito, etc. and I haven't seen any other issues requesting it specifically.@michaelbeaumont commented on GitHub (Dec 19, 2025):
But the client ID is defined by what you configure in Pocket ID. If you just let the (issuer, sub) combination authenticate, you don't need a client_id.