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

Commit 85b3951

Browse files
Merge pull request #7 from brunohbrito/1.2.1
1.2.1
2 parents 92a2ad5 + e121d24 commit 85b3951

File tree

14 files changed

+976
-231
lines changed

14 files changed

+976
-231
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# v.1.2.1
2+
3+
Now the components is available through Docker Hub.
4+
* Generated docker install file to easy test
5+
* Created a docker-compose based on images from Docker Hub
6+
* Updated packages for security alerts:
7+
* bootstrap: [CVE-2019-8331](https://nvd.nist.gov/vuln/detail/CVE-2019-8331) -> Updated for version 4.3.1
8+
* In Bootstrap 4 before 4.3.1 and Bootstrap 3 before 3.4.1, XSS is possible in the tooltip or popover data-template attribute. For more information, see: https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/
9+
* lodash: [CVE-2018-16487](https://nvd.nist.gov/vuln/detail/CVE-2018-16487)
10+
* A prototype pollution vulnerability was found in lodash <4.17.11 where the functions merge, mergeWith, and defaultsDeep can be tricked into adding or modifying properties of Object.prototype.
11+
* webpack-dev-server [CVE-2018-14732](https://nvd.nist.gov/vuln/detail/CVE-2018-14732)
12+
* An issue was discovered in lib/Server.js in webpack-dev-server before 3.1.11. Attackers are able to steal developer's code because the origin of requests is not checked by the WebSocket server, which is used for HMR (Hot Module Replacement). Anyone can receive the HMR message sent by the WebSocket server via a ws://127.0.0.1:8080/ connection from any origin
13+
14+
115
# v1.2.0
216

317
## User Management

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ There are several ways we can help you out.
103103
## v1.2
104104

105105
- Docker support
106+
- Available at Docker Hub
106107
- IdentityServer4 v2 (release 2.4.0)
107108
- Device flow
108109
- ASP.NET Core 2.2 support

build/docker-compose.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: "3"
2+
3+
services:
4+
5+
#############################
6+
# Database
7+
#############################
8+
jpdatabase:
9+
image: mysql
10+
command: --default-authentication-plugin=mysql_native_password
11+
restart: always
12+
environment:
13+
MYSQL_ROOT_PASSWORD: root
14+
MYSQL_USER: jp
15+
MYSQL_DATABASE: jpproject
16+
MYSQL_PASSWORD: 10203040
17+
18+
#############################
19+
# Server SSO
20+
#############################
21+
jpproject:
22+
image: bhdebrito/jpproject-sso
23+
ports:
24+
- "5000:5000"
25+
links:
26+
- jpdatabase
27+
depends_on:
28+
- jpdatabase
29+
environment:
30+
DATABASE_TYPE: "MySql"
31+
CUSTOMCONNSTR_DATABASE_CONNECTION: "server=jpdatabase,port=3306;database=jpproject;user=jp;password=10203040"
32+
ASPNETCORE_ENVIRONMENT: "Development"
33+
ASPNETCORE_URLS: http://+:5000
34+
35+
# #############################
36+
# # Management API
37+
# #############################
38+
jpproject-api:
39+
image: bhdebrito/jpproject-api
40+
ports:
41+
- "5003:80"
42+
depends_on:
43+
- jpdatabase
44+
environment:
45+
DATABASE_TYPE: "MySql"
46+
CUSTOMCONNSTR_DATABASE_CONNECTION: "server=jpdatabase,port=3306;database=jpproject;user=jp;password=10203040"
47+
ASPNETCORE_ENVIRONMENT: "Development"
48+
AUTHORITY: "http://jpproject:5000"
49+
ASPNETCORE_URLS: http://+
50+
51+
#############################
52+
# User management UI
53+
#############################
54+
user-ui:
55+
image: bhdebrito/jpproject-user-management-ui
56+
depends_on:
57+
- jpproject-api
58+
- jpproject
59+
ports:
60+
- 4200:80
61+
62+
#############################
63+
# Admin Ui
64+
#############################
65+
admin-ui:
66+
image: bhdebrito/jpproject-admin-ui
67+
depends_on:
68+
- jpproject-api
69+
- jpproject
70+
ports:
71+
- 4300:80

build/docker-run.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
cd /d %~dp0
3+
ECHO This script will update your HOST file with an entry 127.0.0.1 jpproject (Pre req for docker-compose). Then will run compose
4+
pause
5+
start /shared update-host.bat
6+
7+
ECHO Running compose
8+
docker-compose up
9+
PAUSE

build/jpproject-docker-windows.zip

1.36 KB
Binary file not shown.

build/update-host.bat

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@ FIND /C /I "jpproject" %WINDIR%\system32\drivers\etc\hosts
99
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%>>%WINDIR%\system32\drivers\etc\hosts
1010
IF %ERRORLEVEL% NEQ 0 ECHO 127.0.0.1 jpproject>>%WINDIR%\system32\drivers\etc\hosts
1111
ECHO Finished
12-
GOTO END
13-
14-
:END
1512
ECHO.
16-
PAUSE
13+
EXIT

src/Backend/Jp.Infra.CrossCutting.IoC/IdentityBootStrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ internal class IdentityBootStrapper
1414
public static void RegisterServices(IServiceCollection services, IConfiguration config)
1515
{
1616
// Infra - Identity Services
17+
services.AddSingleton<IEmailConfiguration>(config.GetSection("EmailConfiguration").Get<EmailConfiguration>());
1718
services.AddTransient<IEmailSender, AuthEmailMessageSender>();
1819
services.AddTransient<ISmsSender, AuthSMSMessageSender>();
1920
services.AddTransient<IUserService, UserService>();
2021
services.AddTransient<IRoleService, RoleService>();
21-
services.AddSingleton<IEmailConfiguration>(config.GetSection("EmailConfiguration").Get<EmailConfiguration>());
2222
services.AddSingleton<IImageStorage, AzureImageStoreService>();
2323

2424
// Infra - Identity

src/Backend/Jp.UserManagement/appSettings.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Backend/Jp.UserManagement/jpProject_sso_log.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69884,3 +69884,27 @@ ORDER BY `e`.`CreationDate` DESC
6988469884
2019-03-28 01:22:23.575 -03:00 [INF] Executing ObjectResult, writing value of type 'Jp.Infra.CrossCutting.Tools.Model.DefaultResponse`1[[System.Collections.Generic.IEnumerable`1[[Jp.Application.EventSourcedNormalizers.EventHistoryData, Jp.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
6988569885
2019-03-28 01:22:23.583 -03:00 [INF] Executed action Jp.Management.Controllers.ManagementController.GetLogs (Jp.Management) in 96.9139ms
6988669886
2019-03-28 01:22:23.586 -03:00 [INF] Request finished in 126.7038ms 200 application/json; charset=utf-8
69887+
2019-03-28 16:12:41.236 -03:00 [INF] Authority URI: https://localhost:5001
69888+
2019-03-28 16:12:42.475 -03:00 [INF] User profile is available. Using 'C:\Users\bruno.brito\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
69889+
2019-03-28 16:16:08.207 -03:00 [INF] Request starting HTTP/1.1 OPTIONS https://localhost:5002/management/user-data
69890+
2019-03-28 16:16:08.235 -03:00 [WRN] The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time. Configure the policy by listing individual origins if credentials needs to be supported.
69891+
2019-03-28 16:16:08.238 -03:00 [INF] CORS policy execution successful.
69892+
2019-03-28 16:16:08.246 -03:00 [INF] Request finished in 41.9141ms 204
69893+
2019-03-28 16:16:08.271 -03:00 [INF] Request starting HTTP/1.1 GET https://localhost:5002/management/user-data
69894+
2019-03-28 16:16:08.273 -03:00 [WRN] The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time. Configure the policy by listing individual origins if credentials needs to be supported.
69895+
2019-03-28 16:16:08.276 -03:00 [INF] CORS policy execution successful.
69896+
2019-03-28 16:16:08.590 -03:00 [INF] Successfully validated the token.
69897+
2019-03-28 16:16:08.598 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
69898+
2019-03-28 16:16:08.787 -03:00 [INF] Route matched with {action = "UserData", controller = "Management"}. Executing action Jp.Management.Controllers.ManagementController.UserData (Jp.Management)
69899+
2019-03-28 16:16:08.810 -03:00 [INF] Authorization was successful.
69900+
2019-03-28 16:16:09.100 -03:00 [INF] Executing action method Jp.Management.Controllers.ManagementController.UserData (Jp.Management) - Validation state: "Valid"
69901+
2019-03-28 16:16:09.570 -03:00 [INF] Entity Framework Core 2.2.3-servicing-35854 initialized 'ApplicationIdentityContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql
69902+
2019-03-28 16:16:10.010 -03:00 [INF] Executed DbCommand (41ms) [Parameters=[@__get_Item_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
69903+
SELECT `e`.`Id`, `e`.`AccessFailedCount`, `e`.`Bio`, `e`.`Company`, `e`.`ConcurrencyStamp`, `e`.`Email`, `e`.`EmailConfirmed`, `e`.`JobTitle`, `e`.`LockoutEnabled`, `e`.`LockoutEnd`, `e`.`Name`, `e`.`NormalizedEmail`, `e`.`NormalizedUserName`, `e`.`PasswordHash`, `e`.`PhoneNumber`, `e`.`PhoneNumberConfirmed`, `e`.`Picture`, `e`.`SecurityStamp`, `e`.`TwoFactorEnabled`, `e`.`Url`, `e`.`UserName`
69904+
FROM `Users` AS `e`
69905+
WHERE `e`.`Id` = @__get_Item_0
69906+
LIMIT 1
69907+
2019-03-28 16:16:10.146 -03:00 [INF] Executed action method Jp.Management.Controllers.ManagementController.UserData (Jp.Management), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 1038.4361000000001ms.
69908+
2019-03-28 16:16:10.159 -03:00 [INF] Executing ObjectResult, writing value of type 'Jp.Infra.CrossCutting.Tools.Model.DefaultResponse`1[[Jp.Application.ViewModels.UserViewModels.UserViewModel, Jp.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
69909+
2019-03-28 16:16:10.177 -03:00 [INF] Executed action Jp.Management.Controllers.ManagementController.UserData (Jp.Management) in 1385.9533000000001ms
69910+
2019-03-28 16:16:10.190 -03:00 [INF] Request finished in 1918.5536ms 200 application/json; charset=utf-8

0 commit comments

Comments
 (0)