[B006] Service Principal FIC supports

オープン
#1,320 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
azure, csharp

調査の方向性

Start from the login command's --service-principal option handling and find where the client secret or certificate is turned into a credential before the tenant and client id are used. That is where a --federated-token option would be parsed and passed to a client-assertion-style credential; check whether the MSAL (or equivalent) dependency already exposes federated/workload-identity auth. Done means the flag is accepted, documented and covered by a test asserting the token is used instead of a secret.

索引モデルが issue の本文から書いたものです。

説明

act-identity-squad
Target surface

Both

What problem are you trying to solve?

not sure if it's a valid scenario for azclips.

When signing as a service principal, except "client secret" and "client certificate", it can also configure a FIC

Image

an example scenario is:

  1. an AAD app, with permission a to sub, and congiured FIC to trust a managed identity
Image
  1. a managed identity, w/o any permission, but assigned to a VM/container
  2. when the app (azclips here) runs in the VM/container, it can receive a token from the managed identity, then use that token to authenticate as the service principal
  3. Azclips can act as the service principal's identity

reference doc: https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity?tabs=microsoft-entra-admin-center%2Cdotnet

Proposed solution

when authenticating, the client id is the service principal's id, but the federated-token is issued by the managed identity

          "$AZCLI" login --service-principal \
            --client-id "${{ vars.AZURE_CLIENT_ID }}" \
            --federated-token "${{ steps.idtoken.outputs.result }}" \
            --tenant-id "${{ vars.AZURE_TENANT_ID }}" \
            --subscription-id "${{ vars.AZURE_SUBSCRIPTION_ID }}"

if the underlying dependency is MSAL, it shall be already supports this scenario.

Alternatives or workarounds

No response

Additional context

No response

主要言語
C#
スター
18
フォーク
10
平均マージ
1日 20時間
マージ済み PR(30日)
157

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azclips のほかの issue

Azure/azclips の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。