Skip to content

Commit

Permalink
Merge pull request #44 from skoruba/release/1.1.0
Browse files Browse the repository at this point in the history
Release/1.1.0 🚀
  • Loading branch information
skoruba authored Jan 26, 2022
2 parents 0da8113 + f7a0dc5 commit debcc2a
Show file tree
Hide file tree
Showing 140 changed files with 11,816 additions and 1,778 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>1.0.1</Version>
<Version>1.1.0</Version>
<Authors>Jan Škoruba</Authors>
<PackageTags>Duende IdentityServer Admin OpenIDConnect OAuth2 Identity</PackageTags>
<PackageLicenseUrl>https://github.com/skoruba/Duende.IdentityServer.Admin/blob/main/LICENSE</PackageLicenseUrl>
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
[![Build status](https://ci.appveyor.com/api/projects/status/563ug5gcxk904m6g/branch/main?svg=true)](https://ci.appveyor.com/project/JanSkoruba/duende-identityserver-admin/branch/main)
[![Join the chat at https://gitter.im/skoruba/IdentityServer4.Admin](https://badges.gitter.im/skoruba/IdentityServer4.Admin.svg)](https://gitter.im/skoruba/IdentityServer4.Admin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The application is written in the **Asp.Net Core MVC - using .NET 5.0**
The application is written in the **Asp.Net Core MVC - using .NET 6.0**

## Requirements

- [Install](https://www.microsoft.com/net/download/windows#/current) the latest .NET 5 SDK (using older versions may lead to 502.5 errors when hosted on IIS or application exiting immediately after starting when self-hosted)
- [Install](https://www.microsoft.com/net/download/windows#/current) the latest .NET 6 SDK (using older versions may lead to 502.5 errors when hosted on IIS or application exiting immediately after starting when self-hosted)

## Installation via dotnet new template

Expand All @@ -22,7 +22,7 @@ The application is written in the **Asp.Net Core MVC - using .NET 5.0**
- 🔒 **NOTE:** The project uses the default database migrations which affect your database therefore double check the migrations according to your database provider and create a database backup

```sh
dotnet new -i Skoruba.Duende.IdentityServer.Admin.Templates::1.0.1
dotnet new -i Skoruba.Duende.IdentityServer.Admin.Templates::1.1.0
```

### Create new project:
Expand Down Expand Up @@ -376,7 +376,7 @@ Admin and STS can be customized without editing code in `appsettings.json` under

Ui can be customized using themes integrated from [bootswatch](https://bootswatch.com).

From version 2.0.0 is possible to change theme from UI. 🎈
It's possible to change theme from UI. 🎈

By default, configuration value is null to use default theme. if you want to use a theme, just fill the lowercase theme name as configuration value of `Theme` key.

Expand Down Expand Up @@ -731,7 +731,8 @@ It is possible to define the configuration according the client type - by defaul
- [x] Extract UI part into nuget package ([#770](https://github.com/skoruba/IdentityServer4.Admin/issues/770), [#409](https://github.com/skoruba/IdentityServer4.Admin/issues/409), [#55](https://github.com/skoruba/IdentityServer4.Admin/issues/55), [#322](https://github.com/skoruba/IdentityServer4.Admin/issues/322), [#28](https://github.com/skoruba/IdentityServer4.Admin/issues/28), [#133](https://github.com/skoruba/IdentityServer4.Admin/issues/133))

### 1.1.0
- [ ] Update to .NET 6
- [x] Update to .NET 6
- [x] Update to Duende IdentityServer v6

### 2.0.0
- [ ] Connect Admin Api to the Admin UI ([#478](https://github.com/skoruba/IdentityServer4.Admin/issues/478))
Expand Down
3 changes: 1 addition & 2 deletions build/add-migrations.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
param([string] $migration = 'DbInit', [string] $migrationProviderName = 'All', [string] $targetContext = 'All')
$projectName = "Skoruba.Duende.IdentityServer";
param([string] $migration = 'DbInit', [string] $migrationProviderName = 'All', [string] $targetContext = 'All', [string] $projectName = 'Skoruba.Duende.IdentityServer')
$currentPath = Get-Location
Set-Location "../src/$projectName.Admin"
Copy-Item appsettings.json -Destination appsettings-backup.json
Expand Down
2 changes: 1 addition & 1 deletion build/publish-docker-images.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param([string] $version)
Set-Location "../"

# build docker images according to docker-compose
docker-compose build
docker-compose -f docker-compose.yml build

# rename images with following tag
docker tag skoruba-duende-identityserver-admin skoruba/duende-identityserver-admin:$version
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.vs.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
labels:
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/net5.0/Skoruba.Duende.IdentityServer.Admin.dll" /seed'
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/net6.0/Skoruba.Duende.IdentityServer.Admin.dll" /seed'

skoruba.duende.identityserver.admin.api:
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.vs.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
labels:
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/net5.0/Skoruba.Duende.IdentityServer.Admin.dll" /seed'
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/net6.0/Skoruba.Duende.IdentityServer.Admin.dll" /seed'

skoruba.duende.identityserver.admin.api:
volumes:
Expand Down
4 changes: 2 additions & 2 deletions src/Skoruba.Duende.IdentityServer.Admin.Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["src/Skoruba.Duende.IdentityServer.Admin.Api/Skoruba.Duende.IdentityServer.Admin.Api.csproj", "src/Skoruba.Duende.IdentityServer.Admin.Api/"]
COPY ["src/Skoruba.Duende.IdentityServer.Admin.EntityFramework.PostgreSQL/Skoruba.Duende.IdentityServer.Admin.EntityFramework.PostgreSQL.csproj", "src/Skoruba.Duende.IdentityServer.Admin.EntityFramework.PostgreSQL/"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public ClientApiDto()

public bool RequireRequestObject { get; set; }

public int? CibaLifetime { get; set; }
public int? PollingInterval { get; set; }


public List<string> AllowedIdentityTokenSigningAlgorithms { get; set; }

public bool NonEditable { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ public class KeyApiDto
public string Use { get; set; }
public string Algorithm { get; set; }
public bool IsX509Certificate { get; set; }
public bool DataProtected { get; set; }
public string Data { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Skoruba.Duende.IdentityServer.Admin.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static IConfiguration GetConfiguration(string[] args)

if (isDevelopment)
{
configurationBuilder.AddUserSecrets<Startup>();
configurationBuilder.AddUserSecrets<Startup>(true);
}

var configuration = configurationBuilder.Build();
Expand All @@ -77,7 +77,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
if (env.IsDevelopment())
{
configApp.AddUserSecrets<Startup>();
configApp.AddUserSecrets<Startup>(true);
}
configurationRoot.AddAzureKeyVaultConfiguration(configApp);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>1cc472a2-4e4b-48ce-846b-5219f71fc643</UserSecretsId>
<DockerComposeProjectPath>..\..\docker-compose.dcproj</DockerComposeProjectPath>
Expand All @@ -10,47 +10,43 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.MySql" Version="5.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="5.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.OpenIdConnectServer" Version="5.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="5.0.3" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.12" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.12" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="5.0.12" />

<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="5.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.2.3" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.2.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="5.6.1" />
<PackageReference Include="AspNetCore.HealthChecks.MySql" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.OpenIdConnectServer" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.2" />
<PackageReference Include="AutoMapper" Version="11.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.2.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="5.6.1" />
<PackageReference Include="Serilog.Sinks.Seq" Version="5.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.2.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Identity\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Identity.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Shared\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Shared.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.BusinessLogic\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework.MySql\Skoruba.Duende.IdentityServer.Admin.EntityFramework.MySql.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework.PostgreSQL\Skoruba.Duende.IdentityServer.Admin.EntityFramework.PostgreSQL.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework.Shared\Skoruba.Duende.IdentityServer.Admin.EntityFramework.Shared.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework.SqlServer\Skoruba.Duende.IdentityServer.Admin.EntityFramework.SqlServer.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Shared.Configuration\Skoruba.Duende.IdentityServer.Shared.Configuration.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Shared\Skoruba.Duende.IdentityServer.Shared.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Description>Business Logic layer for the administration of the Asp.Net Core Identity and Duende IdentityServer</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="5.2.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.12" />
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="6.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Shared\Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Shared.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework.Identity\Skoruba.Duende.IdentityServer.Admin.EntityFramework.Identity.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework\Skoruba.Duende.IdentityServer.Admin.EntityFramework.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Description>Shared Business Logic layer for the administration of the Duende IdentityServer and Asp.Net Core Identity</Description>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public ClientDto()
public string UserCodeType { get; set; }
public int DeviceCodeLifetime { get; set; } = 300;

public int? CibaLifetime { get; set; }
public int? PollingInterval { get; set; }

public bool NonEditable { get; set; }

public bool RequireRequestObject { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ public class KeyDto
public string Use { get; set; }
public string Algorithm { get; set; }
public bool IsX509Certificate { get; set; }
public bool DataProtected { get; set; }
public string Data { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Description>Business Logic layer for the administration of the Duende IdentityServer</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="5.2.3" />
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="6.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Jan Škoruba. All Rights Reserved.
// Licensed under the Apache License, Version 2.0.

using System;
using System.Reflection;
using Duende.IdentityServer.EntityFramework.Storage;
using Microsoft.AspNetCore.DataProtection.EntityFrameworkCore;
Expand All @@ -24,6 +25,7 @@ public static class DatabaseExtensions
/// <typeparam name="TLogDbContext"></typeparam>
/// <typeparam name="TIdentityDbContext"></typeparam>
/// <typeparam name="TAuditLoggingDbContext"></typeparam>
/// <typeparam name="TDataProtectionDbContext"></typeparam>
/// <param name="services"></param>
/// <param name="connectionStrings"></param>
/// <param name="databaseMigrations"></param>
Expand All @@ -41,6 +43,8 @@ public static class DatabaseExtensions
{
var migrationsAssembly = typeof(DatabaseExtensions).GetTypeInfo().Assembly.GetName().Name;

AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);

// Config DB for identity
services.AddDbContext<TIdentityDbContext>(options =>
options.UseNpgsql(connectionStrings.IdentityDbConnection, sql => sql.MigrationsAssembly(databaseMigrations.IdentityDbMigrationsAssembly ?? migrationsAssembly)));
Expand Down Expand Up @@ -91,6 +95,8 @@ public static class DatabaseExtensions
{
var migrationsAssembly = typeof(DatabaseExtensions).GetTypeInfo().Assembly.GetName().Name;

AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);

// Config DB for identity
services.AddDbContext<TIdentityDbContext>(options => options.UseNpgsql(identityConnectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Description>Entity Framework configuration for the administration of the Duende IdentityServer and Asp.Net Core Identity</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="5.0.12" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.2" />
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="1.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.2" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.12" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework.Identity\Skoruba.Duende.IdentityServer.Admin.EntityFramework.Identity.csproj" />
<ProjectReference Include="..\Skoruba.Duende.IdentityServer.Admin.EntityFramework\Skoruba.Duende.IdentityServer.Admin.EntityFramework.csproj" />
</ItemGroup>

</Project>
Expand Down
Loading

0 comments on commit debcc2a

Please sign in to comment.