From 0ed1e807d714a1adbde6f6d16e2183062d35e496 Mon Sep 17 00:00:00 2001 From: roland Date: Fri, 10 Apr 2026 10:18:48 +0200 Subject: [PATCH] Add Aspire seed command + v8 migration --- .../IdentityServer.AppHost/AppHost.cs | 40 + .../IdentityServer.AppHost/AppHost.cs | 39 + .../20260410081252_update.Designer.cs | 1294 +++++++++++++++++ .../ConfigurationDb/20260410081252_update.cs | 175 +++ .../ConfigurationDbContextModelSnapshot.cs | 229 ++- 5 files changed, 1776 insertions(+), 1 deletion(-) create mode 100644 IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.Designer.cs create mode 100644 IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.cs diff --git a/IdentityServer/v7/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs b/IdentityServer/v7/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs index 5b807133..23343d6b 100644 --- a/IdentityServer/v7/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs +++ b/IdentityServer/v7/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs @@ -1,5 +1,45 @@ var builder = DistributedApplication.CreateBuilder(args); var idsvr = builder.AddProject("identityserverhost"); + +idsvr.WithCommand( + name: "seed", + displayName: "Seed Database", + executeCommand: async (context) => + { + var projectMetadata = idsvr.Resource.GetProjectMetadata(); + var projectPath = projectMetadata.ProjectPath; + var process = new System.Diagnostics.Process + { + StartInfo = new System.Diagnostics.ProcessStartInfo + { + FileName = "dotnet", + Arguments = $"run --project \"{projectPath}\" --no-build -- /seed", + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + CreateNoWindow = true + } + }; + + process.Start(); + await process.WaitForExitAsync(context.CancellationToken); + + if (process.ExitCode == 0) + { + return CommandResults.Success(); + } + else + { + var error = await process.StandardError.ReadToEndAsync(); + return CommandResults.Failure(error); + } + }, + commandOptions: new CommandOptions + { + IconName = "DatabaseArrowUp", + IsHighlighted = true + }); + builder.AddProject("client") .WaitFor(idsvr); builder.Build().Run(); diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs index e0bce95a..7f808f10 100644 --- a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServer.AppHost/AppHost.cs @@ -2,6 +2,45 @@ var idsvr = builder.AddProject("identityserverhost"); +idsvr.WithCommand( + name: "seed", + displayName: "Seed Database", + executeCommand: async (context) => + { + var projectMetadata = idsvr.Resource.GetProjectMetadata(); + var projectPath = projectMetadata.ProjectPath; + var process = new System.Diagnostics.Process + { + StartInfo = new System.Diagnostics.ProcessStartInfo + { + FileName = "dotnet", + Arguments = $"run --project \"{projectPath}\" --no-build -- /seed", + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + CreateNoWindow = true + } + }; + + process.Start(); + await process.WaitForExitAsync(context.CancellationToken); + + if (process.ExitCode == 0) + { + return CommandResults.Success(); + } + else + { + var error = await process.StandardError.ReadToEndAsync(); + return CommandResults.Failure(error); + } + }, + commandOptions: new CommandOptions + { + IconName = "DatabaseArrowUp", + IsHighlighted = true + }); + builder.AddProject("client") .WaitFor(idsvr); diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.Designer.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.Designer.cs new file mode 100644 index 00000000..fa95e881 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.Designer.cs @@ -0,0 +1,1294 @@ +// +using System; +using Duende.IdentityServer.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IdentityServerHost.Migrations.ConfigurationDb +{ + [DbContext(typeof(ConfigurationDbContext))] + [Migration("20260410081252_update")] + partial class update + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowedAccessTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequireResourceIndicator") + .HasColumnType("INTEGER"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("ApiResources", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ApiResourceId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId", "Type") + .IsUnique(); + + b.ToTable("ApiResourceClaims", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ApiResourceId") + .HasColumnType("INTEGER"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId", "Key") + .IsUnique(); + + b.ToTable("ApiResourceProperties", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ApiResourceId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId", "Scope") + .IsUnique(); + + b.ToTable("ApiResourceScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceSecret", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ApiResourceId") + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId"); + + b.ToTable("ApiResourceSecrets", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Emphasize") + .HasColumnType("INTEGER"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("Required") + .HasColumnType("INTEGER"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("ApiScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiScopeClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ScopeId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ScopeId", "Type") + .IsUnique(); + + b.ToTable("ApiScopeClaims", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiScopeProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("ScopeId") + .HasColumnType("INTEGER"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ScopeId", "Key") + .IsUnique(); + + b.ToTable("ApiScopeProperties", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Client", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("INTEGER"); + + b.Property("AccessTokenLifetime") + .HasColumnType("INTEGER"); + + b.Property("AccessTokenType") + .HasColumnType("INTEGER"); + + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("INTEGER"); + + b.Property("AllowOfflineAccess") + .HasColumnType("INTEGER"); + + b.Property("AllowPlainTextPkce") + .HasColumnType("INTEGER"); + + b.Property("AllowRememberConsent") + .HasColumnType("INTEGER"); + + b.Property("AllowedIdentityTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("INTEGER"); + + b.Property("AlwaysSendClientClaims") + .HasColumnType("INTEGER"); + + b.Property("AuthorizationCodeLifetime") + .HasColumnType("INTEGER"); + + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("INTEGER"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("CibaLifetime") + .HasColumnType("INTEGER"); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientUri") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("ConsentLifetime") + .HasColumnType("INTEGER"); + + b.Property("CoordinateLifetimeWithUserSession") + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DPoPClockSkew") + .HasColumnType("TEXT"); + + b.Property("DPoPValidationMode") + .HasColumnType("INTEGER"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DeviceCodeLifetime") + .HasColumnType("INTEGER"); + + b.Property("EnableLocalLogin") + .HasColumnType("INTEGER"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("INTEGER"); + + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("IdentityTokenLifetime") + .HasColumnType("INTEGER"); + + b.Property("IncludeJwtId") + .HasColumnType("INTEGER"); + + b.Property("InitiateLoginUri") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("LogoUri") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("PollingInterval") + .HasColumnType("INTEGER"); + + b.Property("ProtocolType") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("PushedAuthorizationLifetime") + .HasColumnType("INTEGER"); + + b.Property("RefreshTokenExpiration") + .HasColumnType("INTEGER"); + + b.Property("RefreshTokenUsage") + .HasColumnType("INTEGER"); + + b.Property("RequireClientSecret") + .HasColumnType("INTEGER"); + + b.Property("RequireConsent") + .HasColumnType("INTEGER"); + + b.Property("RequireDPoP") + .HasColumnType("INTEGER"); + + b.Property("RequirePkce") + .HasColumnType("INTEGER"); + + b.Property("RequirePushedAuthorization") + .HasColumnType("INTEGER"); + + b.Property("RequireRequestObject") + .HasColumnType("INTEGER"); + + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("INTEGER"); + + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.Property("UserCodeType") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("UserSsoLifetime") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("Clients", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "Type", "Value") + .IsUnique(); + + b.ToTable("ClientClaims", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientCorsOrigin", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("Origin") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "Origin") + .IsUnique(); + + b.ToTable("ClientCorsOrigins", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientGrantType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("GrantType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "GrantType") + .IsUnique(); + + b.ToTable("ClientGrantTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientIdPRestriction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "Provider") + .IsUnique(); + + b.ToTable("ClientIdPRestrictions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientPostLogoutRedirectUri", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("PostLogoutRedirectUri") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "PostLogoutRedirectUri") + .IsUnique(); + + b.ToTable("ClientPostLogoutRedirectUris", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "Key") + .IsUnique(); + + b.ToTable("ClientProperties", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientRedirectUri", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("RedirectUri") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "RedirectUri") + .IsUnique(); + + b.ToTable("ClientRedirectUris", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId", "Scope") + .IsUnique(); + + b.ToTable("ClientScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientSecret", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientSecrets", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("Properties") + .HasColumnType("TEXT"); + + b.Property("Scheme") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("TEXT"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Scheme") + .IsUnique(); + + b.ToTable("IdentityProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Emphasize") + .HasColumnType("INTEGER"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("Required") + .HasColumnType("INTEGER"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("IdentityResources", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityResourceClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("IdentityResourceId") + .HasColumnType("INTEGER"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("IdentityResourceId", "Type") + .IsUnique(); + + b.ToTable("IdentityResourceClaims", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityResourceProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("IdentityResourceId") + .HasColumnType("INTEGER"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("IdentityResourceId", "Key") + .IsUnique(); + + b.ToTable("IdentityResourceProperties", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.Property("AssertionConsumerServiceBinding") + .HasColumnType("INTEGER"); + + b.Property("ClockSkewTicks") + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("DefaultPersistentNameIdentifierClaimType") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EncryptAssertions") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeTicks") + .HasColumnType("INTEGER"); + + b.Property("RequireConsent") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("SingleLogoutServiceBinding") + .HasColumnType("INTEGER"); + + b.Property("SingleLogoutServiceUrl") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Url") + .IsUnique(); + + b.ToTable("SamlServiceProviderAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderClaimMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAttributeName") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlServiceProviderClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderEncryptionCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlServiceProviderEncryptionCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderSigningCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlServiceProviderSigningCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("UserClaims") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApiResource"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceProperty", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApiResource"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApiResource"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceSecret", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApiResource"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiScopeClaim", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiScope", "Scope") + .WithMany("UserClaims") + .HasForeignKey("ScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scope"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiScopeProperty", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiScope", "Scope") + .WithMany("Properties") + .HasForeignKey("ScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scope"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientClaim", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("Claims") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientCorsOrigin", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("AllowedCorsOrigins") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientGrantType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("AllowedGrantTypes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientIdPRestriction", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("IdentityProviderRestrictions") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientPostLogoutRedirectUri", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("PostLogoutRedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientProperty", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientRedirectUri", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("RedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("AllowedScopes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ClientSecret", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.Client", "Client") + .WithMany("ClientSecrets") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityResourceClaim", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.IdentityResource", "IdentityResource") + .WithMany("UserClaims") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdentityResource"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityResourceProperty", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.IdentityResource", "IdentityResource") + .WithMany("Properties") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdentityResource"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderAssertionConsumerService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AssertionConsumerServiceUrls") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderClaimMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("ClaimMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderEncryptionCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("EncryptionCertificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderSigningCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SigningCertificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("ClaimMappings"); + + b.Navigation("EncryptionCertificates"); + + b.Navigation("SigningCertificates"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.cs new file mode 100644 index 00000000..3948dbc9 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260410081252_update.cs @@ -0,0 +1,175 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServerHost.Migrations.ConfigurationDb +{ + /// + public partial class update : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "SamlServiceProviders", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + EntityId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "TEXT", maxLength: 200, nullable: true), + Description = table.Column(type: "TEXT", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "INTEGER", nullable: false), + ClockSkewTicks = table.Column(type: "INTEGER", nullable: true), + RequestMaxAgeTicks = table.Column(type: "INTEGER", nullable: true), + AssertionConsumerServiceBinding = table.Column(type: "INTEGER", nullable: false), + SingleLogoutServiceUrl = table.Column(type: "TEXT", maxLength: 2000, nullable: true), + SingleLogoutServiceBinding = table.Column(type: "INTEGER", nullable: true), + RequireSignedAuthnRequests = table.Column(type: "INTEGER", nullable: false), + EncryptAssertions = table.Column(type: "INTEGER", nullable: false), + RequireConsent = table.Column(type: "INTEGER", nullable: false), + AllowIdpInitiated = table.Column(type: "INTEGER", nullable: false), + DefaultNameIdFormat = table.Column(type: "TEXT", maxLength: 500, nullable: true), + DefaultPersistentNameIdentifierClaimType = table.Column(type: "TEXT", maxLength: 500, nullable: true), + SigningBehavior = table.Column(type: "INTEGER", nullable: true), + Created = table.Column(type: "TEXT", nullable: false), + Updated = table.Column(type: "TEXT", nullable: true), + LastAccessed = table.Column(type: "TEXT", nullable: true), + NonEditable = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlServiceProviders", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlServiceProviderAssertionConsumerServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Url = table.Column(type: "TEXT", maxLength: 2000, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlServiceProviderAssertionConsumerServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlServiceProviderAssertionConsumerServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlServiceProviderClaimMappings", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + ClaimType = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlAttributeName = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlServiceProviderClaimMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlServiceProviderClaimMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlServiceProviderEncryptionCertificates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Data = table.Column(type: "TEXT", maxLength: 4000, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlServiceProviderEncryptionCertificates", x => x.Id); + table.ForeignKey( + name: "FK_SamlServiceProviderEncryptionCertificates_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlServiceProviderSigningCertificates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Data = table.Column(type: "TEXT", maxLength: 4000, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlServiceProviderSigningCertificates", x => x.Id); + table.ForeignKey( + name: "FK_SamlServiceProviderSigningCertificates_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviderAssertionConsumerServices_SamlServiceProviderId_Url", + table: "SamlServiceProviderAssertionConsumerServices", + columns: new[] { "SamlServiceProviderId", "Url" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviderClaimMappings_SamlServiceProviderId_ClaimType", + table: "SamlServiceProviderClaimMappings", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviderEncryptionCertificates_SamlServiceProviderId", + table: "SamlServiceProviderEncryptionCertificates", + column: "SamlServiceProviderId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviders_EntityId", + table: "SamlServiceProviders", + column: "EntityId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviderSigningCertificates_SamlServiceProviderId", + table: "SamlServiceProviderSigningCertificates", + column: "SamlServiceProviderId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlServiceProviderAssertionConsumerServices"); + + migrationBuilder.DropTable( + name: "SamlServiceProviderClaimMappings"); + + migrationBuilder.DropTable( + name: "SamlServiceProviderEncryptionCertificates"); + + migrationBuilder.DropTable( + name: "SamlServiceProviderSigningCertificates"); + + migrationBuilder.DropTable( + name: "SamlServiceProviders"); + } + } +} diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index 95de5f73..8afb479a 100644 --- a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -15,7 +15,7 @@ partial class ConfigurationDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { @@ -826,6 +826,178 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("IdentityResourceProperties", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.Property("AssertionConsumerServiceBinding") + .HasColumnType("INTEGER"); + + b.Property("ClockSkewTicks") + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("DefaultPersistentNameIdentifierClaimType") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EncryptAssertions") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeTicks") + .HasColumnType("INTEGER"); + + b.Property("RequireConsent") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("SingleLogoutServiceBinding") + .HasColumnType("INTEGER"); + + b.Property("SingleLogoutServiceUrl") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Url") + .IsUnique(); + + b.ToTable("SamlServiceProviderAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderClaimMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAttributeName") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlServiceProviderClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderEncryptionCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlServiceProviderEncryptionCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderSigningCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlServiceProviderSigningCertificates", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") @@ -1013,6 +1185,50 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("IdentityResource"); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderAssertionConsumerService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AssertionConsumerServiceUrls") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderClaimMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("ClaimMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderEncryptionCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("EncryptionCertificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderSigningCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SigningCertificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { b.Navigation("Properties"); @@ -1058,6 +1274,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("UserClaims"); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("ClaimMappings"); + + b.Navigation("EncryptionCertificates"); + + b.Navigation("SigningCertificates"); + }); #pragma warning restore 612, 618 } }