Skip to content

Commit 36e9472

Browse files
authored
Merge pull request #1 from skoruba/dev
Dev
2 parents 3a1971b + e5dda41 commit 36e9472

File tree

441 files changed

+37364
-1131
lines changed

Some content is hidden

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

441 files changed

+37364
-1131
lines changed

.dockerignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.gitignore
6+
**/.project
7+
**/.settings
8+
**/.toolstarget
9+
**/.vs
10+
**/.vscode
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/azds.yaml
15+
**/bin
16+
**/charts
17+
**/docker-compose*
18+
**/Dockerfile*
19+
**/node_modules
20+
**/npm-debug.log
21+
**/obj
22+
**/secrets.dev.yaml
23+
**/values.dev.yaml
24+
**/_ReSharper.Caches
25+
LICENSE
26+
README.md

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,5 @@ __pycache__/
277277
# Don't ignore these log folders
278278
!/src/Skoruba.IdentityServer4.Admin/Resources/Views/Log/
279279
!/src/Skoruba.IdentityServer4.Admin.BusinessLogic/Dtos/Log/
280-
!/src/Skoruba.IdentityServer4.Admin/Views/Log/
280+
!/src/Skoruba.IdentityServer4.Admin/Views/Log/
281+
!/src/Skoruba.IdentityServer4.Admin.BusinessLogic/Events/Log/

README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
This is currently in **beta version**
1414

15-
The application is written in the **Asp.Net Core MVC - using .NET Core 2.2**
15+
The application is written in the **Asp.Net Core MVC - using .NET Core 3.0**
1616

17-
**NOTE:** Works only with **IdentityServer4 version 2.3.0 and higher** 🚀
17+
**NOTE:** Works only with **IdentityServer4 version 3.0.0 and higher** 🚀
1818

1919
## Requirements
2020

@@ -114,6 +114,7 @@ The following Gulp commands are available:
114114
- `AdminLogDbContext`: for logging
115115
- `IdentityServerConfigurationDbContext`: for IdentityServer configuration store
116116
- `IdentityServerPersistedGrantDbContext`: for IdentityServer operational store
117+
- `AuditLoggingDbContext`: for Audit Logging
117118

118119
- Run entity framework migrations:
119120

@@ -147,6 +148,13 @@ Add-Migration IdentityServerPersistedGrantsDbInit -context IdentityServerPersist
147148
Update-Database -context IdentityServerPersistedGrantDbContext
148149
```
149150

151+
#### Migrations for AuditLogging DbContext:
152+
153+
```powershell
154+
Add-Migration AdminAuditLogDbInit -context AdminAuditLogDbContext -output Data/Migrations/AuditLogging
155+
Update-Database -context AdminAuditLogDbContext
156+
```
157+
150158
### Or via `dotnet CLI`:
151159

152160
#### Migrations for Asp.Net Core Identity DbContext:
@@ -177,23 +185,29 @@ dotnet ef migrations add IdentityServerPersistedGrantsDbInit -c IdentityServerPe
177185
dotnet ef database update -c IdentityServerPersistedGrantDbContext
178186
```
179187

188+
#### Migrations for AuditLogging DbContext:
189+
190+
```powershell
191+
dotnet ef migrations add AdminAuditLogDbInit -c AdminAuditLogDbContext -o Data/Migrations/AuditLogging
192+
dotnet ef database update -c AdminAuditLogDbContext
193+
```
194+
180195
Migrations are not a part of the repository - they are ignored in `.gitignore`.
181196

182197
### We suggest to use seed data:
183198

184199
- In `Program.cs` -> `Main`, uncomment `DbMigrationHelpers.EnsureSeedData(host)` or use dotnet CLI `dotnet run /seed`
185-
- The `Clients` and `Resources` files in `Configuration/IdentityServer` are the initial data, based on a sample from IdentityServer4
186-
- The `Users` file in `Configuration/Identity` contains the default admin username and password for the first login
200+
- The `Clients` and `Resources` files in `appsettings.json` (section called: IdentityServerData) - are the initial data, based on a sample from IdentityServer4
201+
- The `Users` file in `appsettings.json` (section called: IdentityData) contains the default admin username and password for the first login
187202

188203
### Using other database engines - PostgreSQL, SQLite, MySQL etc.
189204

190205
- [Follow these steps for setup other database engines](docs/EFMigration.md)
191206

192207
## Authentication and Authorization
193208

194-
- Change the specific URLs and names for the IdentityServer and Authentication settings in `Constants/AuthenticationConsts` or `appsettings.json`
195-
- `Constants/AuthorizationConsts.cs` contains configuration of constants connected with authorization - definition of the default name of admin policy
196-
- In the controllers is used the policy which name is stored in - `AuthorizationConsts.AdministrationPolicy`. In the policy - `AuthorizationConsts.AdministrationPolicy` is defined required role stored in - `AuthorizationConsts.AdministrationRole`.
209+
- Change the specific URLs and names for the IdentityServer and Authentication settings in `appsettings.json`
210+
- In the controllers is used the policy which name is stored in - `AuthorizationConsts.AdministrationPolicy`. In the policy - `AuthorizationConsts.AdministrationPolicy` is defined required role stored in - `appsettings.json` - `AdministrationRole`.
197211
- With the default configuration, it is necessary to configure and run instance of IdentityServer4. It is possible to use initial migration for creating the client as it mentioned above
198212

199213
### Login Configuration
@@ -297,6 +311,9 @@ In STS project - in `appsettings.json`:
297311
- Russian
298312
- Persian
299313
- Swedish
314+
- Danish
315+
- Spanish
316+
- French
300317

301318
#### Feel free to send a PR with your translation. :blush:
302319

@@ -436,6 +453,9 @@ It is possible to define the configuration according the client type - by defaul
436453
- [x] Russian
437454
- [x] Persian
438455
- [x] Swedish
456+
- [x] Danish
457+
- [x] Spanish
458+
- [x] French
439459
- [x] Manage profile
440460
- [x] Password reset
441461
- [x] Link account to an external provider (example with Github)
@@ -447,13 +467,11 @@ It is possible to define the configuration according the client type - by defaul
447467
- [x] IdentityServer4
448468
- [x] Asp.Net Core Identity
449469
- [x] Add swagger support
470+
- [x] Add audit logs to track changes ([#61](https://github.com/skoruba/IdentityServer4.Admin/issues/61))
471+
- [x] Docker support ([#121](https://github.com/skoruba/IdentityServer4.Admin/issues/121))
450472

451-
### 1.1.0
452-
- [ ] Add audit logs to track changes ([#61](https://github.com/skoruba/IdentityServer4.Admin/issues/61))
453-
454473
### 2.0.0:
455474

456-
- [ ] Docker support ([#121](https://github.com/skoruba/IdentityServer4.Admin/issues/121))
457475
- [ ] Create a project template using dotnet CLI - `dotnet new template`
458476
- [ ] Second template: The administration of the IdentityServer4 (without Asp.Net Core Identity) ([#79](https://github.com/skoruba/IdentityServer4.Admin/issues/79))
459477

@@ -496,7 +514,9 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
496514
| [<img src="https://avatars3.githubusercontent.com/u/35664089?s=460&v=3" width="100px;"/><br /><sub> Jan Škoruba</sub>](https://github.com/skoruba) <br /> 💻 💬 📖 💡 🤔 | [<img src="https://avatars0.githubusercontent.com/u/6831144?s=460&v=3" width="100px;"/><br /><sub> Tomáš Hübelbauer</sub>](https://github.com/TomasHubelbauer) <br /> 💻 👀 📖 🤔 | [<img src="https://avatars0.githubusercontent.com/u/1004852?s=460&v=3" width="100px;"/><br /><sub>Michał Drzał </sub>](https://github.com/xmichaelx) <br />💻 👀 📖 💡 🤔 | [<img src="https://avatars0.githubusercontent.com/u/2261603?s=460&v=3" width="100px;"/><br /><sub>cerginio </sub>](https://github.com/cerginio) <br /> 💻 🐛 💡 🤔 | [<img src="https://avatars3.githubusercontent.com/u/13407080?s=460&v=3" width="100px;"/><br /><sub>Sven Dummis </sub>](https://github.com/svendu) <br /> 📖| [<img src="https://avatars1.githubusercontent.com/u/1687087?s=460&v=3" width="100px;"/><br /><sub>Seaear</sub>](https://github.com/Seaear) <br />💻 🌍|
497515
| :---: | :---: | :---: | :---: | :---: | :---: |
498516
|[<img src="https://avatars1.githubusercontent.com/u/1150473?s=460&v=3" width="118px;"/><br /><sub>Rune Antonsen </sub>](https://github.com/ruant) <br />🐛|[<img src="https://avatars1.githubusercontent.com/u/5537607?s=460&v=3" width="118px;"/><br /><sub>Sindre Njøsen </sub>](https://github.com/Sindrenj) <br />💻|[<img src="https://avatars1.githubusercontent.com/u/40323674?s=460&v=3" width="118px;"/><br /><sub>Alevtina Brown </sub>](https://github.com/alev7ina) <br />🌍|[<img src="https://avatars3.githubusercontent.com/u/29726153?s=460&v=3" width="118px;"/><br /><sub>Brice </sub>](https://github.com/Brice-xCIT) <br />💻|[<img src="https://avatars0.githubusercontent.com/u/17114154?s=460&v=3" width="118px;"/><br /><sub>TheEvilPenguin </sub>](https://github.com/TheEvilPenguin) <br />💻|[<img src="https://avatars3.githubusercontent.com/u/15545395?s=460&v=3" width="118px;"/><br /><sub>Saeed Rahmani </sub>](https://github.com/saeedrahmo) <br />🌍|
499-
|[<img src="https://avatars0.githubusercontent.com/u/15867612?s=460&v=3" width="118px;"/><br /><sub>Andy Yu </sub>](https://github.com/Zyxious) <br />🌍|
517+
|[<img src="https://avatars0.githubusercontent.com/u/15867612?s=460&v=3" width="118px;"/><br /><sub>Andy Yu </sub>](https://github.com/Zyxious) <br />🌍|[<img src="https://avatars2.githubusercontent.com/u/51412447?s=400&v=3" width="118px;"/><br /><sub>ChrisSzabo </sub>](https://github.com/ChrisSzabo) <br />💻|[<img src="https://avatars1.githubusercontent.com/u/6860441?s=400&v=3" width="118px;"/><br /><sub>aiscrim </sub>](https://github.com/aiscrim) <br />💻 💡 🤔|[<img src="https://avatars2.githubusercontent.com/u/12528083?s=400&v=3" width="118px;"/><br /><sub>HrDahl </sub>](https://github.com/HrDahl) <br />🌍|[<img src="https://avatars0.githubusercontent.com/u/3269687?s=400&v=4" width="118px;"/><br /><sub>Andrew Godfroy </sub>](https://github.com/killerrin) <br />📖|[<img src="https://avatars0.githubusercontent.com/u/391353?s=400&v=3" width="118px;"/><br /><sub>bravecobra </sub>](https://github.com/bravecobra) <br />💻|
518+
|[<img src="https://avatars0.githubusercontent.com/u/449663?s=400&v=3" width="118px;"/><br /><sub>Sabit Igde </sub>](https://github.com/sabitertan) <br />💻|[<img src="https://avatars2.githubusercontent.com/u/7965212?s=400&v=3" width="118px;"/><br /><sub>Rico Herlt </sub>](https://github.com/rherlt) <br />💻|[<img src="https://avatars0.githubusercontent.com/u/1926879?s=400&v=3" width="118px;"/><br /><sub>b0 </sub>](https://github.com/b0) <br />💻|[<img src="https://avatars2.githubusercontent.com/u/1941149?s=400&v=3" width="118px;"/><br /><sub>DrQwertySilence </sub>](https://github.com/DrQwertySilence) <br />🌍|[<img src="https://avatars2.githubusercontent.com/u/3332745?s=400&v=3" width="118px;"/><br /><sub>Carl Quirion </sub>](https://github.com/nlz242) <br />💻|[<img src="https://avatars2.githubusercontent.com/u/43409914?s=400&v=3" width="118px;"/><br /><sub>Aegide </sub>](https://github.com/Aegide) <br />🌍|
519+
|[<img src="https://avatars0.githubusercontent.com/u/12243486?s=400&v=3" width="118px;"/><br /><sub>LobsterBandit </sub>](https://github.com/LobsterBandit) <br />💻|[<img src="https://avatars2.githubusercontent.com/u/3465794?s=400&v=3" width="118px;"/><br /><sub>Mehmet Perk </sub>](https://github.com/mperk) <br />💻|
500520
<!-- prettier-ignore-end -->
501521

502522
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.

Skoruba.IdentityServer4.Admin.sln

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skoruba.IdentityServer4.Adm
3333
EndProject
3434
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skoruba.IdentityServer4.Admin.EntityFramework.Shared", "src\Skoruba.IdentityServer4.Admin.EntityFramework.Shared\Skoruba.IdentityServer4.Admin.EntityFramework.Shared.csproj", "{E18F8C70-7448-4039-9D78-1369D7F498EF}"
3535
EndProject
36-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Skoruba.IdentityServer4.Admin.EntityFramework.Extensions", "src\Skoruba.IdentityServer4.Admin.EntityFramework.Extensions\Skoruba.IdentityServer4.Admin.EntityFramework.Extensions.csproj", "{2DD3CB7D-462E-4039-B684-81B1E88C7C6A}"
36+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skoruba.IdentityServer4.Admin.EntityFramework.Extensions", "src\Skoruba.IdentityServer4.Admin.EntityFramework.Extensions\Skoruba.IdentityServer4.Admin.EntityFramework.Extensions.csproj", "{2DD3CB7D-462E-4039-B684-81B1E88C7C6A}"
37+
EndProject
38+
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{F817047F-018D-4F93-BDA5-58602073B634}"
3739
EndProject
3840
Global
3941
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -93,6 +95,10 @@ Global
9395
{2DD3CB7D-462E-4039-B684-81B1E88C7C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
9496
{2DD3CB7D-462E-4039-B684-81B1E88C7C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
9597
{2DD3CB7D-462E-4039-B684-81B1E88C7C6A}.Release|Any CPU.Build.0 = Release|Any CPU
98+
{F817047F-018D-4F93-BDA5-58602073B634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
99+
{F817047F-018D-4F93-BDA5-58602073B634}.Debug|Any CPU.Build.0 = Debug|Any CPU
100+
{F817047F-018D-4F93-BDA5-58602073B634}.Release|Any CPU.ActiveCfg = Release|Any CPU
101+
{F817047F-018D-4F93-BDA5-58602073B634}.Release|Any CPU.Build.0 = Release|Any CPU
96102
EndGlobalSection
97103
GlobalSection(SolutionProperties) = preSolution
98104
HideSolutionNode = FALSE

docker-compose.dcproj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
3+
<PropertyGroup Label="Globals">
4+
<ProjectVersion>2.1</ProjectVersion>
5+
<DockerTargetOS>Linux</DockerTargetOS>
6+
<ProjectGuid>f817047f-018d-4f93-bda5-58602073b634</ProjectGuid>
7+
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
8+
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl>
9+
<DockerServiceName>skoruba.identityserver4.admin</DockerServiceName>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<None Include="docker-compose.vs.debug.yml">
13+
<DependentUpon>docker-compose.yml</DependentUpon>
14+
</None>
15+
<None Include="docker-compose.override.yml">
16+
<DependentUpon>docker-compose.yml</DependentUpon>
17+
</None>
18+
<None Include="docker-compose.yml" />
19+
<None Include=".dockerignore" />
20+
</ItemGroup>
21+
</Project>

docker-compose.override.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3.4'
2+
3+
services:
4+
skoruba.identityserver4.admin:
5+
environment:
6+
- ASPNETCORE_ENVIRONMENT=Development
7+
ports:
8+
- "80"
9+
volumes:
10+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
11+
skoruba.identityserver4.admin.api:
12+
environment:
13+
- ASPNETCORE_ENVIRONMENT=Development
14+
ports:
15+
- "80"
16+
volumes:
17+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
18+
19+
skoruba.identityserver4.sts.identity:
20+
environment:
21+
- ASPNETCORE_ENVIRONMENT=Development
22+
ports:
23+
- "80"
24+
volumes:
25+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro

docker-compose.vs.debug.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3.4'
2+
3+
services:
4+
skoruba.identityserver4.admin:
5+
volumes:
6+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
7+
labels:
8+
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/netcoreapp3.0/Skoruba.IdentityServer4.Admin.dll" /seed'
9+
10+
skoruba.identityserver4.admin.api:
11+
volumes:
12+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
13+
14+
skoruba.identityserver4.sts.identity:
15+
volumes:
16+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro

docker-compose.vs.release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3.4'
2+
3+
services:
4+
skoruba.identityserver4.admin:
5+
volumes:
6+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
7+
labels:
8+
com.microsoft.visualstudio.debuggee.arguments: ' --additionalProbingPath /root/.nuget/packages --additionalProbingPath /root/.nuget/fallbackpackages "bin/Debug/netcoreapp3.0/Skoruba.IdentityServer4.Admin.dll" /seed'
9+
10+
skoruba.identityserver4.admin.api:
11+
volumes:
12+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
13+
14+
skoruba.identityserver4.sts.identity:
15+
volumes:
16+
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro

0 commit comments

Comments
 (0)