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

Commit 3d3b923

Browse files
Merge pull request #160 from brunohbrito/only-admin
Only admin
2 parents 8f74c3e + 6338533 commit 3d3b923

1,612 files changed

Lines changed: 5606 additions & 144985 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: false

README.md

Lines changed: 162 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,185 @@
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

3-
[![Build status](https://ci.appveyor.com/api/projects/status/08v6mg6q439x16xt?svg=true)](https://ci.appveyor.com/project/brunohbrito/jp-project)
4-
[![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)
73

8-
Jp Project is a Open Source UI Administration Tools for IdentityServer4 v2 - release 2.4.0.
4+
[![Build Status](https://dev.azure.com/brunohbrito/Jp%20Project/_apis/build/status/JPProject%20AdminUI%20-%20CD?branchName=master)](https://dev.azure.com/brunohbrito/Jp%20Project/_build/latest?definitionId=2&branchName=master)
5+
[![License](https://img.shields.io/github/license/brunohbrito/JPProject.IdentityServer4.AdminUI)](LICENSE)
96

7+
This is an Administrator Panel for JP Project. It's available in 2 versions: Light and Full. See below the differences.
8+
9+
# Several break changes
10+
11+
The version ASP.NET Core 3.0 have changed a lot. So before upgrade read differences between light and full version. At the end it's the same project . But splited repo's.
12+
13+
# Installation
14+
15+
If you know the differences between Light and Full. Check the installation instructions below. If wanna understand, check more here [Presentation](#presentation) version.
16+
17+
## Full Installation
18+
19+
Windows users:
20+
* download [jpproject-docker-windows.zip](https://github.com/brunohbrito/JP-Project/raw/master/build/jpproject-docker-windows.zip)
21+
* Unzip and execute `docker-run.bat` (As administrator)
22+
23+
Linux users:
24+
* Download [docker-compose.yml](https://github.com/brunohbrito/JP-Project/raw/master/build/docker-compose.yml)
25+
* Add `127.0.0.1 jpproject-sso` entry to hosts file (`/etc/hosts`)
26+
* `docker-compose up`
27+
28+
## Light version
29+
30+
You will need to create a Client and API resources in you IdentityServer4. At the end of this section have some shortcuts.
31+
32+
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.
33+
2. Open `environment.ts` and change settings for you SSO.
34+
```
35+
export const environment = {
36+
production: false,
37+
IssuerUri: "http://localhost:5000",
38+
ResourceServer: "http://localhost:5002/",
39+
RequireHttps: false,
40+
Uri: "http://localhost:4300",
41+
defaultTheme: "E",
42+
version: "3.0.0"
43+
};
44+
```
45+
For more details check [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc)
46+
3. Open `docker-compose.yml` and change Api Settings:
47+
```
48+
# #############################
49+
# # Management API - Light
50+
# #############################
51+
jpproject-light-api:
52+
image: jpproject-light-api
53+
build:
54+
context: .
55+
dockerfile: api-light.dockerfile
56+
environment:
57+
ASPNETCORE_ENVIRONMENT: "Development"
58+
CUSTOMCONNSTR_SSOConnection: "<you database connstring>"
59+
ApplicationSettings:Authority: "<you sso uri>"
60+
ApplicationSettings:DatabaseType: SqlServer # Choose one: SqlServer | MySql | Postgre | Sqlite
61+
ApplicationSettings:RequireHttpsMetadata: 'false'
62+
ApplicationSettings:ApiName: "<api name>"
63+
ApplicationSettings:ApiSecret: "<your api secret>"
64+
```
65+
4. Build compose by: `docker-compose up`
66+
67+
Shortcuts:
68+
69+
You must have these 2 configurations at you IdentityServer4
70+
71+
Client configuration
72+
```
73+
/*
74+
* JP Project ID4 Admin Client
75+
*/
76+
new Client
77+
{
78+
79+
ClientId = "IS4-Admin",
80+
ClientName = "IS4-Admin",
81+
ClientUri = "http://localhost:4300",
82+
AllowedGrantTypes = GrantTypes.Implicit,
83+
AllowAccessTokensViaBrowser = true,
84+
RedirectUris = new[] {
85+
"http://localhost:4300/login-callback",
86+
"http://localhost:4300/silent-refresh.html"
87+
},
88+
AllowedCorsOrigins = { "http://localhost:4300" },
89+
IdentityTokenLifetime = 3600,
90+
LogoUri = "https://jpproject.azurewebsites.net/sso/images/brand/logo.png",
91+
AuthorizationCodeLifetime = 3600,
92+
AllowedScopes =
93+
{
94+
IdentityServerConstants.StandardScopes.OpenId,
95+
IdentityServerConstants.StandardScopes.Profile,
96+
IdentityServerConstants.StandardScopes.Email,
97+
"jp_api.is4"
98+
}
99+
},
100+
101+
```
102+
103+
Api resource configuration
104+
```
105+
new ApiResource
106+
{
107+
Name = "jp_api",
108+
DisplayName = "JP API",
109+
Description = "OAuth2 Server Management Api",
110+
ApiSecrets = { new Secret(":}sFUz}Pjc]K4yiW>vDjM,+:tq=U989dxw=Vy*ViKrP+bjNbWC3B3&kE23Z=%#Jr".Sha256()) },
111+
112+
UserClaims =
113+
{
114+
IdentityServerConstants.StandardScopes.OpenId,
115+
IdentityServerConstants.StandardScopes.Profile,
116+
IdentityServerConstants.StandardScopes.Email,
117+
"is4-rights",
118+
"username",
119+
"roles"
120+
},
121+
122+
Scopes =
123+
{
124+
new Scope()
125+
{
126+
Name = "jp_api.is4",
127+
DisplayName = "OAuth2 Server",
128+
Description = "Manage mode to IS4",
129+
Required = true
130+
}
131+
}
132+
}
133+
```
10134
11135
## Table of Contents ##
12136
137+
- [Several break changes](#several-break-changes)
138+
- [Installation](#installation)
139+
- [Full Installation](#full-installation)
140+
- [Light version](#light-version)
141+
- [Table of Contents](#table-of-contents)
13142
- [Presentation](#presentation)
143+
- [Full](#full)
144+
- [Light version](#light-version-1)
14145
- [Admin UI](#admin-ui)
15-
- [Login page](#login-page)
16-
- [Consent page](#consent-page)
17-
- [Profile](#profile)
18146
- [Demo](#demo)
19147
- [We are online at Azure.](#we-are-online-at-azure)
20-
- [Docker](#docker)
21148
- [Technologies](#technologies)
22149
- [Architecture](#architecture)
23150
- [Give a Star! ⭐](#give-a-star-%e2%ad%90)
24151
- [How to build](#how-to-build)
25152
- [Docs](#docs)
26153
- [Contributing](#contributing)
27154
- [Free](#free)
155+
- [3.0.1](#301)
28156
- [v1.4.5](#v145)
29-
- [v1.4.0](#v140)
30-
- [v1.3](#v13)
31-
- [v1.2](#v12)
32157
- [What comes next?](#what-comes-next)
33158
- [License](#license)
34159
35160
------------------
36161
37162
# Presentation
38163
39-
Here some screenshots
164+
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.
40165
41-
## Admin UI ##
42-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/jp-adminui.gif" width="480" />
166+
## Full
167+
168+
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**.
43169
44-
## Login page ##
45-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/login.JPG?raw=true" width="480" />
170+
## Light version
46171
47-
## Consent page ##
48-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/consent-page.JPG?raw=true" width="480" />
172+
For those who already have an IdentityServer4. This panel has features to manage an existing **IdentityServer4** database.
49173
50-
## Profile ##
51-
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/jp-usermanagement.gif" width="480" />
174+
175+
Here some screenshots
176+
177+
## Admin UI ##
178+
<img src="https://github.com/brunohbrito/JPProject.IdentityServer4.AdminUI/blob/master/docs/images/jp-adminui.gif" width="480" />
52179
53180
# Demo #
54181
55-
Check our demo online.
182+
Check our full demo online.
56183
57184
## We are online at Azure.
58185
@@ -64,22 +191,6 @@ You can check also [SSO](https://jpproject.azurewebsites.net/sso/) and [User Man
64191
65192
_New users are readonly_
66193
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-
83194
# Technologies #
84195
85196
Check below how it was developed.
@@ -89,16 +200,13 @@ The main goal of project is to be a Management Ecosystem for IdentityServer4. He
89200
90201
- Angular 8
91202
- Rich UI interface
92-
- ASP.NET Core 2.2
93-
- ASP.NET MVC Core
203+
- ASP.NET Core 3.0
94204
- ASP.NET WebApi Core
95-
- ASP.NET Identity Core
96-
- Argon2 Password Hashing
97205
- MySql Ready
98206
- Sql Ready
99207
- Postgree Ready
100208
- SQLite Ready
101-
- Entity Framework Core 2.2
209+
- Entity Framework Core
102210
- .NET Core Native DI
103211
- AutoMapper
104212
- FluentValidator
@@ -124,18 +232,16 @@ The main goal of project is to be a Management Ecosystem for IdentityServer4. He
124232
Do you love it? give us a Star!
125233
126234
## How to build
127-
Jp Project is built against ASP.NET Core 2.2.
235+
Jp Project is built against ASP.NET Core 3.0.
128236
129237
* [Install](https://www.microsoft.com/net/download/core#/current) the latest .NET Core 2.2 SDK
130238
131-
132-
`src/JpProject.sln` Contains SSO and API
239+
`src/JpProject.AdminUi.sln` Contains the API
133240
134241
For UI's use VSCode.
135242
- 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`
137243
138-
Wait for ng to complete his proccess then go to http://localhost:5000!
244+
Wait for ng to complete his proccess then go to http://localhost:4300!
139245
140246
Any doubts? Go to docs
141247
@@ -152,6 +258,11 @@ We'll love it! Please [Read the docs](https://jp-project.readthedocs.io/en/lates
152258
If you need help building or running your Jp Project platform
153259
There are several ways we can help you out.
154260
261+
## 3.0.1
262+
263+
1. ASP.NET Core 3.0 support
264+
2. Separated repositories, for better management. Improving tests, integration tests. And to support more scenarios.
265+
155266
## v1.4.5
156267
157268
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 +272,15 @@ Breaking change: **Argon2 password hashing**. Be careful before update. If you a
161272
2. Argon2 Password Hasher
162273
3. Show version at footer
163274
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-
197275
Check [Changelog.md](https://github.com/brunohbrito/JP-Project/blob/master/CHANGELOG.md) for a complete list of changes.
198276
199277
# What comes next?
200278
201279
* Code coverage
202280
* UI for Device codes
203281
* CI with SonarCloud
204-
282+
* E-mail template management
283+
* Blob service management
205284
206285
# License
207286

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

0 commit comments

Comments
 (0)