Skip to content

bohewu/HybridIdP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,517 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HybridAuth IdP

A robust, enterprise-ready Identity Provider (IdP) built on .NET 10+ and OpenIddict, featuring a hybrid SSR (Razor Pages) and SPA (Vue.js) architecture.

Caution

SECURITY WARNING: This project includes default development passwords (e.g., YourStrong!Passw0rd). Never use these in production. Always use Environment Variables or a Secret Manager to override sensitive settings.


📖 Documentation


🏗️ Project Structure

  • Core.Domain: Entities, constants, and core business models.
  • Core.Application: Interfaces, DTOs, and application logic.
  • Infrastructure: Data access (EF Core), external services, and security implementations.
  • Web.IdP: The main Identity Provider host (Razor Pages + Vue.js Admin UI).
  • samples/: Sample integration clients (M2M, Device Flow, Impersonation).
  • Tests/: Comprehensive test suites (System, Integration, Unit).

🚀 Key Features

🔐 OpenID Connect & OAuth 2.0

Powered by OpenIddict:

  • Flows: Authorization Code + PKCE, Client Credentials, Device Flow.
  • Security: Refresh token rotation with configurable reuse leeway, secure session management.
  • Standard Discovery: Full OIDC metadata at /.well-known/openid-configuration.

🛡️ Admin & Identity Management

  • RBAC: Hierarchical roles and fine-grained permissions.
  • Impersonation: Secure "Login As" feature for administrative support.
  • Observability: Prometheus metrics and structured audit logging.
  • Bot Protection: Integrated Cloudflare Turnstile support.
  • External Identity: Seamless integration with Google & Microsoft accounts, including auto-linking and AMR support.
  • Branding: Customizable UI with configurable Privacy Policy and Help documentation links.

🛠️ Tech Stack

  • Backend: .NET 10+, EF Core (SQL Server/PostgreSQL), OpenIddict, SignalR.
  • Frontend: Vue.js 3, Vite, Tailwind CSS, Headless UI.
  • Testing: xUnit, FluentAssertions, Playwright, Vitest.

⚡ Quick Start

Development

  1. Prerequisites: Docker Desktop, .NET 10 SDK+.
  2. Run Infrastructure:
    docker compose -f docker-compose.dev.yml up -d
  3. Run App:
    dotnet run --project Web.IdP

Production Deployment

Use the Setup Wizard (Recommended):

cd deployment
./setup-env.ps1  # or ./setup-env.sh

This handles certificates, passwords, and architecture selection involved in a production setup. See Deployment Guide for details.


⚖️ License

Distributed under the MIT License. See LICENSE for more information.


🤖 AI-Assisted Development

This project was developed with significant assistance from advanced AI coding agents. While following industry standards, we recommend a secondary human security audit for production environments. Code is provided "AS IS".

About

Self-hosted Identity Provider built with .NET 10 and OpenIddict. Features: OIDC/OAuth 2.0, MFA (TOTP/Email/Passkey), Admin Dashboard, Docker deployment, SQL Server/PostgreSQL support.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors