diff --git a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/20260610193411_UpdateV8.Designer.cs b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/20260610193411_UpdateV8.Designer.cs new file mode 100644 index 00000000..7cf0ab26 --- /dev/null +++ b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/20260610193411_UpdateV8.Designer.cs @@ -0,0 +1,1417 @@ +// +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 IdentityServer.Migrations.ConfigurationDb +{ + [DbContext(typeof(ConfigurationDbContext))] + [Migration("20260610193411_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + 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.SamlAllowedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); + + b.ToTable("SamlAllowedScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); + + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "OidcValue") + .IsUnique(); + + b.ToTable("SamlAuthnContextMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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("SamlClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlRequestedClaimTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); + + b.ToTable("SamlSingleLogoutServices", (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.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", 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.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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.SamlRequestedClaimType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("RequestedClaimTypes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SingleLogoutServiceUrls") + .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("AllowedScopes"); + + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + + b.Navigation("ClaimMappings"); + + b.Navigation("RequestedClaimTypes"); + + b.Navigation("SingleLogoutServiceUrls"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/20260610193411_UpdateV8.cs b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/20260610193411_UpdateV8.cs new file mode 100644 index 00000000..18d10775 --- /dev/null +++ b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/20260610193411_UpdateV8.cs @@ -0,0 +1,267 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServer.Migrations.ConfigurationDb +{ + /// + public partial class UpdateV8 : 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), + ClockSkewSeconds = table.Column(type: "REAL", nullable: true), + RequestMaxAgeSeconds = table.Column(type: "REAL", nullable: true), + AssertionLifetimeSeconds = table.Column(type: "REAL", nullable: true), + RequireSignedAuthnRequests = table.Column(type: "INTEGER", nullable: true), + RequireSignedLogoutResponses = table.Column(type: "INTEGER", nullable: true), + AllowIdpInitiated = table.Column(type: "INTEGER", nullable: false), + DefaultNameIdFormat = table.Column(type: "TEXT", maxLength: 2000, nullable: true), + EmailNameIdClaimType = table.Column(type: "TEXT", maxLength: 200, nullable: true), + SigningBehavior = table.Column(type: "INTEGER", nullable: true), + AllowedSignatureAlgorithms = table.Column(type: "TEXT", 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: "SamlAllowedScopes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Scope = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAllowedScopes", x => x.Id); + table.ForeignKey( + name: "FK_SamlAllowedScopes_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlAssertionConsumerServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Location = table.Column(type: "TEXT", maxLength: 400, nullable: false), + Binding = table.Column(type: "TEXT", maxLength: 200, nullable: false), + Index = table.Column(type: "INTEGER", nullable: false), + IsDefault = table.Column(type: "INTEGER", nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAssertionConsumerServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlAssertionConsumerServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlAuthnContextMappings", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + OidcValue = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlAuthnContextClassRef = table.Column(type: "TEXT", maxLength: 500, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAuthnContextMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlAuthnContextMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlCertificates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Data = table.Column(type: "TEXT", maxLength: 4000, nullable: false), + Use = table.Column(type: "INTEGER", nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlCertificates", x => x.Id); + table.ForeignKey( + name: "FK_SamlCertificates_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlClaimMappings", + 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_SamlClaimMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlClaimMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlRequestedClaimTypes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + ClaimType = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlRequestedClaimTypes", x => x.Id); + table.ForeignKey( + name: "FK_SamlRequestedClaimTypes_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlSingleLogoutServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Location = table.Column(type: "TEXT", maxLength: 400, nullable: false), + Binding = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSingleLogoutServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlSingleLogoutServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlAllowedScopes_SamlServiceProviderId_Scope", + table: "SamlAllowedScopes", + columns: new[] { "SamlServiceProviderId", "Scope" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlAssertionConsumerServices_SamlServiceProviderId_Location", + table: "SamlAssertionConsumerServices", + columns: new[] { "SamlServiceProviderId", "Location" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlAuthnContextMappings_SamlServiceProviderId_OidcValue", + table: "SamlAuthnContextMappings", + columns: new[] { "SamlServiceProviderId", "OidcValue" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlCertificates_SamlServiceProviderId", + table: "SamlCertificates", + column: "SamlServiceProviderId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlClaimMappings_SamlServiceProviderId_ClaimType", + table: "SamlClaimMappings", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlRequestedClaimTypes_SamlServiceProviderId_ClaimType", + table: "SamlRequestedClaimTypes", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviders_EntityId", + table: "SamlServiceProviders", + column: "EntityId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSingleLogoutServices_SamlServiceProviderId_Binding", + table: "SamlSingleLogoutServices", + columns: new[] { "SamlServiceProviderId", "Binding" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlAllowedScopes"); + + migrationBuilder.DropTable( + name: "SamlAssertionConsumerServices"); + + migrationBuilder.DropTable( + name: "SamlAuthnContextMappings"); + + migrationBuilder.DropTable( + name: "SamlCertificates"); + + migrationBuilder.DropTable( + name: "SamlClaimMappings"); + + migrationBuilder.DropTable( + name: "SamlRequestedClaimTypes"); + + migrationBuilder.DropTable( + name: "SamlSingleLogoutServices"); + + migrationBuilder.DropTable( + name: "SamlServiceProviders"); + } + } +} diff --git a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index 8eddc6bb..d4a6702e 100644 --- a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -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.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { @@ -826,6 +826,262 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("IdentityResourceProperties", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); + + b.ToTable("SamlAllowedScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); + + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "OidcValue") + .IsUnique(); + + b.ToTable("SamlAuthnContextMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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("SamlClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlRequestedClaimTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); + + b.ToTable("SamlSingleLogoutServices", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") @@ -1013,6 +1269,83 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("IdentityResource"); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", 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.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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.SamlRequestedClaimType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("RequestedClaimTypes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SingleLogoutServiceUrls") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { b.Navigation("Properties"); @@ -1058,6 +1391,23 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("UserClaims"); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Navigation("AllowedScopes"); + + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + + b.Navigation("ClaimMappings"); + + b.Navigation("RequestedClaimTypes"); + + b.Navigation("SingleLogoutServiceUrls"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/20260610193353_UpdateV8.Designer.cs b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/20260610193353_UpdateV8.Designer.cs new file mode 100644 index 00000000..ddaeb1ac --- /dev/null +++ b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/20260610193353_UpdateV8.Designer.cs @@ -0,0 +1,361 @@ +// +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 IdentityServer.Migrations.PersistedGrantDb +{ + [DbContext(typeof(PersistedGrantDbContext))] + [Migration("20260610193353_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => + { + b.Property("UserCode") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("UserCode"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.ToTable("DeviceCodes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Algorithm") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DataProtected") + .HasColumnType("INTEGER"); + + b.Property("IsX509Certificate") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("TEXT"); + + b.Property("Version") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("Use"); + + b.ToTable("Keys", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ConsumedTime") + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ConsumedTime"); + + b.HasIndex("Expiration"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.HasIndex("SubjectId", "SessionId", "Type"); + + b.ToTable("PersistedGrants", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PushedAuthorizationRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ReferenceValueHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("ReferenceValueHash") + .IsUnique(); + + b.ToTable("PushedAuthorizationRequests", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Expires") + .HasColumnType("TEXT"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Renewed") + .HasColumnType("TEXT"); + + b.Property("Scheme") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.HasIndex("Expires"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SessionId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ServerSideSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/20260610193353_UpdateV8.cs b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/20260610193353_UpdateV8.cs new file mode 100644 index 00000000..0166c867 --- /dev/null +++ b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/20260610193353_UpdateV8.cs @@ -0,0 +1,113 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServer.Migrations.PersistedGrantDb +{ + /// + public partial class UpdateV8 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "SamlLogoutSessions", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + LogoutId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SerializedSession = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + Version = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlSigninStates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + StateId = table.Column(type: "TEXT", nullable: false), + SerializedState = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + ServiceProviderEntityId = table.Column(type: "TEXT", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSigninStates", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlLogoutSessionRequestIndices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + RequestId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlLogoutSessionId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessionRequestIndices", x => x.Id); + table.ForeignKey( + name: "FK_SamlLogoutSessionRequestIndices_SamlLogoutSessions_SamlLogoutSessionId", + column: x => x.SamlLogoutSessionId, + principalTable: "SamlLogoutSessions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_RequestId", + table: "SamlLogoutSessionRequestIndices", + column: "RequestId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_SamlLogoutSessionId", + table: "SamlLogoutSessionRequestIndices", + column: "SamlLogoutSessionId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_ExpiresAtUtc", + table: "SamlLogoutSessions", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_LogoutId", + table: "SamlLogoutSessions", + column: "LogoutId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_ExpiresAtUtc", + table: "SamlSigninStates", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_StateId", + table: "SamlSigninStates", + column: "StateId", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlLogoutSessionRequestIndices"); + + migrationBuilder.DropTable( + name: "SamlSigninStates"); + + migrationBuilder.DropTable( + name: "SamlLogoutSessions"); + } + } +} diff --git a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index 227b50b3..a13f8b97 100644 --- a/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs +++ b/IdentityServer/v8/Configuration/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -15,7 +15,7 @@ partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => { @@ -45,8 +45,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(200) .HasColumnType("TEXT"); - b.Property("Expiration") - .IsRequired() + b.Property("Expiration") .HasColumnType("TEXT"); b.Property("SessionId") @@ -193,6 +192,93 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("PushedAuthorizationRequests", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => { b.Property("Id") @@ -250,6 +336,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("ServerSideSessions", (string)null); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/Directory.Packages.props b/IdentityServer/v8/Directory.Packages.props index 9ba0127c..015d4e18 100644 --- a/IdentityServer/v8/Directory.Packages.props +++ b/IdentityServer/v8/Directory.Packages.props @@ -4,7 +4,7 @@ true - + @@ -25,19 +25,19 @@ - - + + - + - - + + @@ -63,4 +63,4 @@ - + \ No newline at end of file diff --git a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index c812d03d..1d7689d1 100644 --- a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -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.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { @@ -826,6 +826,262 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("IdentityResourceProperties", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); + + b.ToTable("SamlAllowedScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); + + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "OidcValue") + .IsUnique(); + + b.ToTable("SamlAuthnContextMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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("SamlClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlRequestedClaimTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); + + b.ToTable("SamlSingleLogoutServices", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") @@ -1013,6 +1269,83 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("IdentityResource"); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", 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.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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.SamlRequestedClaimType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("RequestedClaimTypes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SingleLogoutServiceUrls") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { b.Navigation("Properties"); @@ -1058,6 +1391,23 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("UserClaims"); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Navigation("AllowedScopes"); + + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + + b.Navigation("ClaimMappings"); + + b.Navigation("RequestedClaimTypes"); + + b.Navigation("SingleLogoutServiceUrls"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index f329712b..3d688fb9 100644 --- a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs +++ b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -15,7 +15,7 @@ partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => { @@ -45,8 +45,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(200) .HasColumnType("TEXT"); - b.Property("Expiration") - .IsRequired() + b.Property("Expiration") .HasColumnType("TEXT"); b.Property("SessionId") @@ -193,6 +192,93 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("PushedAuthorizationRequests", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => { b.Property("Id") @@ -250,6 +336,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("ServerSideSessions", (string)null); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/ConfigurationDb/20260610194058_UpdateV8.Designer.cs b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/ConfigurationDb/20260610194058_UpdateV8.Designer.cs new file mode 100644 index 00000000..acb3089e --- /dev/null +++ b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/ConfigurationDb/20260610194058_UpdateV8.Designer.cs @@ -0,0 +1,1417 @@ +// +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 IdentityServer.Migrations.ConfigurationDb +{ + [DbContext(typeof(ConfigurationDbContext))] + [Migration("20260610194058_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + 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.SamlAllowedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); + + b.ToTable("SamlAllowedScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); + + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "OidcValue") + .IsUnique(); + + b.ToTable("SamlAuthnContextMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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("SamlClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlRequestedClaimTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); + + b.ToTable("SamlSingleLogoutServices", (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.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", 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.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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.SamlRequestedClaimType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("RequestedClaimTypes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SingleLogoutServiceUrls") + .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("AllowedScopes"); + + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + + b.Navigation("ClaimMappings"); + + b.Navigation("RequestedClaimTypes"); + + b.Navigation("SingleLogoutServiceUrls"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/ConfigurationDb/20260610194058_UpdateV8.cs b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/ConfigurationDb/20260610194058_UpdateV8.cs new file mode 100644 index 00000000..18d10775 --- /dev/null +++ b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/ConfigurationDb/20260610194058_UpdateV8.cs @@ -0,0 +1,267 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServer.Migrations.ConfigurationDb +{ + /// + public partial class UpdateV8 : 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), + ClockSkewSeconds = table.Column(type: "REAL", nullable: true), + RequestMaxAgeSeconds = table.Column(type: "REAL", nullable: true), + AssertionLifetimeSeconds = table.Column(type: "REAL", nullable: true), + RequireSignedAuthnRequests = table.Column(type: "INTEGER", nullable: true), + RequireSignedLogoutResponses = table.Column(type: "INTEGER", nullable: true), + AllowIdpInitiated = table.Column(type: "INTEGER", nullable: false), + DefaultNameIdFormat = table.Column(type: "TEXT", maxLength: 2000, nullable: true), + EmailNameIdClaimType = table.Column(type: "TEXT", maxLength: 200, nullable: true), + SigningBehavior = table.Column(type: "INTEGER", nullable: true), + AllowedSignatureAlgorithms = table.Column(type: "TEXT", 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: "SamlAllowedScopes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Scope = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAllowedScopes", x => x.Id); + table.ForeignKey( + name: "FK_SamlAllowedScopes_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlAssertionConsumerServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Location = table.Column(type: "TEXT", maxLength: 400, nullable: false), + Binding = table.Column(type: "TEXT", maxLength: 200, nullable: false), + Index = table.Column(type: "INTEGER", nullable: false), + IsDefault = table.Column(type: "INTEGER", nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAssertionConsumerServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlAssertionConsumerServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlAuthnContextMappings", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + OidcValue = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlAuthnContextClassRef = table.Column(type: "TEXT", maxLength: 500, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAuthnContextMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlAuthnContextMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlCertificates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Data = table.Column(type: "TEXT", maxLength: 4000, nullable: false), + Use = table.Column(type: "INTEGER", nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlCertificates", x => x.Id); + table.ForeignKey( + name: "FK_SamlCertificates_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlClaimMappings", + 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_SamlClaimMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlClaimMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlRequestedClaimTypes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + ClaimType = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlRequestedClaimTypes", x => x.Id); + table.ForeignKey( + name: "FK_SamlRequestedClaimTypes_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlSingleLogoutServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Location = table.Column(type: "TEXT", maxLength: 400, nullable: false), + Binding = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSingleLogoutServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlSingleLogoutServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlAllowedScopes_SamlServiceProviderId_Scope", + table: "SamlAllowedScopes", + columns: new[] { "SamlServiceProviderId", "Scope" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlAssertionConsumerServices_SamlServiceProviderId_Location", + table: "SamlAssertionConsumerServices", + columns: new[] { "SamlServiceProviderId", "Location" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlAuthnContextMappings_SamlServiceProviderId_OidcValue", + table: "SamlAuthnContextMappings", + columns: new[] { "SamlServiceProviderId", "OidcValue" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlCertificates_SamlServiceProviderId", + table: "SamlCertificates", + column: "SamlServiceProviderId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlClaimMappings_SamlServiceProviderId_ClaimType", + table: "SamlClaimMappings", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlRequestedClaimTypes_SamlServiceProviderId_ClaimType", + table: "SamlRequestedClaimTypes", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviders_EntityId", + table: "SamlServiceProviders", + column: "EntityId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSingleLogoutServices_SamlServiceProviderId_Binding", + table: "SamlSingleLogoutServices", + columns: new[] { "SamlServiceProviderId", "Binding" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlAllowedScopes"); + + migrationBuilder.DropTable( + name: "SamlAssertionConsumerServices"); + + migrationBuilder.DropTable( + name: "SamlAuthnContextMappings"); + + migrationBuilder.DropTable( + name: "SamlCertificates"); + + migrationBuilder.DropTable( + name: "SamlClaimMappings"); + + migrationBuilder.DropTable( + name: "SamlRequestedClaimTypes"); + + migrationBuilder.DropTable( + name: "SamlSingleLogoutServices"); + + migrationBuilder.DropTable( + name: "SamlServiceProviders"); + } + } +} diff --git a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/PersistedGrantDb/20260610194128_UpdateV8.Designer.cs b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/PersistedGrantDb/20260610194128_UpdateV8.Designer.cs new file mode 100644 index 00000000..0815a70a --- /dev/null +++ b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/PersistedGrantDb/20260610194128_UpdateV8.Designer.cs @@ -0,0 +1,361 @@ +// +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 IdentityServer.Migrations.PersistedGrantDb +{ + [DbContext(typeof(PersistedGrantDbContext))] + [Migration("20260610194128_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => + { + b.Property("UserCode") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("UserCode"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.ToTable("DeviceCodes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Algorithm") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DataProtected") + .HasColumnType("INTEGER"); + + b.Property("IsX509Certificate") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("TEXT"); + + b.Property("Version") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("Use"); + + b.ToTable("Keys", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ConsumedTime") + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ConsumedTime"); + + b.HasIndex("Expiration"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.HasIndex("SubjectId", "SessionId", "Type"); + + b.ToTable("PersistedGrants", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PushedAuthorizationRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ReferenceValueHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("ReferenceValueHash") + .IsUnique(); + + b.ToTable("PushedAuthorizationRequests", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Expires") + .HasColumnType("TEXT"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Renewed") + .HasColumnType("TEXT"); + + b.Property("Scheme") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.HasIndex("Expires"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SessionId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ServerSideSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/PersistedGrantDb/20260610194128_UpdateV8.cs b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/PersistedGrantDb/20260610194128_UpdateV8.cs new file mode 100644 index 00000000..0166c867 --- /dev/null +++ b/IdentityServer/v8/Quickstarts/4_EntityFramework/src/IdentityServer/Migrations/PersistedGrantDb/20260610194128_UpdateV8.cs @@ -0,0 +1,113 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServer.Migrations.PersistedGrantDb +{ + /// + public partial class UpdateV8 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "SamlLogoutSessions", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + LogoutId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SerializedSession = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + Version = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlSigninStates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + StateId = table.Column(type: "TEXT", nullable: false), + SerializedState = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + ServiceProviderEntityId = table.Column(type: "TEXT", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSigninStates", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlLogoutSessionRequestIndices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + RequestId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlLogoutSessionId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessionRequestIndices", x => x.Id); + table.ForeignKey( + name: "FK_SamlLogoutSessionRequestIndices_SamlLogoutSessions_SamlLogoutSessionId", + column: x => x.SamlLogoutSessionId, + principalTable: "SamlLogoutSessions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_RequestId", + table: "SamlLogoutSessionRequestIndices", + column: "RequestId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_SamlLogoutSessionId", + table: "SamlLogoutSessionRequestIndices", + column: "SamlLogoutSessionId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_ExpiresAtUtc", + table: "SamlLogoutSessions", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_LogoutId", + table: "SamlLogoutSessions", + column: "LogoutId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_ExpiresAtUtc", + table: "SamlSigninStates", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_StateId", + table: "SamlSigninStates", + column: "StateId", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlLogoutSessionRequestIndices"); + + migrationBuilder.DropTable( + name: "SamlSigninStates"); + + migrationBuilder.DropTable( + name: "SamlLogoutSessions"); + } + } +} diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index a9aea359..06058de3 100644 --- a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -15,7 +15,7 @@ partial class ConfigurationDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { @@ -826,110 +826,113 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("IdentityResourceProperties", (string)null); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); - b.Property("AllowIdpInitiated") - .HasColumnType("INTEGER"); - - b.Property("AssertionConsumerServiceBinding") - .HasColumnType("INTEGER"); - - b.Property("ClockSkewTicks") + b.Property("SamlServiceProviderId") .HasColumnType("INTEGER"); - b.Property("Created") + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) .HasColumnType("TEXT"); - b.Property("DefaultNameIdFormat") - .HasMaxLength(500) - .HasColumnType("TEXT"); + b.HasKey("Id"); - b.Property("DefaultPersistentNameIdentifierClaimType") - .HasMaxLength(500) - .HasColumnType("TEXT"); + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("TEXT"); + b.ToTable("SamlAllowedScopes", (string)null); + }); - b.Property("DisplayName") + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); - b.Property("Enabled") + b.Property("Index") .HasColumnType("INTEGER"); - b.Property("EncryptAssertions") + b.Property("IsDefault") .HasColumnType("INTEGER"); - b.Property("EntityId") + b.Property("Location") .IsRequired() - .HasMaxLength(200) - .HasColumnType("TEXT"); - - b.Property("LastAccessed") + .HasMaxLength(400) .HasColumnType("TEXT"); - b.Property("NonEditable") - .HasColumnType("INTEGER"); - - b.Property("RequestMaxAgeTicks") + b.Property("SamlServiceProviderId") .HasColumnType("INTEGER"); - b.Property("RequireConsent") - .HasColumnType("INTEGER"); + b.HasKey("Id"); - b.Property("RequireSignedAuthnRequests") - .HasColumnType("INTEGER"); + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); - b.Property("SigningBehavior") - .HasColumnType("INTEGER"); + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); - b.Property("SingleLogoutServiceBinding") + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); - b.Property("SingleLogoutServiceUrl") - .HasMaxLength(2000) + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) .HasColumnType("TEXT"); - b.Property("Updated") + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) .HasColumnType("TEXT"); + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + b.HasKey("Id"); - b.HasIndex("EntityId") + b.HasIndex("SamlServiceProviderId", "OidcValue") .IsUnique(); - b.ToTable("SamlServiceProviders", (string)null); + b.ToTable("SamlAuthnContextMappings", (string)null); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderAssertionConsumerService", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + b.Property("SamlServiceProviderId") .HasColumnType("INTEGER"); - b.Property("Url") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("TEXT"); + b.Property("Use") + .HasColumnType("INTEGER"); b.HasKey("Id"); - b.HasIndex("SamlServiceProviderId", "Url") - .IsUnique(); + b.HasIndex("SamlServiceProviderId"); - b.ToTable("SamlServiceProviderAssertionConsumerServices", (string)null); + b.ToTable("SamlCertificates", (string)null); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderClaimMapping", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -953,18 +956,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("SamlServiceProviderId", "ClaimType") .IsUnique(); - b.ToTable("SamlServiceProviderClaimMappings", (string)null); + b.ToTable("SamlClaimMappings", (string)null); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderEncryptionCertificate", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); - b.Property("Data") + b.Property("ClaimType") .IsRequired() - .HasMaxLength(4000) + .HasMaxLength(250) .HasColumnType("TEXT"); b.Property("SamlServiceProviderId") @@ -972,20 +975,100 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("SamlServiceProviderId"); + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); - b.ToTable("SamlServiceProviderEncryptionCertificates", (string)null); + b.ToTable("SamlRequestedClaimTypes", (string)null); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderSigningCertificate", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); - b.Property("Data") + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") .IsRequired() - .HasMaxLength(4000) + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) .HasColumnType("TEXT"); b.Property("SamlServiceProviderId") @@ -993,9 +1076,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("SamlServiceProviderId"); + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); - b.ToTable("SamlServiceProviderSigningCertificates", (string)null); + b.ToTable("SamlSingleLogoutServices", (string)null); }); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => @@ -1185,7 +1269,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("IdentityResource"); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderAssertionConsumerService", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") .WithMany("AssertionConsumerServiceUrls") @@ -1196,7 +1291,29 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("SamlServiceProvider"); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderClaimMapping", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") .WithMany("ClaimMappings") @@ -1207,10 +1324,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("SamlServiceProvider"); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderEncryptionCertificate", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") - .WithMany("EncryptionCertificates") + .WithMany("RequestedClaimTypes") .HasForeignKey("SamlServiceProviderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -1218,10 +1335,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("SamlServiceProvider"); }); - modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProviderSigningCertificate", b => + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") - .WithMany("SigningCertificates") + .WithMany("SingleLogoutServiceUrls") .HasForeignKey("SamlServiceProviderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -1277,13 +1394,19 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => { + b.Navigation("AllowedScopes"); + b.Navigation("AssertionConsumerServiceUrls"); + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + b.Navigation("ClaimMappings"); - b.Navigation("EncryptionCertificates"); + b.Navigation("RequestedClaimTypes"); - b.Navigation("SigningCertificates"); + b.Navigation("SingleLogoutServiceUrls"); }); #pragma warning restore 612, 618 } diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610192837_UpdateV8.Designer.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610192837_UpdateV8.Designer.cs new file mode 100644 index 00000000..e9bb1025 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610192837_UpdateV8.Designer.cs @@ -0,0 +1,361 @@ +// +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.PersistedGrantDb +{ + [DbContext(typeof(PersistedGrantDbContext))] + [Migration("20260610192837_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => + { + b.Property("UserCode") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("UserCode"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.ToTable("DeviceCodes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Algorithm") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DataProtected") + .HasColumnType("INTEGER"); + + b.Property("IsX509Certificate") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("TEXT"); + + b.Property("Version") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("Use"); + + b.ToTable("Keys", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ConsumedTime") + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ConsumedTime"); + + b.HasIndex("Expiration"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.HasIndex("SubjectId", "SessionId", "Type"); + + b.ToTable("PersistedGrants", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PushedAuthorizationRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ReferenceValueHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("ReferenceValueHash") + .IsUnique(); + + b.ToTable("PushedAuthorizationRequests", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Expires") + .HasColumnType("TEXT"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Renewed") + .HasColumnType("TEXT"); + + b.Property("Scheme") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.HasIndex("Expires"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SessionId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ServerSideSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610192837_UpdateV8.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610192837_UpdateV8.cs new file mode 100644 index 00000000..dfeb1e44 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610192837_UpdateV8.cs @@ -0,0 +1,113 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServerHost.Migrations.PersistedGrantDb +{ + /// + public partial class UpdateV8 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "SamlLogoutSessions", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + LogoutId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SerializedSession = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + Version = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlSigninStates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + StateId = table.Column(type: "TEXT", nullable: false), + SerializedState = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + ServiceProviderEntityId = table.Column(type: "TEXT", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSigninStates", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlLogoutSessionRequestIndices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + RequestId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlLogoutSessionId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessionRequestIndices", x => x.Id); + table.ForeignKey( + name: "FK_SamlLogoutSessionRequestIndices_SamlLogoutSessions_SamlLogoutSessionId", + column: x => x.SamlLogoutSessionId, + principalTable: "SamlLogoutSessions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_RequestId", + table: "SamlLogoutSessionRequestIndices", + column: "RequestId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_SamlLogoutSessionId", + table: "SamlLogoutSessionRequestIndices", + column: "SamlLogoutSessionId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_ExpiresAtUtc", + table: "SamlLogoutSessions", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_LogoutId", + table: "SamlLogoutSessions", + column: "LogoutId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_ExpiresAtUtc", + table: "SamlSigninStates", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_StateId", + table: "SamlSigninStates", + column: "StateId", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlLogoutSessionRequestIndices"); + + migrationBuilder.DropTable( + name: "SamlSigninStates"); + + migrationBuilder.DropTable( + name: "SamlLogoutSessions"); + } + } +} diff --git a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index 4277d760..a673daa8 100644 --- a/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs +++ b/IdentityServer/v8/UserInteraction/DynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -15,7 +15,7 @@ partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => { @@ -45,8 +45,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(200) .HasColumnType("TEXT"); - b.Property("Expiration") - .IsRequired() + b.Property("Expiration") .HasColumnType("TEXT"); b.Property("SessionId") @@ -193,6 +192,93 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("PushedAuthorizationRequests", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => { b.Property("Id") @@ -250,6 +336,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("ServerSideSessions", (string)null); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260610191145_UpdateV8.Designer.cs b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260610191145_UpdateV8.Designer.cs new file mode 100644 index 00000000..5f83a004 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260610191145_UpdateV8.Designer.cs @@ -0,0 +1,1417 @@ +// +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("20260610191145_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + 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.SamlAllowedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); + + b.ToTable("SamlAllowedScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); + + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "OidcValue") + .IsUnique(); + + b.ToTable("SamlAuthnContextMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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("SamlClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlRequestedClaimTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); + + b.ToTable("SamlSingleLogoutServices", (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.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", 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.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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.SamlRequestedClaimType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("RequestedClaimTypes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SingleLogoutServiceUrls") + .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("AllowedScopes"); + + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + + b.Navigation("ClaimMappings"); + + b.Navigation("RequestedClaimTypes"); + + b.Navigation("SingleLogoutServiceUrls"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260610191145_UpdateV8.cs b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260610191145_UpdateV8.cs new file mode 100644 index 00000000..9d2a15b9 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/20260610191145_UpdateV8.cs @@ -0,0 +1,267 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServerHost.Migrations.ConfigurationDb +{ + /// + public partial class UpdateV8 : 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), + ClockSkewSeconds = table.Column(type: "REAL", nullable: true), + RequestMaxAgeSeconds = table.Column(type: "REAL", nullable: true), + AssertionLifetimeSeconds = table.Column(type: "REAL", nullable: true), + RequireSignedAuthnRequests = table.Column(type: "INTEGER", nullable: true), + RequireSignedLogoutResponses = table.Column(type: "INTEGER", nullable: true), + AllowIdpInitiated = table.Column(type: "INTEGER", nullable: false), + DefaultNameIdFormat = table.Column(type: "TEXT", maxLength: 2000, nullable: true), + EmailNameIdClaimType = table.Column(type: "TEXT", maxLength: 200, nullable: true), + SigningBehavior = table.Column(type: "INTEGER", nullable: true), + AllowedSignatureAlgorithms = table.Column(type: "TEXT", 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: "SamlAllowedScopes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Scope = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAllowedScopes", x => x.Id); + table.ForeignKey( + name: "FK_SamlAllowedScopes_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlAssertionConsumerServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Location = table.Column(type: "TEXT", maxLength: 400, nullable: false), + Binding = table.Column(type: "TEXT", maxLength: 200, nullable: false), + Index = table.Column(type: "INTEGER", nullable: false), + IsDefault = table.Column(type: "INTEGER", nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAssertionConsumerServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlAssertionConsumerServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlAuthnContextMappings", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + OidcValue = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlAuthnContextClassRef = table.Column(type: "TEXT", maxLength: 500, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlAuthnContextMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlAuthnContextMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlCertificates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Data = table.Column(type: "TEXT", maxLength: 4000, nullable: false), + Use = table.Column(type: "INTEGER", nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlCertificates", x => x.Id); + table.ForeignKey( + name: "FK_SamlCertificates_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlClaimMappings", + 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_SamlClaimMappings", x => x.Id); + table.ForeignKey( + name: "FK_SamlClaimMappings_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlRequestedClaimTypes", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + ClaimType = table.Column(type: "TEXT", maxLength: 250, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlRequestedClaimTypes", x => x.Id); + table.ForeignKey( + name: "FK_SamlRequestedClaimTypes_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "SamlSingleLogoutServices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Location = table.Column(type: "TEXT", maxLength: 400, nullable: false), + Binding = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlServiceProviderId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSingleLogoutServices", x => x.Id); + table.ForeignKey( + name: "FK_SamlSingleLogoutServices_SamlServiceProviders_SamlServiceProviderId", + column: x => x.SamlServiceProviderId, + principalTable: "SamlServiceProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlAllowedScopes_SamlServiceProviderId_Scope", + table: "SamlAllowedScopes", + columns: new[] { "SamlServiceProviderId", "Scope" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlAssertionConsumerServices_SamlServiceProviderId_Location", + table: "SamlAssertionConsumerServices", + columns: new[] { "SamlServiceProviderId", "Location" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlAuthnContextMappings_SamlServiceProviderId_OidcValue", + table: "SamlAuthnContextMappings", + columns: new[] { "SamlServiceProviderId", "OidcValue" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlCertificates_SamlServiceProviderId", + table: "SamlCertificates", + column: "SamlServiceProviderId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlClaimMappings_SamlServiceProviderId_ClaimType", + table: "SamlClaimMappings", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlRequestedClaimTypes_SamlServiceProviderId_ClaimType", + table: "SamlRequestedClaimTypes", + columns: new[] { "SamlServiceProviderId", "ClaimType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlServiceProviders_EntityId", + table: "SamlServiceProviders", + column: "EntityId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSingleLogoutServices_SamlServiceProviderId_Binding", + table: "SamlSingleLogoutServices", + columns: new[] { "SamlServiceProviderId", "Binding" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlAllowedScopes"); + + migrationBuilder.DropTable( + name: "SamlAssertionConsumerServices"); + + migrationBuilder.DropTable( + name: "SamlAuthnContextMappings"); + + migrationBuilder.DropTable( + name: "SamlCertificates"); + + migrationBuilder.DropTable( + name: "SamlClaimMappings"); + + migrationBuilder.DropTable( + name: "SamlRequestedClaimTypes"); + + migrationBuilder.DropTable( + name: "SamlSingleLogoutServices"); + + migrationBuilder.DropTable( + name: "SamlServiceProviders"); + } + } +} diff --git a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index da461775..06058de3 100755 --- a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -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.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { @@ -826,6 +826,262 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("IdentityResourceProperties", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Scope") + .IsUnique(); + + b.ToTable("SamlAllowedScopes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Location") + .IsUnique(); + + b.ToTable("SamlAssertionConsumerServices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAuthnContextMapping", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("OidcValue") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlAuthnContextClassRef") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "OidcValue") + .IsUnique(); + + b.ToTable("SamlAuthnContextMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId"); + + b.ToTable("SamlCertificates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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("SamlClaimMappings", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlRequestedClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "ClaimType") + .IsUnique(); + + b.ToTable("SamlRequestedClaimTypes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AllowIdpInitiated") + .HasColumnType("INTEGER"); + + b.PrimitiveCollection("AllowedSignatureAlgorithms") + .HasColumnType("TEXT"); + + b.Property("AssertionLifetimeSeconds") + .HasColumnType("REAL"); + + b.Property("ClockSkewSeconds") + .HasColumnType("REAL"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("DefaultNameIdFormat") + .HasMaxLength(2000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("EmailNameIdClaimType") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("LastAccessed") + .HasColumnType("TEXT"); + + b.Property("NonEditable") + .HasColumnType("INTEGER"); + + b.Property("RequestMaxAgeSeconds") + .HasColumnType("REAL"); + + b.Property("RequireSignedAuthnRequests") + .HasColumnType("INTEGER"); + + b.Property("RequireSignedLogoutResponses") + .HasColumnType("INTEGER"); + + b.Property("SigningBehavior") + .HasColumnType("INTEGER"); + + b.Property("Updated") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("EntityId") + .IsUnique(); + + b.ToTable("SamlServiceProviders", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Binding") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("TEXT"); + + b.Property("SamlServiceProviderId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("SamlServiceProviderId", "Binding") + .IsUnique(); + + b.ToTable("SamlSingleLogoutServices", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResourceClaim", b => { b.HasOne("Duende.IdentityServer.EntityFramework.Entities.ApiResource", "ApiResource") @@ -1013,6 +1269,83 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("IdentityResource"); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAllowedScope", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AllowedScopes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlAssertionConsumerService", 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.SamlAuthnContextMapping", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("AuthnContextMappings") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlCertificate", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("Certificates") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlClaimMapping", 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.SamlRequestedClaimType", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("RequestedClaimTypes") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSingleLogoutService", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", "SamlServiceProvider") + .WithMany("SingleLogoutServiceUrls") + .HasForeignKey("SamlServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlServiceProvider"); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ApiResource", b => { b.Navigation("Properties"); @@ -1058,6 +1391,23 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("UserClaims"); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlServiceProvider", b => + { + b.Navigation("AllowedScopes"); + + b.Navigation("AssertionConsumerServiceUrls"); + + b.Navigation("AuthnContextMappings"); + + b.Navigation("Certificates"); + + b.Navigation("ClaimMappings"); + + b.Navigation("RequestedClaimTypes"); + + b.Navigation("SingleLogoutServiceUrls"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610191253_UpdateV8.Designer.cs b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610191253_UpdateV8.Designer.cs new file mode 100644 index 00000000..0cde2f7f --- /dev/null +++ b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610191253_UpdateV8.Designer.cs @@ -0,0 +1,361 @@ +// +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.PersistedGrantDb +{ + [DbContext(typeof(PersistedGrantDbContext))] + [Migration("20260610191253_UpdateV8")] + partial class UpdateV8 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => + { + b.Property("UserCode") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.HasKey("UserCode"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.ToTable("DeviceCodes", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Algorithm") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DataProtected") + .HasColumnType("INTEGER"); + + b.Property("IsX509Certificate") + .HasColumnType("INTEGER"); + + b.Property("Use") + .HasColumnType("TEXT"); + + b.Property("Version") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("Use"); + + b.ToTable("Keys", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ConsumedTime") + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ConsumedTime"); + + b.HasIndex("Expiration"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.HasIndex("SubjectId", "SessionId", "Type"); + + b.ToTable("PersistedGrants", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PushedAuthorizationRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ReferenceValueHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("ReferenceValueHash") + .IsUnique(); + + b.ToTable("PushedAuthorizationRequests", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Created") + .HasColumnType("TEXT"); + + b.Property("Data") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Expires") + .HasColumnType("TEXT"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Renewed") + .HasColumnType("TEXT"); + + b.Property("Scheme") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.HasIndex("Expires"); + + b.HasIndex("Key") + .IsUnique(); + + b.HasIndex("SessionId"); + + b.HasIndex("SubjectId"); + + b.ToTable("ServerSideSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610191253_UpdateV8.cs b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610191253_UpdateV8.cs new file mode 100644 index 00000000..dfeb1e44 --- /dev/null +++ b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/20260610191253_UpdateV8.cs @@ -0,0 +1,113 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IdentityServerHost.Migrations.PersistedGrantDb +{ + /// + public partial class UpdateV8 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "SamlLogoutSessions", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + LogoutId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SerializedSession = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + Version = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlSigninStates", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + StateId = table.Column(type: "TEXT", nullable: false), + SerializedState = table.Column(type: "TEXT", nullable: false), + ExpiresAtUtc = table.Column(type: "TEXT", nullable: false), + ServiceProviderEntityId = table.Column(type: "TEXT", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlSigninStates", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SamlLogoutSessionRequestIndices", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + RequestId = table.Column(type: "TEXT", maxLength: 200, nullable: false), + SamlLogoutSessionId = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_SamlLogoutSessionRequestIndices", x => x.Id); + table.ForeignKey( + name: "FK_SamlLogoutSessionRequestIndices_SamlLogoutSessions_SamlLogoutSessionId", + column: x => x.SamlLogoutSessionId, + principalTable: "SamlLogoutSessions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_RequestId", + table: "SamlLogoutSessionRequestIndices", + column: "RequestId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessionRequestIndices_SamlLogoutSessionId", + table: "SamlLogoutSessionRequestIndices", + column: "SamlLogoutSessionId"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_ExpiresAtUtc", + table: "SamlLogoutSessions", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlLogoutSessions_LogoutId", + table: "SamlLogoutSessions", + column: "LogoutId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_ExpiresAtUtc", + table: "SamlSigninStates", + column: "ExpiresAtUtc"); + + migrationBuilder.CreateIndex( + name: "IX_SamlSigninStates_StateId", + table: "SamlSigninStates", + column: "StateId", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "SamlLogoutSessionRequestIndices"); + + migrationBuilder.DropTable( + name: "SamlSigninStates"); + + migrationBuilder.DropTable( + name: "SamlLogoutSessions"); + } + } +} diff --git a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index 4277d760..a673daa8 100755 --- a/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs +++ b/IdentityServer/v8/UserInteraction/WsFederationDynamicProviders/IdentityServerHost/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Duende.IdentityServer.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; @@ -15,7 +15,7 @@ partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b => { @@ -45,8 +45,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(200) .HasColumnType("TEXT"); - b.Property("Expiration") - .IsRequired() + b.Property("Expiration") .HasColumnType("TEXT"); b.Property("SessionId") @@ -193,6 +192,93 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("PushedAuthorizationRequests", (string)null); }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("LogoutId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SerializedSession") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("LogoutId") + .IsUnique(); + + b.ToTable("SamlLogoutSessions", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("RequestId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("SamlLogoutSessionId") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("RequestId") + .IsUnique(); + + b.HasIndex("SamlLogoutSessionId"); + + b.ToTable("SamlLogoutSessionRequestIndices", (string)null); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlSigninState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ExpiresAtUtc") + .HasColumnType("TEXT"); + + b.Property("SerializedState") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ServiceProviderEntityId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("StateId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAtUtc"); + + b.HasIndex("StateId") + .IsUnique(); + + b.ToTable("SamlSigninStates", (string)null); + }); + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b => { b.Property("Id") @@ -250,6 +336,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("ServerSideSessions", (string)null); }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSessionRequestIndex", b => + { + b.HasOne("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", "SamlLogoutSession") + .WithMany("RequestIndices") + .HasForeignKey("SamlLogoutSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SamlLogoutSession"); + }); + + modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.SamlLogoutSession", b => + { + b.Navigation("RequestIndices"); + }); #pragma warning restore 612, 618 } } diff --git a/IdentityServer/v8/global.json b/IdentityServer/v8/global.json index 9ba75da8..53071316 100755 --- a/IdentityServer/v8/global.json +++ b/IdentityServer/v8/global.json @@ -5,6 +5,6 @@ "allowPrerelease": false }, "msbuild-sdks": { - "Aspire.AppHost.Sdk": "13.2.3" + "Aspire.AppHost.Sdk": "13.4.3" } }