Allow static credential delivery to require an exact credential value format
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 15/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Rust
- 星號
- 21.5k
- 分支
- 2.1k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/OpenShell 的其他 Issue
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 86/100
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failure可能已有人在做 @TaylorMutch 於 9 天前認領。 未關閉state:accepted state:pr-opened
難度 2/5 1-3 小時 新手友好度 78/100
-
state:triage-needed
難度 1/5 1-3 小時 新手友好度 78/100
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 62/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
autofixer: follow-up
難度 2/5 1-3 小時 新手友好度 78/100
tursodatabase/turso#12531 ·
維護者通常 1 天內回覆
-
bug help wanted ui
難度 2/5 1-3 小時 新手友好度 82/100
userFRM/egui-charts#4292 ·
維護者通常 1 天內回覆
-
Issue-Bug Need-Review
難度 1/5 1-3 小時 新手友好度 85/100
PowerShell/DSC#1832 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆