server: accept sign-in tokens from more than one OIDC issuer

Ouverte
#587 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, openapi

Piste de recherche

Start with packages/pivotkit-server/src/options/http.js and read the existing auth.issuer and tokenUrl handling. First verify whether the identity provider supports RFC 8693 exchange with a subject token from another provider and whether PowerShell Universal passes the user's access token to a script; the issue says exchange routing depends on those findings. Done means supporting issuer-specific audiences, scopes and keys, routing exchanges to the issuing issuer, restricting which issuers each source may exchange, and preserving auth.issuer compatibility.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area:server enhancement

pivotkit-server accepts sign-in tokens from one OIDC issuer (auth.issuer). Authentik gives each provider an issuer of its own by default. So a server that should accept tokens from two Authentik providers needs one of these today:

  • Authentik reconfigured to "issuer mode: global", with both providers signing with the same key;
  • or every client on one provider.

A typical case: PowerShell Universal passes on its user's token from its own provider, and Claude Code signs in through a second, public client.

Proposal: auth.issuers, a list of issuers.

  • Each issuer has its own audience, required scopes and key set (jwksUri or discovery).
  • A token exchange (sources.<id>.http.auth.tokenExchange) goes to the token endpoint of the issuer that issued the subject token, not always to auth.issuer's. Today tokenUrl defaults to auth.issuer's token endpoint (packages/pivotkit-server/src/options/http.js).
  • A source names the issuers whose tokens it may exchange. A token from another issuer is never passed on to that backend.
  • The docs recommend a pivotkit scope of its own per issuer (requiredScopes). If the audience is another application's client ID, every token issued to that application would otherwise be valid at pivotkit.
  • auth.issuer keeps working as the one-issuer form.

Before building it, check:

  • whether the identity provider accepts a token exchange (RFC 8693) with a subject token from another provider;
  • whether PowerShell Universal hands the signed-in user's access token to a script.

The design of the exchange routing depends on what that check shows.

Related: #441, a download sign-in with an issuer of its own.

Langage dominant
JavaScript
Étoiles
1
Forks
1
Merge moyen
3 h 21 min
PR mergées (30 j)
250

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de eizedev/pivotkit

Toutes les issues de eizedev/pivotkit

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.