token_grant: support client_id so client_credentials works with Microsoft Entra federated credentials
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 70/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- azure, rust
研究方向
從 crates/openshell-core/src/oauth.rs 中的 TokenGrantParams 開始,它會根據 client_assertion、client_assertion_type、audience 和 scope 建立表單主體。新增一個選用欄位 client_id,只有在設定時才將其作為表單欄位包含在內,現有請求保持不變。完成標準是:帶有 client_id 的 token_grant 設定會將其送入主體,而沒有 client_id 的設定送出的主體與之前相同;尋找現有的 token 請求測試並加以擴充。
由索引模型根據 Issue 內容生成。
描述
We're trying to use token_grant with client_credentials against Microsoft Entra ID, with the sandbox's SPIFFE JWT-SVID as the client assertion. Entra supports this through federated identity credentials (https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-spiffe-spire), but it needs client_id in the request body to pick the app registration.
TokenGrantParams in crates/openshell-core/src/oauth.rs only sends client_assertion, client_assertion_type, audience and scope, so there's no way to set it. We tried two workarounds against Entra:
client_idin the token endpoint's query string is ignored.- Without
client_idin the body, Entra uses the assertion'sissas the app identifier and fails with AADSTS700016.
Could token_grant take an optional client_id that's sent as a form field? Something like:
credentials:
- name: graph_access_token
auth_style: bearer
header_name: Authorization
token_grant:
token_endpoint: https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token
client_id: <app id>
jwt_svid_audience: api://AzureADTokenExchange
scopes: [https://graph.microsoft.com/.default]
Without it we need a small broker in front of Entra just to add one field. Happy to send a PR if this sounds reasonable.
- 主要語言
- Rust
- 星號
- 16.3k
- 分支
- 1.8k
- 平均合併
- 2 天 5 小時
- 30 天內合併 PR
- 402
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/OpenShell 的其他 Issue
-
bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhost可能重新可做 關聯的 PR 已關閉且未合併。 未關閉state:triage-needed
難度 2/5 1-3 小時 新手友好度 65/100
NVIDIA/OpenShell#4518 · 1 則留言 ·
維護者通常 1 天內回覆
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloaded未關閉state:triage-needed
難度 2/5 1-3 小時 新手友好度 72/100
NVIDIA/OpenShell#4515 · 1 則留言 ·
維護者通常 1 天內回覆
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 72/100
NVIDIA/OpenShell#4509 · 1 則留言 ·
維護者通常 1 天內回覆
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
相似的 Issue
-
documentation good first issue
難度 2/5 半天 新手友好度 72/100
sujithputta02/Esapay#13 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
tursodatabase/turso#10002 ·
維護者通常 1 天內回覆
-
needs triage
難度 2/5 1-3 小時 新手友好度 72/100
topgrade-rs/topgrade#2419 ·
維護者通常 1 天內回覆
-
review-bot
難度 2/5 1-3 小時 新手友好度 72/100
midagedev/bloomery#318 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
Chia-Network/clvm_rs#863 ·
維護者通常 1 天內回覆