Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

token_grant: support client_id so client_credentials works with Microsoft Entra federated credentials

未關閉 適合新手
#4,372 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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 內容生成。

描述

state:triage-needed

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_id in the token endpoint's query string is ignored.
  • Without client_id in the body, Entra uses the assertion's iss as 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

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。