@@ -8,47 +8,47 @@ ServiceControl instances can be configured via environment variables or App.conf
88
99### Environment Variables
1010
11- | Instance | Prefix |
12- | ----------| --------|
13- | ServiceControl (Primary) | ` SERVICECONTROL_ ` |
14- | ServiceControl.Audit | ` SERVICECONTROL_AUDIT_ ` |
15- | ServiceControl.Monitoring | ` MONITORING_ ` |
11+ | Instance | Prefix |
12+ | --------------------------- | ----------------- --------|
13+ | ServiceControl (Primary) | ` SERVICECONTROL_ ` |
14+ | ServiceControl.Audit | ` SERVICECONTROL_AUDIT_ ` |
15+ | ServiceControl.Monitoring | ` MONITORING_ ` |
1616
1717#### Core Settings
1818
19- | Setting | Default | Description |
20- | ---------| ---------| -------------|
21- | ` {PREFIX}AUTHENTICATION_ENABLED ` | ` false ` | Enable JWT authentication |
22- | ` {PREFIX}AUTHENTICATION_AUTHORITY ` | (none) | OpenID Connect authority URL (e.g., ` https://login.microsoftonline.com/{tenant-id}/v2.0 ` ) |
23- | ` {PREFIX}AUTHENTICATION_AUDIENCE ` | (none) | The audience identifier (typically your API identifier or client ID) |
19+ | Setting | Default | Description |
20+ | ------------------------------------ | ---------| ------------------------------------------------------------------------------ -------------|
21+ | ` {PREFIX}AUTHENTICATION_ENABLED ` | ` false ` | Enable JWT authentication |
22+ | ` {PREFIX}AUTHENTICATION_AUTHORITY ` | (none) | OpenID Connect authority URL (e.g., ` https://login.microsoftonline.com/{tenant-id}/v2.0 ` ) |
23+ | ` {PREFIX}AUTHENTICATION_AUDIENCE ` | (none) | The audience identifier (typically your API identifier or client ID) |
2424
2525#### Validation Settings
2626
27- | Setting | Default | Description |
28- | ---------| ---------| -------------|
29- | ` {PREFIX}AUTHENTICATION_VALIDATEISSUER ` | ` true ` | Validate the token issuer |
30- | ` {PREFIX}AUTHENTICATION_VALIDATEAUDIENCE ` | ` true ` | Validate the token audience |
31- | ` {PREFIX}AUTHENTICATION_VALIDATELIFETIME ` | ` true ` | Validate token expiration |
32- | ` {PREFIX}AUTHENTICATION_VALIDATEISSUERSIGNINGKEY ` | ` true ` | Validate the signing key |
33- | ` {PREFIX}AUTHENTICATION_REQUIREHTTPSMETADATA ` | ` true ` | Require HTTPS for OIDC metadata endpoint |
27+ | Setting | Default | Description |
28+ | --------------------------------------------------- | ---------| ----------------------------- -------------|
29+ | ` {PREFIX}AUTHENTICATION_VALIDATEISSUER ` | ` true ` | Validate the token issuer |
30+ | ` {PREFIX}AUTHENTICATION_VALIDATEAUDIENCE ` | ` true ` | Validate the token audience |
31+ | ` {PREFIX}AUTHENTICATION_VALIDATELIFETIME ` | ` true ` | Validate token expiration |
32+ | ` {PREFIX}AUTHENTICATION_VALIDATEISSUERSIGNINGKEY ` | ` true ` | Validate the signing key |
33+ | ` {PREFIX}AUTHENTICATION_REQUIREHTTPSMETADATA ` | ` true ` | Require HTTPS for OIDC metadata endpoint |
3434
3535#### ServicePulse Settings (Primary Instance Only)
3636
3737These settings are required on the primary ServiceControl instance to provide authentication configuration to ServicePulse clients.
3838
39- | Setting | Default | Description |
40- | ---------| ---------| -------------|
41- | ` {PREFIX}AUTHENTICATION_SERVICEPULSE_CLIENTID ` | (none) | Client ID for ServicePulse application |
42- | ` {PREFIX}AUTHENTICATION_SERVICEPULSE_AUTHORITY ` | (none) | Authority URL for ServicePulse (defaults to main Authority if not set) |
43- | ` {PREFIX}AUTHENTICATION_SERVICEPULSE_APISCOPES ` | (none) | JSON array of API scopes (e.g., ` ["api://servicecontrol/access_as_user"] ` ) |
39+ | Setting | Default | Description |
40+ | ------------------------------------------------- | ---------| ------------------------------------------------------------------------------------------- -------------|
41+ | ` {PREFIX}AUTHENTICATION_SERVICEPULSE_CLIENTID ` | (none) | Client ID for ServicePulse application |
42+ | ` {PREFIX}AUTHENTICATION_SERVICEPULSE_AUTHORITY ` | (none) | Authority URL for ServicePulse (defaults to main Authority if not set) |
43+ | ` {PREFIX}AUTHENTICATION_SERVICEPULSE_APISCOPES ` | (none) | JSON array of API scopes for ServicePulse to request (e.g., ` ["api://servicecontrol/access_as_user"] ` ) |
4444
4545### App.config
4646
47- | Instance | Key Prefix |
48- | ----------| ------------|
49- | ServiceControl (Primary) | ` ServiceControl/ ` |
50- | ServiceControl.Audit | ` ServiceControl.Audit/ ` |
51- | ServiceControl.Monitoring | ` Monitoring/ ` |
47+ | Instance | Key Prefix |
48+ | --------------------------- | ------------- ------------|
49+ | ServiceControl (Primary) | ` ServiceControl/ ` |
50+ | ServiceControl.Audit | ` ServiceControl.Audit/ ` |
51+ | ServiceControl.Monitoring | ` Monitoring/ ` |
5252
5353``` xml
5454<appSettings >
@@ -66,7 +66,7 @@ These settings are required on the primary ServiceControl instance to provide au
6666
6767 <!-- ServicePulse Settings (Primary Instance Only) -->
6868 <add key =" ServiceControl/Authentication.ServicePulse.ClientId" value =" {servicepulse-client-id}" />
69- <add key =" ServiceControl/Authentication.ServicePulse.ApiScopes" value =" [" api://servicecontrol/access_as_user" ]" />
69+ <add key =" ServiceControl/Authentication.ServicePulse.ApiScopes" value =" [" api://servicecontrol/access_as_user" ]" />
7070</appSettings >
7171```
7272
@@ -85,7 +85,7 @@ set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=["api://servicecontrol/
8585### Docker Example
8686
8787``` cmd
88- docker run -p 33333:33333 -e SERVICECONTROL_AUTHENTICATION_ENABLED=true -e SERVICECONTROL_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenant-id}/v2.0 -e SERVICECONTROL_AUTHENTICATION_AUDIENCE=api://servicecontrol -e SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID={servicepulse-client-id} -e " SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=[\ "api://servicecontrol/.default\"]" particular/servicecontrol:latest
88+ docker run -p 33333:33333 -e SERVICECONTROL_AUTHENTICATION_ENABLED=true -e SERVICECONTROL_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenant-id}/v2.0 -e SERVICECONTROL_AUTHENTICATION_AUDIENCE=api://servicecontrol -e SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID={servicepulse-client-id} -e SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=["api://servicecontrol/access_as_user"] particular/servicecontrol:latest
8989```
9090
9191### Audit and Monitoring Instances
@@ -117,10 +117,10 @@ When authentication is enabled:
117117
118118The following endpoints are accessible without authentication, even when authentication is enabled:
119119
120- | Endpoint | Purpose |
121- | ----------| ---------|
122- | ` /api ` | API root/discovery - returns available endpoints and API information |
123- | ` /api/authentication/configuration ` | Returns authentication configuration for clients like ServicePulse |
120+ | Endpoint | Purpose |
121+ | ------------------------------------- | ------------------------------------------------------------- ---------|
122+ | ` /api ` | API root/discovery - returns available endpoints and API information |
123+ | ` /api/authentication/configuration ` | Returns authentication configuration for clients like ServicePulse |
124124
125125These endpoints must remain accessible so clients can discover API capabilities and obtain the authentication configuration needed to acquire tokens.
126126
@@ -157,13 +157,13 @@ When authentication is enabled, HTTPS is strongly recommended for production dep
157157
158158The default validation settings are recommended for production:
159159
160- | Setting | Recommendation |
161- | ---------| ----------------|
162- | ` ValidateIssuer ` | ` true ` - Prevents tokens from untrusted issuers |
163- | ` ValidateAudience ` | ` true ` - Prevents tokens intended for other applications |
164- | ` ValidateLifetime ` | ` true ` - Prevents expired tokens |
165- | ` ValidateIssuerSigningKey ` | ` true ` - Ensures token signature is valid |
166- | ` RequireHttpsMetadata ` | ` true ` - Ensures OIDC metadata is fetched securely |
160+ | Setting | Recommendation |
161+ | ---------------------------- | ------------------------------------------ ----------------|
162+ | ` ValidateIssuer ` | ` true ` - Prevents tokens from untrusted issuers |
163+ | ` ValidateAudience ` | ` true ` - Prevents tokens intended for other applications |
164+ | ` ValidateLifetime ` | ` true ` - Prevents expired tokens |
165+ | ` ValidateIssuerSigningKey ` | ` true ` - Ensures token signature is valid |
166+ | ` RequireHttpsMetadata ` | ` true ` - Ensures OIDC metadata is fetched securely |
167167
168168### Development Settings
169169
@@ -181,7 +181,7 @@ When `RequireHttpsMetadata` is `true` (the default), the Authority URL must use
181181
182182## Configuring Identity Providers
183183
184- ### Microsoft Entra ID (Azure AD)
184+ ### Microsoft Entra ID Setup
185185
1861861 . Register an application in Azure AD for ServiceControl API
1871872 . Register a separate application for ServicePulse (SPA)
@@ -200,11 +200,11 @@ ServiceControl works with any OIDC-compliant provider. Configure:
200200
201201The primary ServiceControl instance requires ServicePulse settings because it serves the ` /api/auth/config ` endpoint that ServicePulse uses to configure its authentication. Audit and Monitoring instances only need the core authentication settings.
202202
203- | Instance | Requires ServicePulse Settings |
204- | ----------| -------------------------------|
205- | ServiceControl (Primary) | Yes |
206- | ServiceControl.Audit | No |
207- | ServiceControl.Monitoring | No |
203+ | Instance | Requires ServicePulse Settings |
204+ | --------------------------- | - -------------------------------|
205+ | ServiceControl (Primary) | Yes |
206+ | ServiceControl.Audit | No |
207+ | ServiceControl.Monitoring | No |
208208
209209## See Also
210210
0 commit comments