identityserver-dcr
Configuring Dynamic Client Registration (DCR) in Duende IdentityServer: endpoint setup, authorization policies, custom validation with DynamicClientRegistrationValidator, software statement validation, IClientConfigurationStore, and separate DCR hosting.
What this skill does
# Dynamic Client Registration (DCR)
## When to Use This Skill
- Setting up Dynamic Client Registration (DCR) at `/connect/dcr`
- Securing the DCR endpoint with authorization policies
- Customizing DCR validation with `DynamicClientRegistrationValidator`
- Implementing software statement validation
- Persisting dynamically registered clients with `IClientConfigurationStore`
- Hosting DCR in a separate application from IdentityServer
## Core Principles
- DCR requires the `Duende.IdentityServer.Configuration` NuGet package
- Requires **Business Edition** or higher license
- Always secure the `/connect/dcr` endpoint with an authorization policy — never expose it unauthenticated
- Enforce PKCE and restrict allowed grant types in the DCR validator
- Use persistent stores (database) for dynamically registered clients in production
Docs: https://docs.duendesoftware.com/identityserver/configuration/dcr
## Overview
Dynamic Client Registration allows clients to register themselves at the `/connect/dcr` endpoint per RFC 7591. This feature requires the **Business Edition** or higher and has been available since version 6.3.
DCR uses a separate NuGet package and can be hosted in the same application as IdentityServer or in a separate host.
### Setup
```bash
dotnet add package Duende.IdentityServer.Configuration
```
```csharp
// Program.cs
builder.Services.AddIdentityServer()
.AddInMemoryClients(Config.Clients)
.AddInMemoryIdentityResources(Config.IdentityResources)
.AddInMemoryApiScopes(Config.ApiScopes);
builder.Services.AddIdentityServerConfiguration();
var app = builder.Build();
app.UseIdentityServer();
app.UseAuthorization();
app.MapDynamicClientRegistration();
app.Run();
```
### Securing the DCR Endpoint
Apply standard ASP.NET Core authorization policies to the DCR endpoint:
```csharp
// Using JWT bearer for the DCR endpoint
builder.Services.AddAuthentication()
.AddJwtBearer("dcr", options =>
{
options.Authority = "https://identity.example.com";
options.Audience = "IdentityServer.Configuration";
options.TokenValidationParameters.ValidTypes = ["at+jwt"];
});
builder.Services.AddAuthorization(options =>
{
options.AddPolicy("dcr", policy =>
{
policy.AddAuthenticationSchemes("dcr");
policy.RequireAuthenticatedUser();
policy.RequireClaim("scope", "IdentityServer.Configuration");
});
});
app.MapDynamicClientRegistration()
.RequireAuthorization("dcr");
```
### DCR Request and Response
**Registration request:**
```
POST /connect/dcr HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access_token>
{
"client_name": "My Dynamic App",
"redirect_uris": ["https://app.example.com/callback"],
"grant_types": ["authorization_code"],
"response_types": ["code"],
"token_endpoint_auth_method": "client_secret_basic"
}
```
**Registration response:**
```json
{
"client_id": "generated-client-id",
"client_secret": "generated-secret",
"client_name": "My Dynamic App",
"redirect_uris": ["https://app.example.com/callback"],
"grant_types": ["authorization_code"],
"response_types": ["code"],
"registration_client_uri": "https://identity.example.com/connect/dcr?client_id=generated-client-id",
"registration_access_token": "..."
}
```
### Customizing DCR Validation
Extend `DynamicClientRegistrationValidator` to add custom validation logic:
```csharp
public class CustomDcrValidator : DynamicClientRegistrationValidator
{
protected override Task ValidateGrantTypesAsync(
DynamicClientRegistrationContext context)
{
// Only allow authorization_code
var grantTypes = context.Request.GrantTypes;
if (grantTypes.Any(gt => gt != "authorization_code"))
{
context.SetError("Grant type not allowed");
return Task.CompletedTask;
}
return base.ValidateGrantTypesAsync(context);
}
protected override Task ValidateRedirectUrisAsync(
DynamicClientRegistrationContext context)
{
// Enforce HTTPS redirect URIs
var uris = context.Request.RedirectUris;
if (uris.Any(u => !u.StartsWith("https://", StringComparison.OrdinalIgnoreCase)))
{
context.SetError("Redirect URIs must use HTTPS");
return Task.CompletedTask;
}
return base.ValidateRedirectUrisAsync(context);
}
protected override Task SetClientDefaultsAsync(
DynamicClientRegistrationContext context)
{
// Set defaults for dynamically registered clients
var client = context.Client;
client.RequirePkce = true;
client.AllowOfflineAccess = false;
client.AccessTokenLifetime = 300; // 5 minutes
return base.SetClientDefaultsAsync(context);
}
}
```
Register:
```csharp
builder.Services.AddIdentityServerConfiguration()
.AddDynamicClientRegistrationValidator<CustomDcrValidator>();
```
### DynamicClientRegistrationContext
The context object passed to validation methods contains:
| Property | Purpose |
| --------- | ----------------------------------------------------- |
| `Client` | The IdentityServer `Client` being built |
| `Request` | The raw DCR request |
| `Caller` | The `ClaimsPrincipal` of the authenticated DCR caller |
| `Items` | Dictionary for passing data between validation steps |
### Software Statements
Software statements are signed JWTs that contain pre-approved client metadata. Validate them by overriding `ValidateSoftwareStatementAsync`:
```csharp
public class SoftwareStatementDcrValidator : DynamicClientRegistrationValidator
{
protected override async Task ValidateSoftwareStatementAsync(
DynamicClientRegistrationContext context)
{
var softwareStatement = context.Request.SoftwareStatement;
if (string.IsNullOrEmpty(softwareStatement))
{
context.SetError("Software statement required");
return;
}
var handler = new JsonWebTokenHandler();
var validationResult = await handler.ValidateTokenAsync(
softwareStatement,
new TokenValidationParameters
{
ValidIssuer = "https://trusted-authority.example.com",
IssuerSigningKeys = await GetTrustedKeysAsync(),
ValidateLifetime = true
});
if (!validationResult.IsValid)
{
context.SetError("Invalid software statement");
return;
}
// Apply claims from software statement to the client
var claims = validationResult.ClaimsIdentity;
context.Client.ClientName = claims.FindFirst("software_name")?.Value;
await base.ValidateSoftwareStatementAsync(context);
}
}
```
### Other DCR Extensibility Points
| Interface | Purpose |
| --------------------------------------------- | ---------------------------------------- |
| `IDynamicClientRegistrationRequestProcessor` | Process the DCR request (extend default) |
| `IDynamicClientRegistrationResponseGenerator` | Customize the DCR response |
### Client Configuration Store
DCR needs a persistent store for dynamically registered clients. Use the Entity Framework implementation:
```bash
dotnet add package Duende.IdentityServer.Configuration.EntityFramework
```
```csharp
builder.Services.AddIdentityServerConfiguration()
.AddClientConfigurationStore();
```
Or implement `IClientConfigurationStore` for a custom backing store:
```csharp
public class CustomClientConfigurationStore : IClientConfigurationStore
{
public async Task AddAsync(Client client)
{
// Persist the dynamically registered client
}
public async Task<Client?> FindByClientIdAsync(string clientId)
{
// Retrieve a dynamically registRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.