Skip to content

Commit 5f42178

Browse files
CopilotJamesNK
andauthored
Document ClaimActions configuration for dashboard OpenID Connect authentication (#5192)
* Initial plan * Document ClaimActions configuration for dashboard OIDC authentication Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> * Apply suggestion from @JamesNK * Apply suggestion from @JamesNK * Apply suggestion from @JamesNK * Update configuration.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> Co-authored-by: James Newton-King <james@newtonking.com>
1 parent 50702e9 commit 5f42178

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

docs/fundamentals/dashboard/configuration.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Aspire dashboard configuration
33
description: Aspire dashboard configuration options
4-
ms.date: 04/15/2025
4+
ms.date: 10/10/2025
55
ms.topic: reference
66
---
77

@@ -91,6 +91,7 @@ Browser token authentication works by the frontend asking for a token. The token
9191
| `Dashboard:Frontend:OpenIdConnect:UsernameClaimType` | `preferred_username` | Specifies one or more claim types that should be used to display the authenticated user's username. Can be a single claim type or a comma-delimited list of claim types. |
9292
| `Dashboard:Frontend:OpenIdConnect:RequiredClaimType` | `null` | Specifies the claim that must be present for authorized users. Authorization fails without this claim. This value is optional. |
9393
| `Dashboard:Frontend:OpenIdConnect:RequiredClaimValue` | `null` | Specifies the value of the required claim. Only used if `Dashboard:Frontend:OpenIdConnect:RequireClaimType` is also specified. This value is optional. |
94+
| `Dashboard:Frontend:OpenIdConnect:ClaimActions` | `null` | A collection of claim actions to configure how claims are mapped from the OpenID Connect user info endpoint. Each claim action can map JSON properties to claims. This value is optional. |
9495
| `Authentication:Schemes:OpenIdConnect:Authority` | `null` | URL to the identity provider (IdP). |
9596
| `Authentication:Schemes:OpenIdConnect:ClientId` | `null` | Identity of the relying party (RP). |
9697
| `Authentication:Schemes:OpenIdConnect:ClientSecret` | `null` | A secret that only the real RP would know. |
@@ -101,6 +102,44 @@ Browser token authentication works by the frontend asking for a token. The token
101102
>
102103
> For more information, see [Configure ASP.NET Core to work with proxy servers and load balancers](/aspnet/core/host-and-deploy/proxy-load-balancer).
103104
105+
### Claim actions
106+
107+
Claim actions configure how claims are mapped from the JSON returned by the OpenID Connect user info endpoint to the user's claims identity. Each claim action in the `Dashboard:Frontend:OpenIdConnect:ClaimActions` collection supports the following properties:
108+
109+
| Property | Description |
110+
|--|--|
111+
| `ClaimType` (required) | The claim type to create. |
112+
| `JsonKey` (required) | The JSON key to map from. |
113+
| `SubKey` (optional) | The sub-key within the JSON key to map from. Used when the value is nested within another JSON object. |
114+
| `IsUnique` (optional) | When `true`, ensures only one claim of this type exists. If a claim already exists, it won't be added again. Defaults to `false`. |
115+
| `ValueType` (optional) | The claim value type. Defaults to `string`. |
116+
117+
The following example shows how to configure claim actions using JSON configuration:
118+
119+
```json
120+
{
121+
"Dashboard": {
122+
"Frontend": {
123+
"OpenIdConnect": {
124+
"ClaimActions": [
125+
{
126+
"ClaimType": "role",
127+
"JsonKey": "role"
128+
}
129+
]
130+
}
131+
}
132+
}
133+
}
134+
```
135+
136+
Or using environment variables for configuration:
137+
138+
```bash
139+
export Dashboard__Frontend__OpenIdConnect__ClaimActions__0__ClaimType="role"
140+
export Dashboard__Frontend__OpenIdConnect__ClaimActions__0__JsonKey="role"
141+
```
142+
104143
## OTLP authentication
105144

106145
The OTLP endpoint authentication is configured with `Dashboard:Otlp:AuthMode`. The OTLP endpoint can be secured with an API key or [client certificate](/aspnet/core/security/authentication/certauth) authentication.

0 commit comments

Comments
 (0)