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

Commit 8aac059

Browse files
committed
admin ui
1 parent d9301b3 commit 8aac059

24 files changed

Lines changed: 413 additions & 547 deletions

README.md

Lines changed: 155 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,180 @@
1-
![image](https://github.com/brunohbrito/JP-Project/blob/master/docs/images/logo.png?raw=true)
1+
![image](https://github.com/brunohbrito/JPProject.Core/blob/master/build/logo.png?raw=true)
22

33
[![Build status](https://ci.appveyor.com/api/projects/status/08v6mg6q439x16xt?svg=true)](https://ci.appveyor.com/project/brunohbrito/jp-project)
44
[![Build Status](https://dev.azure.com/brunohbrito/JpProject/_apis/build/status/JPProject%20CD%20Build?branchName=master)](https://dev.azure.com/brunohbrito/JpProject/_build/latest?definitionId=2&branchName=master)
5-
[![License](https://img.shields.io/github/license/brunohbrito/jp-project.svg)](LICENSE) [![Greenkeeper badge](https://badges.greenkeeper.io/brunohbrito/JPProject.IdentityServer4.AdminUI.svg)](https://greenkeeper.io/)
6-
![DOCS](https://readthedocs.org/projects/jp-project/badge/?version=latest&style=flat)
5+
[![License](https://img.shields.io/github/license/brunohbrito/JPProject.IdentityServer4.SSO)](LICENSE)
76

8-
Jp Project is a Open Source UI Administration Tools for IdentityServer4 v2 - release 2.4.0.
7+
This is an Administrator Panel for JP Project. It's available in 2 versions: Light and Full. See below the differences.
98

9+
# Installation
10+
11+
If you know the differences between Light and Full. Check the installation instructions below. If wanna understand check [Presentation](#presentation) version.
12+
13+
## Full Installation
14+
15+
Windows users:
16+
* download [jpproject-docker-windows.zip](https://github.com/brunohbrito/JP-Project/raw/master/build/jpproject-docker-windows.zip)
17+
* Unzip and execute `docker-run.bat` (As administrator)
18+
19+
Linux users:
20+
* Download [docker-compose.yml](https://github.com/brunohbrito/JP-Project/raw/master/build/docker-compose.yml)
21+
* Add `127.0.0.1 jpproject-sso` entry to hosts file (`/etc/hosts`)
22+
* `docker-compose up`
23+
24+
## Light version
25+
26+
You will need to create a Client and API resources in you IdentityServer4. At the end of this section have some shortcuts.
27+
28+
1. [Download](https://github.com/brunohbrito/JPProject.IdentityServer4.AdminUI/archive/master.zip)/Clone or [Fork](https://github.com/brunohbrito/JPProject.IdentityServer4.AdminUI/fork) this repository.
29+
2. Open `environment.ts` and change settings for you SSO.
30+
```
31+
export const environment = {
32+
production: false,
33+
IssuerUri: "http://localhost:5000",
34+
ResourceServer: "http://localhost:5002/",
35+
RequireHttps: false,
36+
Uri: "http://localhost:4300",
37+
defaultTheme: "E",
38+
version: "3.0.0"
39+
};
40+
```
41+
For more details check [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc)
42+
3. Open `docker-compose.yml` and change Api Settings:
43+
```
44+
# #############################
45+
# # Management API - Light
46+
# #############################
47+
jpproject-light-api:
48+
image: jpproject-light-api
49+
build:
50+
context: .
51+
dockerfile: api-light.dockerfile
52+
environment:
53+
ASPNETCORE_ENVIRONMENT: "Development"
54+
CUSTOMCONNSTR_SSOConnection: "<you database connstring>"
55+
ApplicationSettings:Authority: "<you sso uri>"
56+
ApplicationSettings:DatabaseType: SqlServer # Choose one: SqlServer | MySql | Postgre | Sqlite
57+
ApplicationSettings:RequireHttpsMetadata: 'false'
58+
ApplicationSettings:ApiName: "<api name>"
59+
ApplicationSettings:ApiSecret: "<your api secret>"
60+
```
61+
4. Build compose by: `docker-compose up`
62+
63+
Shortcuts:
64+
65+
You must have these 2 configurations at you IdentityServer4
66+
67+
Client configuration
68+
```
69+
/*
70+
* JP Project ID4 Admin Client
71+
*/
72+
new Client
73+
{
74+
75+
ClientId = "IS4-Admin",
76+
ClientName = "IS4-Admin",
77+
ClientUri = "http://localhost:4300",
78+
AllowedGrantTypes = GrantTypes.Implicit,
79+
AllowAccessTokensViaBrowser = true,
80+
RedirectUris = new[] {
81+
"http://localhost:4300/login-callback",
82+
"http://localhost:4300/silent-refresh.html"
83+
},
84+
AllowedCorsOrigins = { "http://localhost:4300" },
85+
IdentityTokenLifetime = 3600,
86+
LogoUri = "https://jpproject.azurewebsites.net/sso/images/brand/logo.png",
87+
AuthorizationCodeLifetime = 3600,
88+
AllowedScopes =
89+
{
90+
IdentityServerConstants.StandardScopes.OpenId,
91+
IdentityServerConstants.StandardScopes.Profile,
92+
IdentityServerConstants.StandardScopes.Email,
93+
"jp_api.is4"
94+
}
95+
},
96+
97+
```
98+
99+
Api resource configuration
100+
```
101+
new ApiResource
102+
{
103+
Name = "jp_api",
104+
DisplayName = "JP API",
105+
Description = "OAuth2 Server Management Api",
106+
ApiSecrets = { new Secret(":}sFUz}Pjc]K4yiW>vDjM,+:tq=U989dxw=Vy*ViKrP+bjNbWC3B3&kE23Z=%#Jr".Sha256()) },
107+
108+
UserClaims =
109+
{
110+
IdentityServerConstants.StandardScopes.OpenId,
111+
IdentityServerConstants.StandardScopes.Profile,
112+
IdentityServerConstants.StandardScopes.Email,
113+
"is4-rights",
114+
"username",
115+
"roles"
116+
},
117+
118+
Scopes =
119+
{
120+
new Scope()
121+
{
122+
Name = "jp_api.is4",
123+
DisplayName = "OAuth2 Server",
124+
Description = "Manage mode to IS4",
125+
Required = true
126+
}
127+
}
128+
}
129+
```
10130
11131
## Table of Contents ##
12132
133+
- [Installation](#installation)
134+
- [Full Installation](#full-installation)
135+
- [Light version](#light-version)
136+
- [Table of Contents](#table-of-contents)
13137
- [Presentation](#presentation)
138+
- [Full](#full)
139+
- [Light version](#light-version-1)
14140
- [Admin UI](#admin-ui)
15-
- [Login page](#login-page)
16-
- [Consent page](#consent-page)
17-
- [Profile](#profile)
18141
- [Demo](#demo)
19142
- [We are online at Azure.](#we-are-online-at-azure)
20-
- [Docker](#docker)
21143
- [Technologies](#technologies)
22144
- [Architecture](#architecture)
23145
- [Give a Star! ⭐](#give-a-star-%e2%ad%90)
24146
- [How to build](#how-to-build)
25147
- [Docs](#docs)
26148
- [Contributing](#contributing)
27149
- [Free](#free)
150+
- [3.0.1](#301)
28151
- [v1.4.5](#v145)
29-
- [v1.4.0](#v140)
30-
- [v1.3](#v13)
31-
- [v1.2](#v12)
32152
- [What comes next?](#what-comes-next)
33153
- [License](#license)
34154
35155
------------------
36156
37157
# Presentation
38158
39-
Here some screenshots
159+
JP Project Admin Panel is an administrative panel for IdentityServer4. You can manage Clients, Api Resources, Identity Resources and so on. There are 2 versions.
40160
41-
## Admin UI ##
42-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/jp-adminui.gif" width="480" />
161+
## Full
162+
163+
The full version is for those who don't have an IdentityServer up and running. So you can download the JP Project SSO and with this admin panel you will be able to manage **Users** and **IdentityServer4**.
43164
44-
## Login page ##
45-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/login.JPG?raw=true" width="480" />
165+
## Light version
46166
47-
## Consent page ##
48-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/consent-page.JPG?raw=true" width="480" />
167+
For those who already have an IdentityServer4. This panel has features to manage an existing **IdentityServer4** database.
49168
50-
## Profile ##
51-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/jp-usermanagement.gif" width="480" />
169+
170+
Here some screenshots
171+
172+
## Admin UI ##
173+
<img src="https://github.com/brunohbrito/JPProject.IdentityServer4.AdminUI/blob/master/docs/images/jp-adminui.gif" width="480" />
52174
53175
# Demo #
54176
55-
Check our demo online.
177+
Check our full demo online.
56178
57179
## We are online at Azure.
58180
@@ -64,22 +186,6 @@ You can check also [SSO](https://jpproject.azurewebsites.net/sso/) and [User Man
64186
65187
_New users are readonly_
66188
67-
# Docker #
68-
69-
Run through docker compose ❤️
70-
71-
Wanna try? As easy as:
72-
73-
Windows users:
74-
* download [jpproject-docker-windows.zip](https://github.com/brunohbrito/JP-Project/raw/master/build/jpproject-docker-windows.zip)
75-
* Unzip and execute `docker-run.bat` (As administrator)
76-
77-
Linux users:
78-
* Download [docker-compose.yml](https://github.com/brunohbrito/JP-Project/raw/master/build/docker-compose.yml)
79-
* Add `127.0.0.1 jpproject` entry to hosts file (`/etc/hosts`)
80-
* `docker-compose up`
81-
82-
83189
# Technologies #
84190
85191
Check below how it was developed.
@@ -89,16 +195,13 @@ The main goal of project is to be a Management Ecosystem for IdentityServer4. He
89195
90196
- Angular 8
91197
- Rich UI interface
92-
- ASP.NET Core 2.2
93-
- ASP.NET MVC Core
198+
- ASP.NET Core 3.0
94199
- ASP.NET WebApi Core
95-
- ASP.NET Identity Core
96-
- Argon2 Password Hashing
97200
- MySql Ready
98201
- Sql Ready
99202
- Postgree Ready
100203
- SQLite Ready
101-
- Entity Framework Core 2.2
204+
- Entity Framework Core
102205
- .NET Core Native DI
103206
- AutoMapper
104207
- FluentValidator
@@ -124,18 +227,16 @@ The main goal of project is to be a Management Ecosystem for IdentityServer4. He
124227
Do you love it? give us a Star!
125228
126229
## How to build
127-
Jp Project is built against ASP.NET Core 2.2.
230+
Jp Project is built against ASP.NET Core 3.0.
128231
129232
* [Install](https://www.microsoft.com/net/download/core#/current) the latest .NET Core 2.2 SDK
130233
131-
132-
`src/JpProject.sln` Contains SSO and API
234+
`src/JpProject.AdminUi.sln` Contains the API
133235
134236
For UI's use VSCode.
135237
- AdminUI -> Inside VSCode open folder `rootFolder/src/Frontend/Jp.AdminUI`, then terminal and `npm install && npm start`
136-
- User Management -> Inside VSCode open folder `rootFolder/src/Frontend/Jp.UserManagement`, then terminal and `npm install && npm start`
137238
138-
Wait for ng to complete his proccess then go to http://localhost:5000!
239+
Wait for ng to complete his proccess then go to http://localhost:4300!
139240
140241
Any doubts? Go to docs
141242
@@ -152,6 +253,11 @@ We'll love it! Please [Read the docs](https://jp-project.readthedocs.io/en/lates
152253
If you need help building or running your Jp Project platform
153254
There are several ways we can help you out.
154255
256+
## 3.0.1
257+
258+
1. ASP.NET Core 3.0 support
259+
2. Separated repositories, for better management. Improving tests, integration tests. And to support more scenarios.
260+
155261
## v1.4.5
156262
157263
Breaking change: **Argon2 password hashing**. Be careful before update. If you are using the old version all users must need to update their passwords.
@@ -161,47 +267,15 @@ Breaking change: **Argon2 password hashing**. Be careful before update. If you a
161267
2. Argon2 Password Hasher
162268
3. Show version at footer
163269
164-
## v1.4.0
165-
166-
1. Added :boom: **New Translations** (auto-generate) :green_heart: :blue_heart:
167-
* Spanish
168-
* French
169-
* Dutch
170-
* Russian
171-
* Chinese Simplified
172-
* Chinese Traditional
173-
174-
<small>If you find some mistakes feel free to PR</small>
175-
176-
2. Added integration with Azure DevOps for full CI/CD. ASAP SonarQube
177-
178-
3. Bug fixes
179-
180-
## v1.3
181-
182-
- Bug fixes
183-
- angular-oauth2-oidc Session Improvements for Angular Apps. Incluind Admin UI
184-
- Some Action attributes was HttpPost instead HttpPut (fixed)
185-
- New unity tests
186-
187-
## v1.2
188-
189-
- Docker support
190-
- Available at Docker Hub
191-
- IdentityServer4 v2 (release 2.4.0)
192-
- Device flow
193-
- ASP.NET Core 2.2 support
194-
- Plugins update
195-
- Angular 7.2
196-
197270
Check [Changelog.md](https://github.com/brunohbrito/JP-Project/blob/master/CHANGELOG.md) for a complete list of changes.
198271
199272
# What comes next?
200273
201274
* Code coverage
202275
* UI for Device codes
203276
* CI with SonarCloud
204-
277+
* E-mail template management
278+
* Blob service management
205279
206280
# License
207281

admin-ui.dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,20 @@ COPY ["src/Frontend/Jp.AdminUI/package-lock.json", "./"]
1010
RUN npm ci && mkdir /app && mv ./node_modules ./app/
1111

1212
WORKDIR /app
13-
1413
# add app
1514
COPY ["src/Frontend/Jp.AdminUI/", "/app"]
16-
15+
COPY ["environment.ts", "src/environments/environment.prod.ts"]
1716
# rebuild node
1817
RUN npm rebuild node-sass
1918
# generate build
20-
RUN npm run ng build -- --configuration=docker
19+
RUN npm run ng build -- --configuration=production
2120

2221
##################
2322
### production ###
2423
##################
2524

2625
# base image
27-
FROM nginx:1.17.2-alpine
26+
FROM nginx:alpine
2827

2928
## Remove default nginx website
3029
RUN rm -rf /usr/share/nginx/html/*
@@ -33,7 +32,6 @@ RUN rm -rf /usr/share/nginx/html/*
3332
COPY --from=builder /app/nginx/nginx.conf /etc/nginx/conf.d/default.conf
3433
COPY --from=builder /app/dist /usr/share/nginx/html
3534

36-
3735
# expose port 80
3836
EXPOSE 80/tcp
3937

api-light.dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
2+
WORKDIR /app
3+
EXPOSE 80
4+
EXPOSE 443
5+
6+
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
7+
WORKDIR /src
8+
COPY ["src/Backend/JPProject.Admin.Api/JPProject.Admin.Api.csproj", "Backend/JPProject.Admin.Api/"]
9+
RUN dotnet restore "Backend/JPProject.Admin.Api/JPProject.Admin.Api.csproj"
10+
COPY src/ .
11+
WORKDIR "/src/Backend/JPProject.Admin.Api"
12+
RUN dotnet build "JPProject.Admin.Api.csproj" -c Release -o /app/build
13+
14+
FROM build AS publish
15+
RUN dotnet publish "JPProject.Admin.Api.csproj" -c Release -o /app/publish
16+
17+
FROM base AS final
18+
WORKDIR /app
19+
COPY --from=publish /app/publish .
20+
ENTRYPOINT ["dotnet", "JPProject.Admin.Api.dll"]

0 commit comments

Comments
 (0)