Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit fb8faec

Browse files
committed
discontinued docker
1 parent e362a25 commit fb8faec

19 files changed

Lines changed: 1426 additions & 126 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# JP
2+
-------
3+
4+
5+
The main reason of JP.UI.SSO is using netcore2.0 is because SSL Bug in linux ambients: https://github.com/dotnet/corefx/issues/31034

docker-compose.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# BUG's at SSL and Issuer Validation
2+
# SSL bug: https://github.com/dotnet/corefx/issues/22996 and https://github.com/dotnet/corefx/issues/31034
3+
# There are a mismatch between Angular Isser Name and Api Issuer Name, so it cant validate it inside docker ambient.
14
version: "3"
25

36
networks:
@@ -9,15 +12,6 @@
912
- subnet: 172.20.0.0/16
1013
services:
1114

12-
# #############################
13-
# # Database
14-
# #############################
15-
# redis:
16-
# image: redis:alpine
17-
# ports:
18-
# - "16379:6379"
19-
20-
2115
#############################
2216
# Database
2317
#############################
@@ -50,19 +44,19 @@
5044
dockerfile: sso.dockerfile
5145

5246
ports:
53-
- "5001:80"
54-
- "5000:443"
47+
- "5001:5001"
48+
- "5000:5000"
5549

5650
depends_on:
5751
- database
5852

5953
environment:
6054
SQLSERVER_CONNECTION: "Server=database,1433;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
6155
ASPNETCORE_ENVIRONMENT: "Development"
62-
ISSUER_URI: "https://localhost:5000"
56+
# ISSUER_URI: "http://localhost:5000"
6357
ASPNETCORE_Kestrel__Certificates__Default__Password: ".pxCpE]yttwC&b&hriw#,7K^_}A7xezRH3=EisJKn3]8.H}^Unzd+ebw]zzv_=d3"
6458
ASPNETCORE_Kestrel__Certificates__Default__Path: "/root/.dotnet/https/jpproject.pfx"
65-
ASPNETCORE_URLS: https://+:443;http://+:80
59+
ASPNETCORE_URLS: http://+:5000;http://+:5001
6660

6761
networks:
6862
jpproject_network:
@@ -88,15 +82,12 @@
8882
environment:
8983
SQLSERVER_CONNECTION: "Server=database,1433;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
9084
ASPNETCORE_ENVIRONMENT: "Development"
91-
AUTHORITY: "http://localhost"
85+
AUTHORITY: "http://localhost:5000"
9286
ASPNETCORE_Kestrel__Certificates__Default__Password: ".pxCpE]yttwC&b&hriw#,7K^_}A7xezRH3=EisJKn3]8.H}^Unzd+ebw]zzv_=d3"
9387
ASPNETCORE_Kestrel__Certificates__Default__Path: "/root/.dotnet/https/jpproject.pfx"
94-
ASPNETCORE_URLS: https://+:443;http://+:80
88+
ASPNETCORE_URLS: "https://+:443;http://+:80"
9589
VALIDATE_ISSUER: "false"
9690

97-
extra_hosts:
98-
- "localhost:172.20.0.6"
99-
10091
networks:
10192
jpproject_network:
10293
ipv4_address: 172.20.0.7

keys/cert.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $certificate = New-SelfSignedCertificate `
1717
-TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1")
1818
$certificatePath = 'Cert:\CurrentUser\My\' + ($certificate.ThumbPrint)
1919
# create temporary certificate path
20-
$tmpPath = "C:\tmp"
20+
$tmpPath = $MyInvocation.MyCommand.Path
2121
If(!(test-path $tmpPath))
2222
{
2323
New-Item -ItemType Directory -Force -Path $tmpPath
@@ -35,4 +35,4 @@ Import-PfxCertificate -FilePath $pfxFilePath Cert:\LocalMachine\My -Password $pf
3535
Import-Certificate -FilePath $cerFilePath -CertStoreLocation Cert:\CurrentUser\Root
3636
# optionally delete the physical certificates (don’t delete the pfx file as you need to copy this to your app directory)
3737
# Remove-Item $pfxFilePath
38-
Remove-Item $cerFilePath
38+
# Remove-Item $cerFilePath

src/.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.dockerignore
2+
.env
3+
.git
4+
.gitignore
5+
.vs
6+
.vscode
7+
*/bin
8+
*/obj
9+
**/.toolstarget

src/Backend/Jp.UserManagement/Configuration/SwaggerConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static IServiceCollection AddSwagger(this IServiceCollection services)
2323
options.AddSecurityDefinition("oauth2", new OAuth2Scheme
2424
{
2525
Flow = "implicit",
26-
AuthorizationUrl = "https://localhost:5000/connect/authorize",
26+
AuthorizationUrl = "http://localhost:5000/connect/authorize",
2727
Scopes = new Dictionary<string, string> {
2828
{ "UserManagementApi.owner-content", "User Management API - full access" },
2929
}

src/Backend/Jp.UserManagement/Properties/launchSettings.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,23 @@
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
1414
"environmentVariables": {
15-
"SQLSERVER_PORT": "1433",
16-
"SQLSERVER_HOST": "localhost",
17-
"SQLSERVER_PASSWORD": "@Password1",
1815
"ASPNETCORE_ENVIRONMENT": "Development"
1916
}
2017
},
2118
"Jp.UserManagement": {
2219
"commandName": "Project",
23-
"launchBrowser": true,
20+
"launchBrowser": false,
2421
"launchUrl": "swagger/index.html",
2522
"environmentVariables": {
26-
"ASPNETCORE_ENVIRONMENT": "Development"
23+
"SQLSERVER_CONNECTION": "Server=.,1433;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;",
24+
"ASPNETCORE_ENVIRONMENT": "Development",
25+
"AUTHORITY": "https://localhost:5000",
26+
// "ASPNETCORE_Kestrel__Certificates__Default__Password": ".pxCpE]yttwC&b&hriw#,7K^_}A7xezRH3=EisJKn3]8.H}^Unzd+ebw]zzv_=d3",
27+
// "ASPNETCORE_Kestrel__Certificates__Default__Path": "/root/.dotnet/https/jpproject.pfx",
28+
"ASPNETCORE_URLS": "https://+:5003;http://+:5002"
2729
},
2830
"applicationUrl": "https://localhost:5003;http://localhost:5002"
29-
},
30-
"Docker": {
31-
"commandName": "Docker",
32-
"launchBrowser": true,
33-
"launchUrl": "{Scheme}://localhost:{ServicePort}/swagger/index.html"
3431
}
32+
3533
}
3634
}

src/Backend/Jp.UserManagement/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void ConfigureServices(IServiceCollection services)
4545
services.AddIdentity(Configuration);
4646
services.ConfigureCors();
4747

48-
var authorityUri = Environment.GetEnvironmentVariable("AUTHORITY") ?? "https://localhost:5000";
48+
var authorityUri = Environment.GetEnvironmentVariable("AUTHORITY") ?? "http://localhost:5000";
4949
_logger.LogInformation($"Authority URI: {authorityUri}");
5050
services.AddAuthentication(options =>
5151
{

0 commit comments

Comments
 (0)