Skip to content

Allow static credential delivery to require an exact credential value format #5964

Backlog

Description

@stevenlee-oai

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.

Activity

  1. added
    state:triage-needed
    on Nov 25, 2026
  2. changed the title [-]Allow static credential delivery to require an exact header value format[/-] [+]Allow static credential delivery to require an exact credential value format[/+] on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions