| Document status | 35 - Reviewed |
|---|
Domain Routing and Authentication
This document describes the Azure Front Door endpoint configuration and Entra ID (Azure AD) redirect URIs for the EnergyConnect platform.
Overview
EnergyConnect uses Azure Front Door as a global load balancer and CDN to route traffic to the appropriate backend services. Each customer/environment combination has dedicated Front Door endpoints to ensure complete isolation between:
- Client Application - Angular SPA for the main EnergyConnect UI
- Documentation Application - React Docusaurus-based documentation site (where enabled)
Both applications use MSAL (Microsoft Authentication Library) for client-side authentication against a shared Entra ID App Registration.
Front Door Endpoints
Naming Convention
| Service | Endpoint Name Pattern |
|---|---|
| Client | ec-{customer}-{environment}-fde |
| Docs | ec-{customer}-{environment}-docs-fde |
Front Door Architecture
Key Design Decisions
-
Separate Endpoints - Client and Docs have separate Front Door endpoints to ensure complete isolation. This prevents deployment of one service from affecting the other.
-
Separate Origin Groups - Each service has its own origin group (
{customer}-{environment}-origin-groupvs{customer}-{environment}-docs-origin-group). -
Separate Routes - Each custom domain is routed to its specific origin group via a dedicated route.
Entra ID App Registration
Both the Client and Documentation applications share a single Entra ID App Registration per customer/environment. This allows users to have consistent roles and permissions across both applications.
App Registration Naming
{ENVIRONMENT}.{CUSTOMER}.EnergyConnect.3.0.Client.Auth
SPA Redirect URIs
The App Registration is configured with SPA (Single Page Application) redirect URIs for MSAL authentication.
Authentication Flow
- User accesses the application via the custom domain
- Front Door routes the request to the appropriate Container App
- If not authenticated, MSAL redirects to Entra ID login
- After successful login, Entra ID redirects back to
/authwith an authorization code - MSAL exchanges the code for tokens and stores them in session storage
Required App Role(s)
To access the Documentation application the users must have the app role MeteringPointReader assigned via Entra ID Groups. This role as can be granted through membership of any of the 4 Application Entra ID groups.
To access the Client application, the endpoints of the application requires various roles. 9 Different app roles exist and controls user access in the client application.