Azure / Azure/data-api-builder

Make X-MS-API-ROLE optional

Aperta
#1,240 11 commenti 1 reazione 0 assegnatari Vedi su GitHub
auth enhancement
Lingua principale
C#
Stelle
1.5k
Fork
370
Merge medio
3g 22h
PR unite (30g)
9

Descrizione

DAB currently requires developers to provide `'X-MS-API-ROLE' : 'admin'` as a header when making their requests. However, this is not intuitive for new users, and this is inconvenient for all developers. They expect the role to be used to be assumed as the highest priority, especially when they only consider RBAC (for ex, if I have both authenticated & admin, I want DAB to use admin assuming it has higher permissions).

RBAC should not require the specification of `'X-MS-API-ROLE' : 'admin'`.

I understand that the explanation provided to me was that, while we can determine the 'most permissive role' for RBAC that the user has (according to the permissions in the config), we cannot determine the most permissive policy in case a policy is applied to a role.

One method I propose is that, if policies apply to the specific query the customer made, we respect the order of the permissions as specified in the config file & match the first policy, with the option to override with the `X-MS-API-ROLE` header.

This solution would not remove any current functionality, while leaving the `X-MS-API-ROLE` header reserved for more advanced use cases (policy matching).

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

La issue non indica file né test. Inizia tracciando il comportamento esistente di RBAC e della selezione delle policy, quindi determina come devono interagire l’ordine delle autorizzazioni configurato e l’override X-MS-API-ROLE. Il lavoro è completato quando le richieste RBAC funzionano senza l’header, mentre il matching avanzato delle policy può continuare a utilizzarlo.

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

Valutazione

Stack tecnologico
csharp
Ambito
api, authorization, backend, security
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.