Skip to content

Authentication Enhancement -> App Service Environment Check #596

@seantleonard

Description

@seantleonard

Note: StaticWebApps does not provide the ability to check host environment variables to detect whether the engine is running in a Static Web Apps environment. This capability, therefore, is only available in AppService environments.

Summary

Runtime Config: Auth-> AppService
When DataGateway Runtime starts, we may want to check server host environment variables to see if the environment is SWA. Even though we don't check x-ms-client-principal header if AppService easyAuth are configured, this would be an additional sanity check to prevent users from accidentally hosting in the wrong mode, opening them up to potential security issues.

Idea follows model of Microsoft.Identity.Web: https://github.com/AzureAD/microsoft-identity-web/blob/4085a499afb8be6e02c5d24182cbdbc5a35a4031/src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationInformation.cs

  • Add test to ensure that if we are using jwt auth, we are not looking at that header, and vice versa.

Metadata

Metadata

Assignees

Labels

authsecurityswa-integrationchanges related to swa integrationusabilityMake the APIs more user friendly with better exceptions

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions