Compare commits
29
Commits
437e8c5c08
...
setup
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3be84072d3 | ||
|
|
9534cc501f | ||
|
|
7d22dd078c | ||
|
|
59920952c2 | ||
|
|
5b3c1961ef | ||
|
|
1788af60cc | ||
|
|
aa5d689740 | ||
|
|
742d556c03 | ||
|
|
cf59d6dcc3 | ||
|
|
cc8d9dff88 | ||
|
|
ddf1cb6ba5 | ||
|
|
c78102264e | ||
|
|
fa679c18eb | ||
|
|
a4b41a7385 | ||
|
|
49840847ff | ||
|
|
e4dd946280 | ||
|
|
d80c1eab81 | ||
|
|
22cc955a41 | ||
|
|
8a5d55fc2a | ||
|
|
be6cb422e5 | ||
|
|
5f1e31b703 | ||
|
|
99c3498ae4 | ||
|
|
ab4fbefa40 | ||
|
|
7ab3d1a153 | ||
|
|
23070382d3 | ||
|
|
f88847148e | ||
|
|
5289181ad6 | ||
|
|
36944d6655 | ||
|
|
6d3268b98f |
+24
-11
@@ -1,25 +1,38 @@
|
|||||||
**/.classpath
|
# Source Control / IDEs
|
||||||
**/.dockerignore
|
|
||||||
**/.env
|
|
||||||
**/.git
|
**/.git
|
||||||
**/.gitignore
|
**/.gitignore
|
||||||
**/.project
|
**/.gitattributes
|
||||||
**/.settings
|
|
||||||
**/.toolstarget
|
|
||||||
**/.vs
|
**/.vs
|
||||||
**/.vscode
|
**/.vscode
|
||||||
|
**/.classpath
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
**/*.*proj.user
|
**/*.*proj.user
|
||||||
**/*.dbmdl
|
**/*.dbmdl
|
||||||
**/*.jfm
|
**/*.jfm
|
||||||
**/azds.yaml
|
|
||||||
|
# Build / Dependency Artifacts
|
||||||
**/bin
|
**/bin
|
||||||
**/charts
|
**/obj
|
||||||
**/docker-compose*
|
|
||||||
**/Dockerfile*
|
|
||||||
**/node_modules
|
**/node_modules
|
||||||
**/npm-debug.log
|
**/npm-debug.log
|
||||||
**/obj
|
**/.toolstarget
|
||||||
|
|
||||||
|
# Docker / Deployment Files
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/Dockerfile*
|
||||||
|
**/charts
|
||||||
**/secrets.dev.yaml
|
**/secrets.dev.yaml
|
||||||
**/values.dev.yaml
|
**/values.dev.yaml
|
||||||
|
**/azds.yaml
|
||||||
|
|
||||||
|
# Explicitly target Docker Compose configuration files while sparing .dcproj
|
||||||
|
**/docker-compose.yml
|
||||||
|
**/docker-compose.override.yml
|
||||||
|
**/docker-compose.prod.yml
|
||||||
|
**/docker-compose.staging.yml
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
+2
-1
@@ -360,4 +360,5 @@ MigrationBackup/
|
|||||||
.ionide/
|
.ionide/
|
||||||
|
|
||||||
# Fody - auto-generated XML schema
|
# Fody - auto-generated XML schema
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
|
/docker-compose.override.yml
|
||||||
|
|||||||
@@ -1 +1,43 @@
|
|||||||
# LiteCharmsSecurity
|
# LiteCharmsSecurity
|
||||||
|
|
||||||
|
An enterprise-grade Identity and Access Management (IAM) solution built on top of **Skoruba Duende IdentityServer**. This repository houses the entire security architecture for the Lite Charms ecosystem, providing Single Sign-On (SSO), OAuth 2.0, and OpenID Connect (OIDC) capabilities.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🌐 Infrastructure Architecture
|
||||||
|
|
||||||
|
This solution is optimized for production-grade self-hosting behind a secure reverse-proxy tunnel.
|
||||||
|
|
||||||
|
* **Identity Provider (STS):** `sts.security.khongisa.co.za` (Port `8083`)
|
||||||
|
* **Management Console (Admin UI):** `admin.security.khongisa.co.za` (Port `8081`)
|
||||||
|
* **Management Backend (Admin API):** `api.security.khongisa.co.za` (Port `8082`)
|
||||||
|
|
||||||
|
### Deployment Stack
|
||||||
|
* **Reverse Proxy / Edge Router:** Pangolin (Handles full external SSL termination).
|
||||||
|
* **Container Orchestrator:** Dockhand VM (Automated GitOps deployments pulled directly from Gitea).
|
||||||
|
* **Database Layer:** Dedicated PostgreSQL running in an isolated Proxmox LXC Container (`192.168.1.170`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛠️ Environment Variables Configuration
|
||||||
|
|
||||||
|
Do not check production secrets into Git. Define the following environment variables within the **Dockhand UI** before launching or updating the stack:
|
||||||
|
|
||||||
|
| Variable | Description | Example / Default |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| `DB_PASSWORD` | Master password for the Postgres LXC container database instance. | *[Secure Sensitive Value]* |
|
||||||
|
| `SMTP_PASSWORD` | Password for the outbox notification transactional mail provider. | *[Secure Sensitive Value]* |
|
||||||
|
| `SMTP_HOST` | Outbound mail relay server domain. | `mail.litecharms.co.za` |
|
||||||
|
| `SMTP_LOGIN` | Corporate security transactional system email account. | `security@litecharms.co.za` |
|
||||||
|
| `APPLY_MIGRATIONS` | Toggles automatic Entity Framework database migrations on startup. | `true` (First Run Only) |
|
||||||
|
| `APPLY_SEED` | Seeds baseline system roles, client configurations, and default admin users. | `true` (First Run Only) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Deployment Instructions via Dockhand
|
||||||
|
|
||||||
|
### 1. First-Time Setup (Initialization Mode)
|
||||||
|
When deploying this stack for the absolute first time onto a blank database instance, ensure both flags are explicitly enabled in the Dockhand dashboard:
|
||||||
|
```env
|
||||||
|
APPLY_MIGRATIONS=true
|
||||||
|
APPLY_SEED=true
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
version: '3.4'
|
|
||||||
|
|
||||||
services:
|
|
||||||
litecharmssecurity.admin:
|
|
||||||
environment:
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
|
||||||
volumes:
|
|
||||||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
|
|
||||||
|
|
||||||
litecharmssecurity.admin.api:
|
|
||||||
environment:
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
|
||||||
volumes:
|
|
||||||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
|
|
||||||
|
|
||||||
litecharmssecurity.sts.identity:
|
|
||||||
environment:
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
|
||||||
volumes:
|
|
||||||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
|
|
||||||
+78
-117
@@ -1,142 +1,103 @@
|
|||||||
version: '3.4'
|
|
||||||
services:
|
services:
|
||||||
nginx-proxy:
|
|
||||||
image: jwilder/nginx-proxy
|
|
||||||
container_name: nginx
|
|
||||||
ports:
|
|
||||||
- '80:80'
|
|
||||||
- '443:443'
|
|
||||||
volumes:
|
|
||||||
- '/var/run/docker.sock:/tmp/docker.sock:ro'
|
|
||||||
- './shared/nginx/vhost.d:/etc/nginx/vhost.d'
|
|
||||||
- './shared/nginx/certs:/etc/nginx/certs:ro'
|
|
||||||
networks:
|
|
||||||
proxy: null
|
|
||||||
identityserverui:
|
|
||||||
aliases:
|
|
||||||
- sts.skoruba.local
|
|
||||||
- admin.skoruba.local
|
|
||||||
- admin-api.skoruba.local
|
|
||||||
restart: always
|
|
||||||
litecharmssecurity.admin:
|
litecharmssecurity.admin:
|
||||||
image: '${DOCKER_REGISTRY-}skoruba-duende-identityserver-admin'
|
image: skoruba-duende-identityserver-admin
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: src/LiteCharmsSecurity.Admin/Dockerfile
|
dockerfile: src/LiteCharmsSecurity.Admin/Dockerfile
|
||||||
container_name: skoruba-duende-identityserver-admin
|
network: host
|
||||||
|
container_name: litecharms-security-admin
|
||||||
|
ports:
|
||||||
|
- "8081:8080"
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_PORT=8080
|
- ASPNETCORE_ENVIRONMENT=Production
|
||||||
- VIRTUAL_HOST=admin.skoruba.local
|
|
||||||
- 'ConnectionStrings__DataProtectionDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'AdminConfiguration__AuthenticationConfiguration__Authority=https://sts.skoruba.local'
|
|
||||||
- 'AdminConfiguration__ApiConfiguration__ApiRemoteConfiguration__RemoteUrl=https://admin-api.skoruba.local'
|
|
||||||
- 'AdminConfiguration__BasicConfiguration__Title=Lite Charms Security'
|
|
||||||
- 'AdminConfiguration__BasicConfiguration__BasePath=/'
|
|
||||||
- ForwardedHeadersConfiguration__Enabled=true
|
- ForwardedHeadersConfiguration__Enabled=true
|
||||||
- ForwardedHeadersConfiguration__AllowAll=true
|
- ForwardedHeadersConfiguration__AllowAll=true
|
||||||
- ForwardedHeadersConfiguration__ForwardLimit=1
|
- ForwardedHeadersConfiguration__ForwardLimit=1
|
||||||
- DockerConfiguration__UpdateCaCertificate=true
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
# URL Configurations
|
||||||
depends_on:
|
- AdminConfiguration__AuthenticationConfiguration__Authority=https://sts.security.khongisa.co.za
|
||||||
- db
|
- AdminConfiguration__ApiConfiguration__ApiRemoteConfiguration__RemoteUrl=https://api.security.khongisa.co.za
|
||||||
- litecharmssecurity.sts.identity
|
- AdminConfiguration__BasicConfiguration__Title=Lite Charms Security
|
||||||
volumes:
|
- AdminConfiguration__BasicConfiguration__BasePath=/
|
||||||
- './shared/serilog.json:/app/serilog.json'
|
|
||||||
- './shared/nginx/certs/cacerts.crt:/usr/local/share/ca-certificates/cacerts.crt'
|
# Postgres Database Overrides
|
||||||
networks:
|
- ConnectionStrings__DataProtectionDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
identityserverui: null
|
|
||||||
litecharmssecurity.admin.api:
|
litecharmssecurity.admin.api:
|
||||||
image: '${DOCKER_REGISTRY-}skoruba-duende-identityserver-admin-api'
|
image: skoruba-duende-identityserver-admin-api
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: src/LiteCharmsSecurity.Admin.Api/Dockerfile
|
dockerfile: src/LiteCharmsSecurity.Admin.Api/Dockerfile
|
||||||
container_name: skoruba-duende-identityserver-admin-api
|
network: host
|
||||||
|
container_name: litecharms-security-admin-api
|
||||||
|
ports:
|
||||||
|
- "8082:8080"
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_PORT=8080
|
- EF_CORE_SUPPRESS_PENDING_MODEL_CHANGES_WARNING=true
|
||||||
- VIRTUAL_HOST=admin-api.skoruba.local
|
- ASPNETCORE_ENVIRONMENT=Production
|
||||||
- AdminApiConfiguration__RequireHttpsMetadata=false
|
|
||||||
- 'AdminApiConfiguration__ApplicationName=Lite Charms Security UI'
|
|
||||||
- 'AdminApiConfiguration__ApiBaseUrl=https://admin-api.skoruba.local'
|
|
||||||
- 'AdminApiConfiguration__IdentityServerBaseUrl=https://sts.skoruba.local'
|
|
||||||
- 'ConnectionStrings__ConfigurationDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__PersistedGrantDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__IdentityDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__AdminLogDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__AdminAuditLogDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__AdminConfigurationDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__DataProtectionDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'IdentityServerData__Clients__0__ClientUri=https://admin.skoruba.local'
|
|
||||||
- 'IdentityServerData__Clients__0__RedirectUris__0=https://admin.skoruba.local/signin-oidc'
|
|
||||||
- 'IdentityServerData__Clients__0__FrontChannelLogoutUri=https://admin.skoruba.local/signin-oidc'
|
|
||||||
- 'IdentityServerData__Clients__0__PostLogoutRedirectUris__0=https://admin.skoruba.local/signout-callback-oidc'
|
|
||||||
- 'IdentityServerData__Clients__0__AllowedCorsOrigins__0=https://admin.skoruba.local'
|
|
||||||
- 'IdentityServerData__Clients__1__RedirectUris__0=https://admin-api.skoruba.local/swagger/oauth2-redirect.html'
|
|
||||||
- 'SeedConfiguration__ApplySeed=true'
|
|
||||||
- 'DatabaseMigrationsConfiguration__ApplyDatabaseMigrations=true'
|
|
||||||
- ForwardedHeadersConfiguration__Enabled=true
|
- ForwardedHeadersConfiguration__Enabled=true
|
||||||
- ForwardedHeadersConfiguration__AllowAll=true
|
- ForwardedHeadersConfiguration__AllowAll=true
|
||||||
- ForwardedHeadersConfiguration__ForwardLimit=1
|
- ForwardedHeadersConfiguration__ForwardLimit=1
|
||||||
- DockerConfiguration__UpdateCaCertificate=true
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
# API Configurations
|
||||||
volumes:
|
- AdminApiConfiguration__RequireHttpsMetadata=true
|
||||||
- './shared/serilog.json:/app/serilog.json'
|
- AdminApiConfiguration__ApplicationName=Lite Charms Security UI
|
||||||
- './shared/identitydata.json:/app/identitydata.json'
|
- AdminApiConfiguration__ApiBaseUrl=https://api.security.khongisa.co.za
|
||||||
- './shared/identityserverdata.json:/app/identityserverdata.json'
|
- AdminApiConfiguration__IdentityServerBaseUrl=https://sts.security.khongisa.co.za
|
||||||
- './shared/nginx/certs/cacerts.crt:/usr/local/share/ca-certificates/cacerts.crt'
|
|
||||||
networks:
|
# Postgres Database Overrides
|
||||||
identityserverui: null
|
- ConnectionStrings__ConfigurationDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
- ConnectionStrings__PersistedGrantDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
- ConnectionStrings__IdentityDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
- ConnectionStrings__AdminLogDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
- ConnectionStrings__AdminAuditLogDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
- ConnectionStrings__AdminConfigurationDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
- ConnectionStrings__DataProtectionDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
|
|
||||||
|
# Operational Management Switches (Controlled via Dockhand UI variables)
|
||||||
|
- SeedConfiguration__ApplySeed=${APPLY_SEED:-true}
|
||||||
|
- DatabaseMigrationsConfiguration__ApplyDatabaseMigrations=${APPLY_MIGRATIONS:-true}
|
||||||
|
|
||||||
|
# SMTP Email Configuration Overrides
|
||||||
|
- SmtpConfiguration__Host=${SMTP_HOST:-mail.litecharms.co.za}
|
||||||
|
- SmtpConfiguration__Login=${SMTP_LOGIN:-security@litecharms.co.za}
|
||||||
|
- SmtpConfiguration__Password=${SMTP_PASSWORD}
|
||||||
|
|
||||||
|
# Initial Seeding Domain Configurations
|
||||||
|
- IdentityServerData__Clients__0__ClientUri=https://admin.security.khongisa.co.za
|
||||||
|
- IdentityServerData__Clients__0__RedirectUris__0=https://admin.security.khongisa.co.za/signin-oidc
|
||||||
|
- IdentityServerData__Clients__0__FrontChannelLogoutUri=https://admin.security.khongisa.co.za/signout-oidc
|
||||||
|
- IdentityServerData__Clients__0__PostLogoutRedirectUris__0=https://admin.security.khongisa.co.za/signout-callback-oidc
|
||||||
|
- IdentityServerData__Clients__0__AllowedCorsOrigins__0=https://admin.security.khongisa.co.za
|
||||||
|
- IdentityServerData__Clients__1__RedirectUris__0=https://api.security.khongisa.co.za/swagger/oauth2-redirect.html
|
||||||
|
|
||||||
litecharmssecurity.sts.identity:
|
litecharmssecurity.sts.identity:
|
||||||
image: '${DOCKER_REGISTRY-}skoruba-duende-identityserver-sts-identity'
|
image: skoruba-duende-identityserver-sts-identity
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: src/LiteCharmsSecurity.STS.Identity/Dockerfile
|
dockerfile: src/LiteCharmsSecurity.STS.Identity/Dockerfile
|
||||||
container_name: skoruba-duende-identityserver-sts-identity
|
network: host
|
||||||
|
container_name: litecharms-security-sts-identity
|
||||||
|
ports:
|
||||||
|
- "8083:8080"
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_PORT=8080
|
- ASPNETCORE_ENVIRONMENT=Production
|
||||||
- VIRTUAL_HOST=sts.skoruba.local
|
|
||||||
- 'ConnectionStrings__ConfigurationDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__PersistedGrantDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__IdentityDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'ConnectionStrings__DataProtectionDbConnection=Server=db;Database=IdentityServerAdmin;User Id=sa;Password=${DB_PASSWORD:-Password_123};MultipleActiveResultSets=true;TrustServerCertificate=True'
|
|
||||||
- 'AdminConfiguration__IdentityAdminBaseUrl=https://admin.skoruba.local'
|
|
||||||
- 'IdentityServerOptions__IssuerUri=https://sts.skoruba.local'
|
|
||||||
- IdentityServerOptions__KeyManagement__Enabled=true
|
|
||||||
- IdentityServerOptions__Events__RaiseErrorEvents=true
|
|
||||||
- IdentityServerOptions__Events__RaiseInformationEvents=true
|
|
||||||
- IdentityServerOptions__Events__RaiseFailureEvents=true
|
|
||||||
- IdentityServerOptions__Events__RaiseSuccessEvents=true
|
|
||||||
- ServerSideSessionsConfiguration__Enabled=true
|
|
||||||
- ForwardedHeadersConfiguration__Enabled=true
|
- ForwardedHeadersConfiguration__Enabled=true
|
||||||
- ForwardedHeadersConfiguration__AllowAll=true
|
- ForwardedHeadersConfiguration__AllowAll=true
|
||||||
- ForwardedHeadersConfiguration__ForwardLimit=1
|
- ForwardedHeadersConfiguration__ForwardLimit=1
|
||||||
- DockerConfiguration__UpdateCaCertificate=true
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
# Identity Server Configs
|
||||||
depends_on:
|
- AdminConfiguration__IdentityAdminBaseUrl=https://admin.security.khongisa.co.za
|
||||||
- db
|
- IdentityServerOptions__IssuerUri=https://sts.security.khongisa.co.za
|
||||||
volumes:
|
- IdentityServerOptions__KeyManagement__Enabled=true
|
||||||
- './shared/serilog.json:/app/serilog.json'
|
|
||||||
- './shared/nginx/certs/cacerts.crt:/usr/local/share/ca-certificates/cacerts.crt'
|
# SMTP Email Configuration Overrides (For User Registration/Forgot Password workflows)
|
||||||
networks:
|
- SmtpConfiguration__Host=${SMTP_HOST:-mail.litecharms.co.za}
|
||||||
identityserverui:
|
- SmtpConfiguration__Login=${SMTP_LOGIN:-security@litecharms.co.za}
|
||||||
aliases:
|
- SmtpConfiguration__Password=${SMTP_PASSWORD}
|
||||||
- sts.skoruba.local
|
|
||||||
db:
|
# Postgres Database Overrides
|
||||||
image: 'mcr.microsoft.com/mssql/server:2017-CU20-ubuntu-16.04'
|
- ConnectionStrings__ConfigurationDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
ports:
|
- ConnectionStrings__PersistedGrantDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
- '7900:1433'
|
- ConnectionStrings__IdentityDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
container_name: skoruba-duende-identityserver-db
|
- ConnectionStrings__DataProtectionDbConnection=Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=${DB_PASSWORD};
|
||||||
environment:
|
|
||||||
SA_PASSWORD: '${DB_PASSWORD:-Password_123}'
|
|
||||||
ACCEPT_EULA: 'Y'
|
|
||||||
volumes:
|
|
||||||
- 'dbdata:/var/opt/mssql'
|
|
||||||
networks:
|
|
||||||
identityserverui: null
|
|
||||||
volumes:
|
|
||||||
dbdata:
|
|
||||||
driver: local
|
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
driver: bridge
|
|
||||||
identityserverui:
|
|
||||||
driver: bridge
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "10.0.7",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
],
|
||||||
|
"rollForward": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,24 +3,22 @@ WORKDIR /app
|
|||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
WORKDIR /src
|
WORKDIR /app_source
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.Api/LiteCharmsSecurity.Admin.Api.csproj", "src/LiteCharmsSecurity.Admin.Api/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.Shared/LiteCharmsSecurity.Admin.EntityFramework.Shared.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.Shared/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.SqlServer/LiteCharmsSecurity.Admin.EntityFramework.SqlServer.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.SqlServer/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Shared/LiteCharmsSecurity.Shared.csproj", "src/LiteCharmsSecurity.Shared/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL/LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL/"]
|
|
||||||
RUN dotnet restore -a $TARGETARCH "src/LiteCharmsSecurity.Admin.Api/LiteCharmsSecurity.Admin.Api.csproj"
|
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/src/LiteCharmsSecurity.Admin.Api"
|
|
||||||
RUN dotnet build -a $TARGETARCH "LiteCharmsSecurity.Admin.Api.csproj" -c Release -o /app/build
|
RUN dotnet restore "LiteCharmsSecurity.AdminUI.sln" --ignore-failed-sources --source "https://nexus.khongisa.co.za/repository/nuget-group/index.json"
|
||||||
|
|
||||||
|
WORKDIR "/app_source/src/LiteCharmsSecurity.Admin.Api"
|
||||||
|
RUN dotnet build "LiteCharmsSecurity.Admin.Api.csproj" -c Release -o /app/build --source "https://nexus.khongisa.co.za/repository/nuget-group/index.json"
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish -a $TARGETARCH "LiteCharmsSecurity.Admin.Api.csproj" -c Release --no-restore -o /app/publish
|
RUN dotnet publish "LiteCharmsSecurity.Admin.Api.csproj" -c Release --no-restore -o /app/publish
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
||||||
ENTRYPOINT ["dotnet", "LiteCharmsSecurity.Admin.Api.dll"]
|
ENTRYPOINT ["dotnet", "LiteCharmsSecurity.Admin.Api.dll"]
|
||||||
@@ -17,7 +17,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.7">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.11">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.11">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@@ -31,7 +35,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.UI.Api" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.UI.Api" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ namespace LiteCharmsSecurity.Admin.Api
|
|||||||
|
|
||||||
public static async Task Main(string[] args)
|
public static async Task Main(string[] args)
|
||||||
{
|
{
|
||||||
|
// Force EF Core to globally ignore the Model Drift warning at the AppDomain level
|
||||||
|
AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue34300", true);
|
||||||
|
// OR if using standard diagnostics suppression:
|
||||||
|
System.Environment.SetEnvironmentVariable("EF_CORE_SUPPRESS_PENDING_MODEL_CHANGES_WARNING", "true");
|
||||||
|
|
||||||
var configuration = GetConfiguration(args);
|
var configuration = GetConfiguration(args);
|
||||||
|
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
|
|||||||
@@ -1,25 +1,27 @@
|
|||||||
// Copyright (c) Jan Škoruba. All Rights Reserved.
|
// Copyright (c) Jan Škoruba. All Rights Reserved.
|
||||||
// Licensed under the Apache License, Version 2.0.
|
// Licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
|
||||||
using HealthChecks.UI.Client;
|
using HealthChecks.UI.Client;
|
||||||
|
using LiteCharmsSecurity.Admin.Api.Configuration;
|
||||||
|
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
||||||
|
using LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity;
|
||||||
|
using LiteCharmsSecurity.Shared.Dtos;
|
||||||
|
using LiteCharmsSecurity.Shared.Dtos.Identity;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using NSwag.AspNetCore;
|
using NSwag.AspNetCore;
|
||||||
using Skoruba.AuditLogging.EntityFramework.Entities;
|
using Skoruba.AuditLogging.EntityFramework.Entities;
|
||||||
using LiteCharmsSecurity.Admin.Api.Configuration;
|
|
||||||
using Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration.Configuration;
|
using Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration.Configuration;
|
||||||
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
|
||||||
using LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity;
|
|
||||||
using Skoruba.Duende.IdentityServer.Admin.UI.Api.Configuration;
|
using Skoruba.Duende.IdentityServer.Admin.UI.Api.Configuration;
|
||||||
using Skoruba.Duende.IdentityServer.Admin.UI.Api.Helpers;
|
using Skoruba.Duende.IdentityServer.Admin.UI.Api.Helpers;
|
||||||
using Skoruba.Duende.IdentityServer.Shared.Configuration.Helpers;
|
using Skoruba.Duende.IdentityServer.Shared.Configuration.Helpers;
|
||||||
using LiteCharmsSecurity.Shared.Dtos;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
using LiteCharmsSecurity.Shared.Dtos.Identity;
|
|
||||||
using StartupHelpers = Skoruba.Duende.IdentityServer.Shared.Configuration.Helpers.StartupHelpers;
|
using StartupHelpers = Skoruba.Duende.IdentityServer.Shared.Configuration.Helpers.StartupHelpers;
|
||||||
|
|
||||||
namespace LiteCharmsSecurity.Admin.Api
|
namespace LiteCharmsSecurity.Admin.Api
|
||||||
|
|||||||
@@ -10,16 +10,16 @@
|
|||||||
"ForwardLimit": 1
|
"ForwardLimit": 1
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"AdminLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"AdminLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"AdminAuditLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"AdminAuditLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"AdminConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;"
|
"AdminConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;"
|
||||||
},
|
},
|
||||||
"AdminApiConfiguration": {
|
"AdminApiConfiguration": {
|
||||||
"ApplicationName": "Lite Charms Security UI",
|
"ApplicationName": "Lite Charms Security",
|
||||||
"ApiName": "Lite Charms Security Api",
|
"ApiName": "Lite Charms Security Api",
|
||||||
"ApiVersion": "v1",
|
"ApiVersion": "v1",
|
||||||
"ApiBaseUrl": "https://localhost:44302",
|
"ApiBaseUrl": "https://localhost:44302",
|
||||||
@@ -32,9 +32,9 @@
|
|||||||
"CorsAllowOrigins": []
|
"CorsAllowOrigins": []
|
||||||
},
|
},
|
||||||
"SmtpConfiguration": {
|
"SmtpConfiguration": {
|
||||||
"Host": "",
|
"Host": "mail.litecharms.co.za",
|
||||||
"Login": "",
|
"Login": "security@litecharms.co.za",
|
||||||
"Password": ""
|
"Password": "X,xq1EnK7AjM3L=d"
|
||||||
},
|
},
|
||||||
"SendGridConfiguration": {
|
"SendGridConfiguration": {
|
||||||
"ApiKey": "",
|
"ApiKey": "",
|
||||||
@@ -80,9 +80,9 @@
|
|||||||
"ReadConfigurationFromKeyVault": false
|
"ReadConfigurationFromKeyVault": false
|
||||||
},
|
},
|
||||||
"SeedConfiguration": {
|
"SeedConfiguration": {
|
||||||
"ApplySeed": true
|
"ApplySeed": false
|
||||||
},
|
},
|
||||||
"DatabaseMigrationsConfiguration": {
|
"DatabaseMigrationsConfiguration": {
|
||||||
"ApplyDatabaseMigrations": true
|
"ApplyDatabaseMigrations": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -6,9 +6,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.11" PrivateAssets="All" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
+350
@@ -0,0 +1,350 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identity
|
||||||
|
{
|
||||||
|
[DbContext(typeof(AdminIdentityDbContext))]
|
||||||
|
[Migration("20260606104139_FixModelDrift")]
|
||||||
|
partial class FixModelDrift
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("AccessFailedCount")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<bool>("EmailConfirmed")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("LockoutEnabled")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedEmail")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedUserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("PasswordHash")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("SecurityStamp")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedEmail")
|
||||||
|
.HasDatabaseName("EmailIndex");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedUserName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("UserNameIndex");
|
||||||
|
|
||||||
|
b.ToTable("Users", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
||||||
|
{
|
||||||
|
b.Property<byte[]>("CredentialId")
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("bytea");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("CredentialId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserPasskeys", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("RoleNameIndex");
|
||||||
|
|
||||||
|
b.ToTable("Roles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRoleClaim", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("RoleId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("RoleClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserClaim", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderDisplayName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserLogins", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserRole", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("RoleId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("UserRoles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserToken", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("Value")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
|
b.ToTable("UserTokens", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 =>
|
||||||
|
{
|
||||||
|
b1.Property<byte[]>("UserIdentityPasskeyCredentialId");
|
||||||
|
|
||||||
|
b1.Property<byte[]>("AttestationObject")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<byte[]>("ClientDataJson")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<DateTimeOffset>("CreatedAt");
|
||||||
|
|
||||||
|
b1.Property<bool>("IsBackedUp");
|
||||||
|
|
||||||
|
b1.Property<bool>("IsBackupEligible");
|
||||||
|
|
||||||
|
b1.Property<bool>("IsUserVerified");
|
||||||
|
|
||||||
|
b1.Property<string>("Name");
|
||||||
|
|
||||||
|
b1.Property<byte[]>("PublicKey")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<long>("SignCount");
|
||||||
|
|
||||||
|
b1.PrimitiveCollection<string>("Transports");
|
||||||
|
|
||||||
|
b1.HasKey("UserIdentityPasskeyCredentialId");
|
||||||
|
|
||||||
|
b1.ToTable("UserPasskeys");
|
||||||
|
|
||||||
|
b1
|
||||||
|
.ToJson("Data")
|
||||||
|
.HasColumnType("jsonb");
|
||||||
|
|
||||||
|
b1.WithOwner()
|
||||||
|
.HasForeignKey("UserIdentityPasskeyCredentialId");
|
||||||
|
});
|
||||||
|
|
||||||
|
b.Navigation("Data")
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRoleClaim", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserClaim", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserRole", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserToken", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+98
@@ -0,0 +1,98 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identity
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class FixModelDrift : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Name",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ProviderKey",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Name",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ProviderKey",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+28
-28
@@ -1,10 +1,10 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
|
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@@ -17,28 +17,11 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "10.0.2")
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
|
||||||
{
|
|
||||||
b.Property<byte[]>("CredentialId")
|
|
||||||
.HasMaxLength(1024)
|
|
||||||
.HasColumnType("bytea");
|
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("CredentialId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("UserPasskeys", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", b =>
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
@@ -104,6 +87,23 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
b.ToTable("Users", (string)null);
|
b.ToTable("Users", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
||||||
|
{
|
||||||
|
b.Property<byte[]>("CredentialId")
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("bytea");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("CredentialId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserPasskeys", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", b =>
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
@@ -183,12 +183,12 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
b.Property<string>("ProviderKey")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
b.Property<string>("ProviderDisplayName")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@@ -225,12 +225,12 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|||||||
+7
-3
@@ -6,10 +6,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.11" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.11">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />
|
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -6,9 +6,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.11" PrivateAssets="All" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,38 +5,29 @@ EXPOSE 443
|
|||||||
|
|
||||||
FROM node:22-bookworm-slim AS node
|
FROM node:22-bookworm-slim AS node
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
||||||
NUGET_XMLDOC_MODE=skip
|
NUGET_XMLDOC_MODE=skip
|
||||||
WORKDIR /src
|
WORKDIR /app_source
|
||||||
|
|
||||||
COPY --from=node /usr/local/bin/node /usr/local/bin/node
|
COPY --from=node /usr/local/bin/node /usr/local/bin/node
|
||||||
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
|
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
|
||||||
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
|
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
|
||||||
&& npm install -g npm@latest \
|
&& npm install -g npm@latest
|
||||||
&& node --version && npm --version
|
|
||||||
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin/LiteCharmsSecurity.Admin.csproj", "src/LiteCharmsSecurity.Admin/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.Identity/LiteCharmsSecurity.Admin.EntityFramework.Identity.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.Identity/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework/LiteCharmsSecurity.Admin.EntityFramework.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.Extensions/LiteCharmsSecurity.Admin.EntityFramework.Extensions.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.Extensions/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.Configuration/LiteCharmsSecurity.Admin.EntityFramework.Configuration.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.Configuration/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.UI/LiteCharmsSecurity.Admin.UI.csproj", "src/LiteCharmsSecurity.Admin.UI/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Shared.Configuration/LiteCharmsSecurity.Shared.Configuration.csproj", "src/LiteCharmsSecurity.Shared.Configuration/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.Shared/LiteCharmsSecurity.Admin.EntityFramework.Shared.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.Shared/"]
|
|
||||||
|
|
||||||
RUN dotnet restore -a $TARGETARCH "src/LiteCharmsSecurity.Admin/LiteCharmsSecurity.Admin.csproj"
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/src/LiteCharmsSecurity.Admin"
|
|
||||||
RUN dotnet build -a $TARGETARCH "LiteCharmsSecurity.Admin.csproj" -c Release -o /app/build
|
RUN dotnet restore "LiteCharmsSecurity.AdminUI.sln" --ignore-failed-sources --source "https://nexus.khongisa.co.za/repository/nuget-group/index.json"
|
||||||
|
|
||||||
|
WORKDIR "/app_source/src/LiteCharmsSecurity.Admin"
|
||||||
|
RUN dotnet build "LiteCharmsSecurity.Admin.csproj" -c Release -o /app/build --source "https://nexus.khongisa.co.za/repository/nuget-group/index.json"
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish -a $TARGETARCH "LiteCharmsSecurity.Admin.csproj" -c Release --no-restore -o /app/publish
|
RUN dotnet publish "LiteCharmsSecurity.Admin.csproj" -c Release --no-restore -o /app/publish
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
||||||
ENTRYPOINT ["dotnet", "LiteCharmsSecurity.Admin.dll"]
|
ENTRYPOINT ["dotnet", "LiteCharmsSecurity.Admin.dll"]
|
||||||
@@ -9,12 +9,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="10.0.11" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.UI" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.UI" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.UI.Spa" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.UI.Spa" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Shared.Configuration" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Shared.Configuration" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"AdminConfiguration": {
|
"AdminConfiguration": {
|
||||||
"BasicConfiguration": {
|
"BasicConfiguration": {
|
||||||
"Title": "Lite Charms Security UI",
|
"Title": "Lite Charms Security",
|
||||||
"BasePath": "/"
|
"BasePath": "/"
|
||||||
},
|
},
|
||||||
"AuthenticationConfiguration": {
|
"AuthenticationConfiguration": {
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"ProtectKeysWithAzureKeyVault": false
|
"ProtectKeysWithAzureKeyVault": false
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;"
|
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;"
|
||||||
},
|
},
|
||||||
"AzureKeyVaultConfiguration": {
|
"AzureKeyVaultConfiguration": {
|
||||||
"AzureKeyVaultEndpoint": "",
|
"AzureKeyVaultEndpoint": "",
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
WORKDIR /src
|
WORKDIR /app_source
|
||||||
COPY ["src/LiteCharmsSecurity.STS.Identity/LiteCharmsSecurity.STS.Identity.csproj", "src/LiteCharmsSecurity.STS.Identity/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Admin.EntityFramework.Shared/LiteCharmsSecurity.Admin.EntityFramework.Shared.csproj", "src/LiteCharmsSecurity.Admin.EntityFramework.Shared/"]
|
|
||||||
COPY ["src/LiteCharmsSecurity.Shared/LiteCharmsSecurity.Shared.csproj", "src/LiteCharmsSecurity.Shared/"]
|
|
||||||
RUN dotnet restore -a $TARGETARCH "src/LiteCharmsSecurity.STS.Identity/LiteCharmsSecurity.STS.Identity.csproj"
|
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/src/LiteCharmsSecurity.STS.Identity"
|
|
||||||
RUN dotnet build -a $TARGETARCH "LiteCharmsSecurity.STS.Identity.csproj" -c Release -o /app/build
|
RUN dotnet restore "LiteCharmsSecurity.AdminUI.sln" --ignore-failed-sources --source "https://nexus.khongisa.co.za/repository/nuget-group/index.json"
|
||||||
|
|
||||||
|
WORKDIR "/app_source/src/LiteCharmsSecurity.STS.Identity"
|
||||||
|
RUN dotnet build "LiteCharmsSecurity.STS.Identity.csproj" -c Release -o /app/build --source "https://nexus.khongisa.co.za/repository/nuget-group/index.json"
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish -a $TARGETARCH "LiteCharmsSecurity.STS.Identity.csproj" -c Release --no-restore -o /app/publish
|
RUN dotnet publish "LiteCharmsSecurity.STS.Identity.csproj" -c Release --no-restore -o /app/publish
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -17,34 +17,34 @@
|
|||||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
|
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
|
||||||
<PackageReference Include="KubernetesClient" Version="19.0.2" />
|
<PackageReference Include="KubernetesClient" Version="19.0.2" />
|
||||||
<PackageReference Include="IdentityModel" Version="7.0.0" />
|
<PackageReference Include="IdentityModel" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.7">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.11">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.Identity.Web" Version="4.8.0" />
|
<PackageReference Include="Microsoft.Identity.Web" Version="4.14.2" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.11" />
|
||||||
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="7.4.7" />
|
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="8.0.6" />
|
||||||
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="7.4.7" />
|
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="8.0.6" />
|
||||||
<PackageReference Include="Serilog" Version="4.3.1" />
|
<PackageReference Include="Serilog" Version="4.4.0" />
|
||||||
<PackageReference Include="Serilog.Enrichers.Environment" Version="3.0.1" />
|
<PackageReference Include="Serilog.Enrichers.Environment" Version="3.0.1" />
|
||||||
<PackageReference Include="Serilog.Enrichers.Thread" Version="4.0.0" />
|
<PackageReference Include="Serilog.Enrichers.Thread" Version="4.0.0" />
|
||||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="10.0.0" />
|
<PackageReference Include="Serilog.Extensions.Hosting" Version="10.0.0" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="10.0.0" />
|
<PackageReference Include="Serilog.Settings.Configuration" Version="10.0.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="9.0.3" />
|
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="10.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Seq" Version="9.0.0" />
|
<PackageReference Include="Serilog.Sinks.Seq" Version="9.1.0" />
|
||||||
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />
|
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />
|
||||||
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
|
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Shared.Configuration" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Shared.Configuration" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;"
|
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;"
|
||||||
},
|
},
|
||||||
"DatabaseProviderConfiguration": {
|
"DatabaseProviderConfiguration": {
|
||||||
"ProviderType": "PostgreSQL"
|
"ProviderType": "PostgreSQL"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
"ResolutionPolicy": "Username"
|
"ResolutionPolicy": "Username"
|
||||||
},
|
},
|
||||||
"AdminConfiguration": {
|
"AdminConfiguration": {
|
||||||
"PageTitle": "Lite Charms IdentityServer",
|
"PageTitle": "Lite Charms Security",
|
||||||
"HomePageLogoUri": "~/images/skoruba-icon.svg",
|
"HomePageLogoUri": "~/images/skoruba-icon.svg",
|
||||||
"FaviconUri": "~/favicon.svg",
|
"FaviconUri": "~/favicon.svg",
|
||||||
"Theme": null,
|
"Theme": null,
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.5.0" />
|
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.5.1" />
|
||||||
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Keys" Version="1.6.1" />
|
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Keys" Version="1.6.3" />
|
||||||
<PackageReference Include="Azure.Identity" Version="1.21.0" />
|
<PackageReference Include="Azure.Identity" Version="1.21.0" />
|
||||||
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.8.0" />
|
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.9.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.11" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.11" />
|
||||||
<PackageReference Include="Sendgrid" Version="9.29.3" />
|
<PackageReference Include="Sendgrid" Version="9.29.3" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Identity" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.BusinessLogic.Identity" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user