[B006] Service Principal FIC supports

Abierto
#1,320 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
32/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
azure, csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C#
Estrellas
18
Forks
10
Merge medio
1 d 20 h
PR fusionados (30 d)
157

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/azclips

Todos los issues de Azure/azclips

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.