Allow static credential delivery to require an exact credential value format

Ouverte
#5,964 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

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

Piste de recherche

Start with the placement compiler in crates/openshell-core/src/provider_credentials.rs, where the Bearer, Basic and header styles currently map to Header placement, then read the placement tests in crates/openshell-core/src/secrets.rs. The design needs a new optional value-format constraint that is checked before credential substitution, and the work is not yet scoped. Done would mean the acceptance criteria in the issue pass, with unconstrained location-only behavior unchanged.

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

Description

state:triage-needed
User Story

I use OpenShell credential placeholders for consumers whose reviewed request contract permits a specific value format, such as Bearer or Basic Authorization, a raw API key in a named header, or a raw token in a named query parameter. I need OpenShell to enforce that format when substituting the credential.

Problem Statement

OpenShell can restrict static credential substitution to an authorized header location, but cannot independently require an exact Authorization scheme or raw-versus-prefixed header or query value format. A Provider profile using bearer, basic, or header with Authorization compiles to the same header placement.

Impact / Why This Matters

An integration can restrict the destination and header but cannot express a consumer's requirement that the credential appear only in a particular authentication format, including a raw value in a custom header or query parameter. Calling-application convention is insufficient for a proxy-enforced request contract.

Proposed Design

Let an operator configure an explicit authentication-format constraint in addition to the existing credential location. For example, a Bearer constraint permits only Authorization: Bearer <placeholder>; a Basic constraint permits the supported Basic representation, and a raw named-header or query constraint permits only the placeholder as the selected value. Preserve documented location-only behavior when no stricter constraint is selected. These examples describe desired behavior, not existing configuration syntax.

Acceptance Criteria
  • A Bearer constraint substitutes only a properly formed Bearer credential and refuses Basic or arbitrary prefixes before substitution.
  • A Basic constraint accepts the supported Basic format and refuses Bearer.
  • A raw named-header constraint refuses a prefixed or embedded placeholder.
  • An exact query-value constraint permits the reviewed raw or prefixed format only under the admitted parameter name; a duplicate occurrence does not widen that format.
  • Destination, header and query parameter restrictions remain enforced.
  • Existing unconstrained location-only behavior remains available.
Alternatives Considered

Application convention cannot enforce the reviewed contract at the proxy boundary. Middleware or interceptors could be appropriate if they can validate the exact value format before credential resolution without exposing the credential.

Agent Investigation

Observed in v0.1.9, v0.1.10 and upstream commit 1fca4c8b2ee3: the placement compiler maps these styles to Header placement. The query placement tests exercise parameter-scoped rewriting without a separate value-format constraint. The existing static header placement test explicitly accepts both Token-prefixed and Basic Authorization for that placement. This requests a stricter optional capability than the current documented location boundary.

Checklist
  • I've reviewed existing issues and the published docs.
  • This is a design proposal, not a "please build this" request.
Langage dominant
Rust
Étoiles
21.5k
Forks
2.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

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 NVIDIA/OpenShell

Toutes les issues de NVIDIA/OpenShell

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

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