[B006] Service Principal FIC supports

Aperta
#1,320 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
32/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
azure, csharp

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C#
Stelle
18
Fork
10
Merge medio
1g 20h
PR unite (30g)
157

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azclips

Tutte le issue di Azure/azclips

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.