Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Release/2.0.0-beta1 #753

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6c73e33
Initial migration IS4 verstion 3 to version 4 (without tests migratio…
skoruba Oct 29, 2020
ddae7a5
Fix unit tests
skoruba Oct 29, 2020
0dd12a5
Update packages for integration tests
skoruba Oct 29, 2020
538523b
Fix tests
skoruba Oct 30, 2020
dedb7f1
Add initial db migrations
skoruba Nov 2, 2020
53d1f94
Polish DB migration for updating IS4 configuration data
skoruba Nov 2, 2020
5dcb80b
Fix Api Scope on UI
skoruba Nov 2, 2020
e178695
Fix tests and add Api Scope to menu
skoruba Nov 2, 2020
26420f9
Update README.md
skoruba Nov 2, 2020
cd9c044
Clean up ApiScopes method
skoruba Nov 2, 2020
332ce3f
Merge remote-tracking branch 'origin/master' into feature/633-update-…
skoruba Nov 7, 2020
80d38ab
Move ApiScope from ApiResource namespace to separate ApiScope classes
skoruba Nov 7, 2020
52866c0
Add method for searching in api scopes
skoruba Nov 7, 2020
dfa2d41
Add search for Api Scope
skoruba Nov 7, 2020
b587ae0
Add support for managing Api Scope Properties
skoruba Nov 8, 2020
85bc6fb
Separate ApiScopeDto from ApiScopesDto; Add new fields for Client; Ap…
skoruba Nov 8, 2020
cfaa11c
Fix IS and Identity data seed
skoruba Nov 8, 2020
5e7b9d2
Add missing translations and resx files.
skoruba Nov 8, 2020
374fca1
Add missing properties in APO dtos; Add support for Api Scope Propert…
skoruba Nov 8, 2020
f7d2497
Add migrations for mysql and postgresql
skoruba Nov 8, 2020
c2ca1c4
Remove IS PublicOrigin property
skoruba Nov 8, 2020
96f48c4
Fix db migration for PostgreSQL and MySql; Fix IdentityServer data seed;
skoruba Nov 8, 2020
3b88db5
Show persisted grants new fields in UI; Add missing translations;
skoruba Nov 8, 2020
283d6b3
Update README.md
skoruba Nov 17, 2020
e38ff3d
Update README.md
skoruba Nov 17, 2020
a007ed3
Update to 2.0.0-beta1
skoruba Nov 17, 2020
62a96fa
Update README.md
skoruba Nov 17, 2020
703818e
Update README.md
skoruba Nov 17, 2020
f61dbc5
Update README.md
skoruba Nov 17, 2020
d97af7e
Remove DbSet from inherited DbContext
skoruba Nov 17, 2020
047a2c4
Merge branch 'release/2.0.0-beta1' of https://github.com/skoruba/Iden…
skoruba Nov 17, 2020
e2a5968
Update dotnet new template
skoruba Nov 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

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

**NOTE:** Currently works only with **IdentityServer4 version 3** 🚀

## Requirements

- [Install](https://www.microsoft.com/net/download/windows#/current) the latest .NET Core 3.x SDK (using older versions may lead to 502.5 errors when hosted on IIS or application exiting immediately after starting when self-hosted)
Expand All @@ -22,11 +20,23 @@ The application is written in the **Asp.Net Core MVC - using .NET Core 3.1**

- Install the dotnet new template:

### Stable version 1.0.0 works with **IdentityServer4 version 3** 🚀

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

- Create new project:
### Beta version 2.0.0 works with **IdentityServer4 version 4** 🚀

- 🔒 **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

- The source code for version **2.0.0** is available in the branch [release/2.0.0-beta1](https://github.com/skoruba/IdentityServer4.Admin/tree/release/2.0.0-beta1)

```sh
dotnet new -i Skoruba.IdentityServer4.Admin.Templates::2.0.0-beta1
```

### Create new project:

```sh
dotnet new skoruba.is4admin --name MyProject --title MyProject --adminemail "admin@example.com" --adminpassword "Pa$$word123" --adminrole MyRole --adminclientid MyClientId --adminclientsecret MyClientSecret --dockersupport true
Expand Down Expand Up @@ -161,11 +171,20 @@ docker-compose up -d
### Docker images
- Docker images will be available also in [docker hub](https://hub.docker.com/u/skoruba)
- AdminUI:
- **Stable version:**
- `skoruba/identityserver4-admin:1.0.0`
- **Beta version:**
- `skoruba/identityserver4-admin:2.0.0-beta1`
- Admin Api:
- **Stable version:**
- `skoruba/identityserver4-admin-api:1.0.0`
- **Beta version:**
- `skoruba/identityserver4-admin-api:2.0.0-beta1`
- STS:
- **Stable version:**
- `skoruba/identityserver4-sts-identity:1.0.0`
- **Beta version:**
- `skoruba/identityserver4-sts-identity:2.0.0-beta1`

### Publish Docker images to Docker hub
- Check the script in `build/publish-docker-images.ps1` - change the profile name according to your requirements.
Expand Down Expand Up @@ -722,7 +741,7 @@ It is possible to define the configuration according the client type - by defaul
- [x] Protect keys for dataprotection from Azure Key Vault ([#715](https://github.com/skoruba/IdentityServer4.Admin/pull/715))

### 2.0.0
- [ ] Update to IdentityServer4 version 4 ([#633](https://github.com/skoruba/IdentityServer4.Admin/issues/633))
- [x] Update to IdentityServer4 version 4 ([#633](https://github.com/skoruba/IdentityServer4.Admin/issues/633))

### 3.0.0:

Expand Down
14 changes: 9 additions & 5 deletions build/add-migrations.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
param([string] $migration = 'DbInit', [string] $migrationProviderName = 'All')
param([string] $migration = 'DbInit', [string] $migrationProviderName = 'All', [string] $targetContext = 'All')
$projectName = "Skoruba.IdentityServer4";
$currentPath = Get-Location
Set-Location "../src/$projectName.Admin"
Expand All @@ -12,7 +12,7 @@ $targetContexts = @{
IdentityServerConfigurationDbContext = "Migrations\IdentityServerConfiguration";
IdentityServerPersistedGrantDbContext = "Migrations\IdentityServerGrants";
AdminAuditLogDbContext = "Migrations\AuditLogging";
IdentityServerDataProtectionDbContext = "Migrations\DataProtection";
IdentityServerDataProtectionDbContext = "Migrations\DataProtection";
}

#Initialize the db providers and it's respective projects
Expand Down Expand Up @@ -41,10 +41,14 @@ foreach ($provider in $dpProviders.Keys) {
$settings | set-content appsettings.json
if ((Test-Path $projectPath) -eq $true) {
foreach ($context in $targetContexts.Keys) {
$migrationPath = $targetContexts[$context];

if ($targetContext -eq 'All' -or $context -eq $targetContext) {

Write-Host "Migrating context " $context
dotnet ef migrations add $migration -c $context -o $migrationPath -p $projectPath
$migrationPath = $targetContexts[$context];

Write-Host "Migrating context " $context
dotnet ef migrations add $migration -c $context -o $migrationPath -p $projectPath
}
}
}

Expand Down
59 changes: 59 additions & 0 deletions build/rollback-migrations.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
param([string] $migration = 'DbInit', [string] $migrationProviderName = 'All', [string] $targetContext = 'All')
$projectName = "Skoruba.IdentityServer4";
$currentPath = Get-Location
Set-Location "../src/$projectName.Admin"
Copy-Item appsettings.json -Destination appsettings-backup.json
$settings = Get-Content appsettings.json -raw

#Initialze db context and define the target directory
$targetContexts = @{
AdminIdentityDbContext = "Migrations\Identity"
AdminLogDbContext = "Migrations\Logging";
IdentityServerConfigurationDbContext = "Migrations\IdentityServerConfiguration";
IdentityServerPersistedGrantDbContext = "Migrations\IdentityServerGrants";
AdminAuditLogDbContext = "Migrations\AuditLogging";
IdentityServerDataProtectionDbContext = "Migrations\DataProtection";
}

#Initialize the db providers and it's respective projects
$dpProviders = @{
SqlServer = "..\..\src\$projectName.Admin.EntityFramework.SqlServer\$projectName.Admin.EntityFramework.SqlServer.csproj";
PostgreSQL = "..\..\src\$projectName.Admin.EntityFramework.PostgreSQL\$projectName.Admin.EntityFramework.PostgreSQL.csproj";
MySql = "..\..\src\$projectName.Admin.EntityFramework.MySql\$projectName.Admin.EntityFramework.MySql.csproj";
}

#Fix issue when the tools is not installed and the nuget package does not work see https://github.com/MicrosoftDocs/azure-docs/issues/40048
Write-Host "Updating donet ef tools"
$env:Path += " % USERPROFILE % \.dotnet\tools";
dotnet tool update --global dotnet-ef

Write-Host "Start migrate projects"
foreach ($provider in $dpProviders.Keys) {

if ($migrationProviderName -eq 'All' -or $migrationProviderName -eq $provider) {

$projectPath = (Get-Item -Path $dpProviders[$provider] -Verbose).FullName;
Write-Host "Generate migration for db provider:" $provider ", for project path - " $projectPath

$providerName = '"ProviderType": "' + $provider + '"'

$settings = $settings -replace '"ProviderType".*', $providerName
$settings | set-content appsettings.json
if ((Test-Path $projectPath) -eq $true) {
foreach ($context in $targetContexts.Keys) {

if ($targetContext -eq 'All' -or $context -eq $targetContext) {

Write-Host "Migrating context " $context
dotnet ef database update $migration -c $context -p $projectPath
}
}
}

}
}

Remove-Item appsettings.json
Copy-Item appsettings-backup.json -Destination appsettings.json
Remove-Item appsettings-backup.json
Set-Location $currentPath
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ 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__PublicOrigin=https://sts.skoruba.local'
- 'AdvancedConfiguration__IssuerUri=https://sts.skoruba.local'
- DockerConfiguration__UpdateCaCertificate=true
- ASPNETCORE_ENVIRONMENT=Development
Expand Down
21 changes: 12 additions & 9 deletions shared/identityserverdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,22 @@
]
}
],
"ApiScopes": [
{
"Name": "skoruba_identity_admin_api",
"DisplayName": "skoruba_identity_admin_api",
"Required": true,
"UserClaims": [
"role",
"name"
]
}
],
"ApiResources": [
{
"Name": "skoruba_identity_admin_api",
"Scopes": [
{
"Name": "skoruba_identity_admin_api",
"DisplayName": "skoruba_identity_admin_api",
"Required": true,
"UserClaims": [
"role",
"name"
]
}
"skoruba_identity_admin_api"
]
}
],
Expand Down
Loading