Azure / data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.
https://aka.ms/dab/docs
MIT License
900 stars 181 forks source link

⭐ [Enhancement]: Add authentication.provider synonyms. #2407

Open JerryNixon opened 4 days ago

JerryNixon commented 4 days ago

Update runtime.host.authentication.provider with synonyms for future planning.

These are already accounted for in the application_name specification.

Values

Current New Synonyms
StaticWebApp None
AppService
AzureAd EntraId, OAuth
Simulator

Tasks

None

Some Data API implementations don't require any security at all. There is no option for None, although StaticWebApp handles this in most cases. The truth is, this is slightly more like Simulator except it behaves the opposite—Simulator treats everything as authenticated but none will treat everything as anonymous.

EntraId

Azure Active Directory was renamed to Microsoft Entra Identity. We will retain the previous AzureAd moniker for backward compatibility, but it will be marked as deprecated in the documentation once this synonym is available.

OAuth

Currently, AzureAd is just a simple OAuth implementation, and any custom JWT implementation can use it to handle claims. However, it’s far from ideal to make customers choose AzureAd or EntraId when their underlying authentication technology is not from Microsoft. This also opens up a future direction should we need to handle special cases with EntraId.

abhishekkumams commented 1 day ago

Introducing synonyms like EntraId and OAuth definitly provides flexibility, also it sounds more intuitive.

Some Questions:

  1. @seantleonard , what complexities does it add in the underlying implementation?
  2. do we plan to completely deprecate AzureAd in future?
  3. Can you add some more explaination on None being similar to Simulator but treated as authenticated?
JerryNixon commented 1 day ago

Do we plan to completely deprecate AzureAd in future?

Deprecate? Yes. Remove? Probably not. @abhishekkumams

Can you add some more explanation?

Typo corrected: none will treat everything as anonymous.

JerryNixon commented 1 day ago

Should permissions:* be optional in an entity? Or at least defaulted?