Allow static credential delivery to require an exact credential value format

Đang mở
#5,964 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
15/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
authentication, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Rust
Star
21.5k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/OpenShell

Tất cả issue của NVIDIA/OpenShell

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.