Skip to content

Commit

Permalink
Merge pull request #939 from skoruba/release/2.1.0
Browse files Browse the repository at this point in the history
🚀 Release/2.1.0
  • Loading branch information
skoruba authored Jan 28, 2022
2 parents 7023c0c + c235c51 commit 045026e
Show file tree
Hide file tree
Showing 182 changed files with 2,209 additions and 2,012 deletions.
27 changes: 27 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project>

<PropertyGroup>
<Version>2.1.0</Version>
<Authors>Jan Škoruba</Authors>
<LangVersion>latest</LangVersion>
<PackageTags>IdentityServer4 Admin OpenIDConnect OAuth2 Identity</PackageTags>
<PackageProjectUrl>https://github.com/skoruba/IdentityServer4.Admin</PackageProjectUrl>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\package\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
[![Build Status](https://dev.azure.com/skoruba/IdentityServer4.Admin/_apis/build/status/IdentityServer4.Admin-CI?branchName=master)](https://dev.azure.com/skoruba/IdentityServer4.Admin/_build/latest?definitionId=2?branchName=master)
[![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**
The application is written in the **Asp.Net Core MVC - using .NET 6**

### 🎉 New version of Duende IdentityServer Admin UI available [here](https://github.com/skoruba/Duende.IdentityServer.Admin)

## 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 @@ -25,7 +27,7 @@ The application is written in the **Asp.Net Core MVC - using .NET 5**
- 🔒 **NOTE:** This version affects your database data if you use the default database migrations that are part of the project - double check the migrations according to your database provider and create a database backup

```sh
dotnet new -i Skoruba.IdentityServer4.Admin.Templates::2.0.1
dotnet new -i Skoruba.IdentityServer4.Admin.Templates::2.1.0
```

### Create new project:
Expand Down Expand Up @@ -205,7 +207,7 @@ The following Gulp commands are available:
- `AdminLogDbContext`: for logging
- `IdentityServerConfigurationDbContext`: for IdentityServer configuration store
- `IdentityServerPersistedGrantDbContext`: for IdentityServer operational store
- `AuditLoggingDbContext`: for Audit Logging
- `AdminAuditLogDbContext`: for Audit Logging
- `IdentityServerDataProtectionDbContext`: for dataprotection

### Run entity framework migrations:
Expand Down Expand Up @@ -391,7 +393,7 @@ By default, configuration value is null to use default theme. if you want to use

You can also use your custom theme by integrating it in your project or hosting css on your place to pass the url in `CustomThemeCss` key. (Note that custom theme override standard theme)

- Important Note: Theme can use external ressources which caused errors due to CSP. If you get errors, please make sure that you configured correctly CSP section in your `appsettings.json` with thrusted domains for ressources.
- Important Note: Theme can use external resources which caused errors due to CSP. If you get errors, please make sure that you configured correctly CSP section in your `appsettings.json` with thrusted domains for resources.

```json
"AdminConfiguration": {
Expand Down Expand Up @@ -530,7 +532,7 @@ In STS project - in `appsettings.json`:

## CSP - Content Security Policy

- If you want to use favicon or logo not included/hosted on the same place, you need to declare trusted domain where ressources are hosted in appsettings.json.
- If you want to use favicon or logo not included/hosted on the same place, you need to declare trusted domain where resources are hosted in appsettings.json.

```
"CspTrustedDomains": [
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-identityserver4-admin skoruba/identityserver4-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.IdentityServer4.Admin.dll" /seed'
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/net6.0/Skoruba.IdentityServer4.Admin.dll" /seed'

skoruba.identityserver4.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.IdentityServer4.Admin.dll" /seed'
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/net6.0/Skoruba.IdentityServer4.Admin.dll" /seed'

skoruba.identityserver4.admin.api:
volumes:
Expand Down
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ services:
- 'ConnectionStrings__IdentityDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true'
- 'ConnectionStrings__DataProtectionDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true'
- 'AdminConfiguration__IdentityAdminBaseUrl=https://admin.skoruba.local'
- 'AdvancedConfiguration__IssuerUri=https://sts.skoruba.local'
- 'IdentityServerOptions__IssuerUri=https://sts.skoruba.local'
- IdentityServerOptions__Events__RaiseErrorEvents=true
- IdentityServerOptions__Events__RaiseInformationEvents=true
- IdentityServerOptions__Events__RaiseFailureEvents=true
- IdentityServerOptions__Events__RaiseSuccessEvents=true
- DockerConfiguration__UpdateCaCertificate=true
- ASPNETCORE_ENVIRONMENT=Development
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion docs/Configure-Ubuntu-PostgreSQL-Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Throughout tutorial we will use PostgreSQL running on localhost and default port

```
sudo -u postgres psql
ALTER USER postgre WITH PASSWORD 'postgres';
ALTER USER postgres WITH PASSWORD 'postgres';
```

## IDE
Expand Down
Binary file added package/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task<IActionResult> Put([FromBody]ClientApiDto client)
var clientDto = client.ToClientApiModel<ClientDto>();

await _clientService.GetClientAsync(clientDto.Id);
await _clientService.UpdateClientAsync(clientDto);
await _clientService.UpdateClientAsync(clientDto, true, true);

return Ok();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Skoruba.IdentityServer4.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 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 AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["src/Skoruba.IdentityServer4.Admin.Api/Skoruba.IdentityServer4.Admin.Api.csproj", "src/Skoruba.IdentityServer4.Admin.Api/"]
COPY ["src/Skoruba.IdentityServer4.Admin.EntityFramework.MySql/Skoruba.IdentityServer4.Admin.EntityFramework.MySql.csproj", "src/Skoruba.IdentityServer4.Admin.EntityFramework.MySql/"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ public ApiScopeApiDto()
public bool Enabled { get; set; } = true;

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

public List<ApiScopePropertyApiDto> ApiScopeProperties { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@ public ClientApiDto()
public bool RequireRequestObject { get; set; }

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

public bool NonEditable { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
namespace Skoruba.IdentityServer4.Admin.Api.Dtos.PersistedGrants
using System;

namespace Skoruba.IdentityServer4.Admin.Api.Dtos.PersistedGrants
{
public class PersistedGrantSubjectApiDto
{
public string Key { get; set; }
public string Type { get; set; }
public string SubjectId { get; set; }
public string SubjectName { get; set; }
public string ClientId { get; set; }
public DateTime CreationTime { get; set; }
public DateTime? Expiration { get; set; }
public string Data { get; set; }
public DateTime? ConsumedTime { get; set; }
public string SessionId { get; set; }
public string Description { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Skoruba.IdentityServer4.Admin.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static IConfiguration GetConfiguration(string[] args)

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

var configuration = configurationBuilder.Build();
Expand All @@ -74,7 +74,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,87 +1,70 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>2.0.1</Version>
<Authors>Jan Škoruba</Authors>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>1cc472a2-4e4b-48ce-846b-5219f71fc643</UserSecretsId>
<DockerComposeProjectPath>..\..\docker-compose.dcproj</DockerComposeProjectPath>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
</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.2" />
<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.5" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.5" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="5.0.5" />

<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="5.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.1.3" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.1.3" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="5.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.BusinessLogic.Identity\Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.BusinessLogic.Shared\Skoruba.IdentityServer4.Admin.BusinessLogic.Shared.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.BusinessLogic\Skoruba.IdentityServer4.Admin.BusinessLogic.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.MySql\Skoruba.IdentityServer4.Admin.EntityFramework.MySql.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.PostgreSQL\Skoruba.IdentityServer4.Admin.EntityFramework.PostgreSQL.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.Shared\Skoruba.IdentityServer4.Admin.EntityFramework.Shared.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.SqlServer\Skoruba.IdentityServer4.Admin.EntityFramework.SqlServer.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Shared.Configuration\Skoruba.IdentityServer4.Shared.Configuration.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Shared\Skoruba.IdentityServer4.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="Resources\ApiErrorResource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ApiErrorResource.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\ApiErrorResource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ApiErrorResource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>1cc472a2-4e4b-48ce-846b-5219f71fc643</UserSecretsId>
<DockerComposeProjectPath>..\..\docker-compose.dcproj</DockerComposeProjectPath>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>

<ItemGroup>
<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="10.1.1" />
<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.IdentityServer4.Admin.BusinessLogic.Identity\Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.BusinessLogic\Skoruba.IdentityServer4.Admin.BusinessLogic.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.MySql\Skoruba.IdentityServer4.Admin.EntityFramework.MySql.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.PostgreSQL\Skoruba.IdentityServer4.Admin.EntityFramework.PostgreSQL.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework.SqlServer\Skoruba.IdentityServer4.Admin.EntityFramework.SqlServer.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Shared.Configuration\Skoruba.IdentityServer4.Shared.Configuration.csproj" />
<ProjectReference Include="..\Skoruba.IdentityServer4.Shared\Skoruba.IdentityServer4.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="Resources\ApiErrorResource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ApiErrorResource.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\ApiErrorResource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ApiErrorResource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>











Loading

0 comments on commit 045026e

Please sign in to comment.