New-AzRoleAssignment generates random GUID for name

Aperta
#1,163 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
azure, csharp, powershell
Ambito
cli, cloud

Direzione di ricerca

Start from src/Extensions/Resources/Customization/NewRoleAssignmentProcessor_Orchestrator.cs, where the issue says the random name is produced, and trace where the role assignment name is set when omitted. Check what scope, role definition and principal identifiers are available at that point, then compare with the Azure CLI path for az role assignment create and the deterministic scheme agreed with the Bicep team. Done means both surfaces generate the same stable GUID for the same scope/definition/principal, with tests covering omitted-name behavior.

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?

New-AzRoleAssignment generates random GUID for name. It is probably the same for az role assignment create. Source: https://github.com/Azure/azclips/blob/main/src/Extensions/Resources/Customization/NewRoleAssignmentProcessor_Orchestrator.cs

There is ongoing effort to make the name deterministic when omitted and created via various tools like Azure Portal, CLI, PS, Bicep, Terraform, etc. The name will still be guid but it will be made based on scope, definition and principal. I do not know exactly the full schedule for such release but I would guess will probably be released at the same time in the various tools including the publicly available CLI and PS. Would be good if this is implemented now on the preview cmdlets before they are released to public. As the architecture for this is already settled from various public calls with Bicep team it should be easy to implement.

Proposed solution
deterministic name when not omitted.
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.