Compare commits

10 Commits

Author SHA1 Message Date
administrator 6748a3762a Merge pull request 'Refactor: Move server implementation to SimpleIdp.Server subfolder' (#6) from feature/server-refactor into main
Reviewed-on: #6
2026-06-11 11:21:33 +00:00
Marek Lesko cccfb45bd5 Refactor: Move server implementation to SimpleIdp.Server subfolder 2026-06-11 13:19:24 +02:00
administrator 08fb137e18 Merge pull request 'Fix Docker build by excluding test files and using explicit project path' (#5) from feature/unit-tests into main
Reviewed-on: #5
2026-06-11 11:12:33 +00:00
Marek Lesko 59a46e8a1f Fix Docker build by excluding test files and using explicit project path 2026-06-11 13:11:58 +02:00
administrator 65a3d52a5b Merge pull request 'Add unit test project for configuration parsing' (#4) from feature/unit-tests into main
Reviewed-on: #4
2026-06-11 10:57:08 +00:00
Marek Lesko b90365a2ce Add unit test project for configuration parsing 2026-06-11 12:53:46 +02:00
administrator 2d30221119 Merge pull request 'Add README.md' (#3) from agent into main
Reviewed-on: #3
2026-06-11 10:41:49 +00:00
Marek Lesko 52cc594f69 Add README.md 2026-06-11 12:40:44 +02:00
Marek Lesko 49a450a6fa Add AGENTS.md with project documentation 2026-06-11 10:33:08 +02:00
Marek Lesko f10617f646 Fix duplicate Content item error in csproj
Use Update instead of Include for config/idp-config.json to avoid
conflict with the SDK's default implicit Content item inclusion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:37:37 +00:00
106 changed files with 595 additions and 18 deletions
+74
View File
@@ -0,0 +1,74 @@
# SimpleIdP
Self-hosted OAuth 2.0 / OpenID Connect identity provider built with ASP.NET Core 8.0 and SimpleIdServer.
## Features
- OAuth 2.0 Authorization Code flow with PKCE support
- OpenID Connect authentication
- Multiple authentication methods:
- Password-based
- SMS-based
- OTP (One-Time Password)
- WebAuthn (FIDO2)
- Mobile-based
- Email-based
- Console-based
- Verifiable Presentations
- Multi-realm support
- User management with roles and claims
- Client management with configurable redirect URIs
- Refresh tokens with configurable expiration
- Consent management
## Technology Stack
- **Framework**: .NET 8.0
- **Identity Server**: SimpleIdServer 6.0.*-*
- **UI**: Razor Pages
- **Container**: Docker (multi-stage build)
## Configuration
Configuration is loaded from JSON files in the `config/` directory:
- `users.json` - User definitions (username, password, email, roles, claims, consents)
- `clients.json` - OAuth 2.0 client definitions
- `realm.json` - Realm configuration
- `scopes.json` - Available scopes and claim mappers
- `api.json` - API resource definitions
## Quick Start
### Run Locally
```bash
dotnet run
```
The server starts on:
- HTTPS: `https://localhost:65455`
- HTTP: `http://localhost:65456`
### Run in Docker
```bash
docker build -t simpleidp .
docker run -p 8080:8080 simpleidp
```
## Default Credentials
The default user is defined in `config/users.json`:
- Username: `administrator`
- Password: `password`
- Email: `adm@mail.com`
## Docker Hub
Image: `mareklesko/simpleidp`
## CI/CD
GitLab CI pipeline builds and pushes Docker images on `dev` and `main` branches.
+2 -2
View File
@@ -9,8 +9,8 @@ WORKDIR /src
COPY . .
# Restore & publish (self-contained trimming can be added later if desired)
RUN dotnet restore
RUN dotnet publish -c $BUILD_CONFIGURATION -o /app/publish --no-restore
RUN dotnet restore SimpleIdp.Server/SimpleIdp.csproj
RUN dotnet publish SimpleIdp.Server/SimpleIdp.csproj -c $BUILD_CONFIGURATION -o /app/publish --no-restore
# =========================
# Runtime stage
-12
View File
@@ -1,12 +0,0 @@
{
"profiles": {
"SimpleIdp": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:65455;http://localhost:65456"
}
}
}
+60
View File
@@ -0,0 +1,60 @@
# simpleidp
Self-hosted OAuth 2.0 / OpenID Connect identity provider built with ASP.NET Core 8.0 and SimpleIdServer.
## Features
- OAuth 2.0 Authorization Code flow with PKCE support
- OpenID Connect authentication
- Multiple authentication methods (password, SMS, OTP, WebAuthn, mobile, email, console, verifiable presentations)
- Multi-realm support
- User management with roles and claims
- Client management with configurable redirect URIs
- Refresh tokens with configurable expiration
- Consent management
## Technology Stack
- **Framework**: .NET 8.0
- **Identity Server**: SimpleIdServer 6.0.*-*
- **UI**: Razor Pages
- **Container**: Docker (multi-stage build)
## Quick Start
### Run Locally
```bash
dotnet run
```
The server starts on:
- HTTPS: `https://localhost:65455`
- HTTP: `http://localhost:65456`
### Run in Docker
```bash
docker build -t simpleidp .
docker run -p 8080:8080 simpleidp
```
## Configuration
Configuration is loaded from JSON files in the `config/` directory:
- `users.json` - User definitions (username, password, email, roles, claims, consents)
- `clients.json` - OAuth 2.0 client definitions
- `realm.json` - Realm configuration
- `scopes.json` - Available scopes and claim mappers
- `api.json` - API resource definitions
## Default Credentials
- **Username**: `administrator`
- **Password**: `password`
- **Email**: `adm@mail.com`
## Docker Hub
Image: `mareklesko/simpleidp`
@@ -4,6 +4,11 @@
<OutputType>Exe</OutputType>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<ItemGroup>
<Compile Remove="SimpleIdp.Tests/**" />
<EmbeddedResource Remove="SimpleIdp.Tests/**" />
<None Remove="SimpleIdp.Tests/**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.3.0" />
<PackageReference Include="SimpleIdServer.IdServer.Pwd" Version="6.0.*-*" />
@@ -11,7 +16,7 @@
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
</ItemGroup>
<ItemGroup>
<Content Include="config\idp-config.json">
<Content Update="config\idp-config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
@@ -244,4 +249,4 @@
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>
</Project>
+22
View File
@@ -0,0 +1,22 @@
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": [
{
"library": "jquery@3.6.3",
"destination": "wwwroot/lib/jquery/"
},
{
"library": "bootstrap@5.2.3",
"destination": "wwwroot/lib/bootstrap/"
},
{
"library": "popper.js@2.11.6",
"destination": "wwwroot/lib/popper.js/"
},
{
"library": "font-awesome@6.5.2",
"destination": "wwwroot/lib/fontawesome/"
}
]
}

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Some files were not shown because too many files have changed in this diff Show More