feat: external OIDC tokens for self-hosted instances
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- authentication, backend-api-design
Piste de recherche
Start by tracing getExternalOidcController() and the ExternalOidcPlugin interface, then review the /api/v1/auth/oidc/token route and the existing token claims. Check how the isCloud() gate, OIDC_ISSUER_URL, and run-token setting control minting. Done means self-hosted instances can mint tokens under the stated conditions, the documented claims include the requested identifiers, and tests cover the behavior.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Is your feature request related to a problem? Please describe.
v4.8.3 added auth.getOIDCToken() and @trigger.dev/sdk/oidc/aws, but only Trigger.dev Cloud can mint the tokens. getExternalOidcController() returns null unless isCloud() is true, and the minter is loaded from the closed @triggerdotdev/plugins/oidc module. On a self-hosted instance POST /api/v1/auth/oidc/token returns 503. The open-source repo already has the rest: the OIDC_ISSUER_URL issuer, the /.well-known/jwks.json and discovery routes, the signing key service, run-token verification and the ExternalOidcPlugin interface.
Self-hosted operators are often the ones with the strictest security requirements (FedRAMP, ITAR, HIPAA). A task can only get its credentials from the environment's variables. Every run in an environment receives the same static secrets: database and API admin credentials, cloud keys and vendor tokens. Any task, or any dependency bundled into the image, can read all of them. OIDC would let a task exchange a short-lived token, valid only for one audience, for credentials scoped to that task: AWS roles through STS, token exchange with Keycloak or another IdP, Vault, or GCP and Azure workload identity. The static secrets could then leave the environment.
Describe the solution you'd like to see
- Enable external OIDC on self-hosted instances when
OIDC_ISSUER_URLis set and run tokens are on, with an open-source minter. A self-hosted operator can already provide that minter through the existing plugin interface if only theisCloud()gate is removed. - Document the token's claim set. Include
run_id,task_id,attemptanddeployment_idalongsidesub, so a verifier can authorize per task and attribute activity to a run. - Optionally, let operators add claims, such as AWS session tags (
https://aws.amazon.com/tags). That would let a multi-tenant application drive attribute-based access control from data recorded when the run was triggered.
Describe alternate solutions
- Workload identity on run pods (IRSA, EKS Pod Identity): the identity belongs to the worker group's service account, so every task in the environment gets the same role. It is AWS-only, and it doesn't identify the run or task.
- Sending the internal run token (
run+jwt) to our own exchange service: its signing keys aren't published, and its audience istrigger:apiwithadminscope. The receiving service ends up holding a Trigger API credential for the whole environment. - Shipping our own
@triggerdotdev/plugins/oidcmodule: theisCloud()check still blocks it.
Additional information
Related: #1851 (OIDC on Cloud runners). I'm happy to help with a PR.
- Langage dominant
- TypeScript
- Étoiles
- 16.5k
- Forks
- 1.5k
- Merge moyen
- 1 j 15 h
- PR mergées (30 j)
- 17
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de triggerdotdev/trigger.dev
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requestsPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
triggerdotdev/trigger.dev#5116 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a functionPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
triggerdotdev/trigger.dev#5098 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug: Side menu items lose their active state on detail pagesPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
triggerdotdev/trigger.dev#5088 ·
Les mainteneurs répondent en général sous 1 jour
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installedPeut-être à nouveau libre @itsfaryal l’a pris il y a 17 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
triggerdotdev/trigger.dev#5083 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
triggerdotdev/trigger.dev#5072 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de triggerdotdev/trigger.dev
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
bug platform-android
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Termix-SSH/Mobile#146 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
devswha/herdr-web-ui#3875 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour