-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New release 1.0.0-rc1
- Loading branch information
Showing
1,792 changed files
with
169,989 additions
and
5,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
**/_ReSharper.Caches | ||
LICENSE | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
param([string] $migration = 'DbInit', [string] $migrationProviderName = '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"; | ||
} | ||
|
||
#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 --version 3.1.0 | ||
|
||
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) { | ||
$migrationPath = $targetContexts[$context]; | ||
|
||
Write-Host "Migrating context " $context | ||
dotnet ef migrations add $migration -c $context -o $migrationPath -p $projectPath | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
Remove-Item appsettings.json | ||
Copy-Item appsettings-backup.json -Destination appsettings.json | ||
Remove-Item appsettings-backup.json | ||
Set-Location $currentPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# build docker images according to docker-compose | ||
docker-compose build | ||
|
||
# rename images with following tag | ||
docker tag skoruba-identityserver4-admin skoruba/identityserver4-admin:rc1 | ||
docker tag skoruba-identityserver4-sts-identity skoruba/identityserver4-sts-identity:rc1 | ||
docker tag skoruba-identityserver4-admin-api skoruba/identityserver4-admin-api:rc1 | ||
|
||
# push to docker hub | ||
docker push skoruba/identityserver4-admin:rc1 | ||
docker push skoruba/identityserver4-admin-api:rc1 | ||
docker push skoruba/identityserver4-sts-identity:rc1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectVersion>2.1</ProjectVersion> | ||
<DockerTargetOS>Linux</DockerTargetOS> | ||
<ProjectGuid>f817047f-018d-4f93-bda5-58602073b634</ProjectGuid> | ||
<DockerLaunchAction>None</DockerLaunchAction> | ||
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl> | ||
<DockerServiceName>skoruba.identityserver4.admin</DockerServiceName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="docker-compose.vs.debug.yml"> | ||
<DependentUpon>docker-compose.yml</DependentUpon> | ||
</None> | ||
<None Include="docker-compose.override.yml"> | ||
<DependentUpon>docker-compose.yml</DependentUpon> | ||
</None> | ||
<None Include="docker-compose.yml" /> | ||
<None Include=".dockerignore" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: '3.4' | ||
|
||
services: | ||
skoruba.identityserver4.admin: | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
ports: | ||
- "80" | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro | ||
skoruba.identityserver4.admin.api: | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
ports: | ||
- "80" | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro | ||
|
||
skoruba.identityserver4.sts.identity: | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
ports: | ||
- "80" | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3.4' | ||
|
||
services: | ||
skoruba.identityserver4.admin: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro | ||
labels: | ||
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/netcoreapp3.1/Skoruba.IdentityServer4.Admin.dll" /seed' | ||
|
||
skoruba.identityserver4.admin.api: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro | ||
|
||
skoruba.identityserver4.sts.identity: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3.4' | ||
|
||
services: | ||
skoruba.identityserver4.admin: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro | ||
labels: | ||
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/netcoreapp3.1/Skoruba.IdentityServer4.Admin.dll" /seed' | ||
|
||
skoruba.identityserver4.admin.api: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro | ||
|
||
skoruba.identityserver4.sts.identity: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
version: '3.4' | ||
|
||
services: | ||
skoruba.identityserver4.admin: | ||
image: ${DOCKER_REGISTRY-}skoruba-identityserver4-admin | ||
ports: | ||
- 9000:80 | ||
build: | ||
context: . | ||
dockerfile: src/Skoruba.IdentityServer4.Admin/Dockerfile | ||
container_name: skoruba-identityserver4-admin | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
- "ConnectionStrings__ConfigurationDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__PersistedGrantDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__IdentityDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__AdminLogDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__AdminAuditLogDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "AdminConfiguration__IdentityAdminBaseUrl=http://127.0.0.1.xip.io:9000" | ||
- "AdminConfiguration__IdentityAdminRedirectUri=http://127.0.0.1.xip.io:9000/signin-oidc" | ||
- "AdminConfiguration__IdentityServerBaseUrl=http://127.0.0.1.xip.io" | ||
- "AdminConfiguration__RequireHttpsMetadata=false" | ||
- "IdentityServerData__Clients__0__ClientUri=http://127.0.0.1.xip.io:9000" | ||
- "IdentityServerData__Clients__0__RedirectUris__0=http://127.0.0.1.xip.io:9000/signin-oidc" | ||
- "IdentityServerData__Clients__0__FrontChannelLogoutUri=http://127.0.0.1.xip.io:9000/signin-oidc" | ||
- "IdentityServerData__Clients__0__PostLogoutRedirectUris__0=http://127.0.0.1.xip.io:9000/signout-callback-oidc" | ||
- "IdentityServerData__Clients__0__AllowedCorsOrigins__0=http://127.0.0.1.xip.io:9000" | ||
- "IdentityServerData__Clients__1__RedirectUris__0=http://127.0.0.1.xip.io:5000/swagger/oauth2-redirect.html" | ||
- "Serilog__WriteTo__1__Args__connectionString=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
command: dotnet Skoruba.IdentityServer4.Admin.dll /seed | ||
depends_on: | ||
- db | ||
- skoruba.identityserver4.sts.identity | ||
volumes: | ||
- "./shared/serilog.json:/app/serilog.json" | ||
- "./shared/identitydata.json:/app/identitydata.json" | ||
- "./shared/identityserverdata.json:/app/identityserverdata.json" | ||
|
||
skoruba.identityserver4.admin.api: | ||
image: ${DOCKER_REGISTRY-}skoruba-identityserver4-admin-api | ||
build: | ||
context: . | ||
dockerfile: src/Skoruba.IdentityServer4.Admin.Api/Dockerfile | ||
ports: | ||
- 5000:80 | ||
environment: | ||
- "AdminApiConfiguration__RequireHttpsMetadata=false" | ||
- "AdminApiConfiguration__ApiBaseUrl=http://127.0.0.1.xip.io:5000" | ||
- "AdminApiConfiguration__IdentityServerBaseUrl=http://127.0.0.1.xip.io" | ||
- "ConnectionStrings__ConfigurationDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__PersistedGrantDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__IdentityDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__AdminLogDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__AdminAuditLogDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
container_name: skoruba-identityserver4-admin-api | ||
volumes: | ||
- "./shared/serilog.json:/app/serilog.json" | ||
|
||
skoruba.identityserver4.sts.identity: | ||
image: ${DOCKER_REGISTRY-}skoruba-identityserver4-sts-identity | ||
ports: | ||
- 80:80 | ||
build: | ||
context: . | ||
dockerfile: src/Skoruba.IdentityServer4.STS.Identity/Dockerfile | ||
container_name: skoruba-identityserver4-sts-identity | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
- "ConnectionStrings__ConfigurationDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__PersistedGrantDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "ConnectionStrings__IdentityDbConnection=Server=db;Database=IdentityServer4Admin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true" | ||
- "AdminConfiguration__IdentityAdminBaseUrl=http://127.0.0.1.xip.io:9000" | ||
depends_on: | ||
- db | ||
volumes: | ||
- "./shared/serilog.json:/app/serilog.json" | ||
networks: | ||
default: | ||
aliases: | ||
- 127.0.0.1.xip.io | ||
db: | ||
image: "mcr.microsoft.com/mssql/server" | ||
ports: | ||
- 1433:1433 | ||
container_name: skoruba-identityserver4-db | ||
environment: | ||
SA_PASSWORD: "${DB_PASSWORD:-Password_123}" | ||
ACCEPT_EULA: "Y" | ||
volumes: | ||
- dbdata:/var/opt/mssql | ||
|
||
volumes: | ||
dbdata: | ||
driver: local | ||
|
||
networks: | ||
default: | ||
driver: bridge |
Oops, something went wrong.