Co-Pilot
Updated 24 days ago

pki-manager-web

Ooriolrius
0.0k
oriolrius/pki-manager-web
82
Agent Score

πŸ’‘ Summary

A web-based application for managing X.509 digital certificates and PKI infrastructure.

🎯 Target Audience

IT security professionalsDevOps engineersSystem administratorsSoftware developersSmall to medium enterprises

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); filesystem read/write scope and path traversal. Run with least privilege and audit before enabling in production.

PKI Manager

A modern, web-based Public Key Infrastructure management application for securely generating, issuing, managing, and revoking X.509 digital certificates.

License Node pnpm

Overview

PKI Manager provides complete control over your Private Key Infrastructure without relying on external certificate authorities. Perfect for enterprises, home labs, and development environments that demand full control over their security infrastructure.

Key Highlights

  • Self-Hosted PKI: Create and manage your own root Certificate Authorities
  • Multi-Type Certificates: Server (TLS/SSL), Client Auth, S/MIME Email, Code Signing
  • Secure Key Management: Integration with Cosmian KMS for secure key storage
  • Bulk Operations: CSV-based bulk certificate creation and batch operations
  • Modern UI: React 19 with light/dark theme support and responsive design
  • Type-Safe: End-to-end TypeScript with tRPC for API type safety

Screenshots

Dashboard

Monitor your PKI at a glance with real-time statistics and expiration tracking.

Certificate Authority Management

Create and manage self-signed root CAs with flexible configuration options.

Certificate Management

Issue, manage, and revoke certificates with comprehensive control.

Bulk Operations

Efficient batch certificate creation and management.

Features

Certificate Authority Management

  • βœ… Create self-signed root Certificate Authorities
  • βœ… Configurable subject fields (CN, O, OU, C, ST, L)
  • βœ… Key algorithm selection (RSA-2048, RSA-4096)
  • βœ… Flexible validity periods (1-30 years)
  • βœ… CA revocation with reason tracking
  • βœ… Export in multiple formats (PEM, CRT, DER, CER)

Certificate Issuance & Management

  • βœ… Server Certificates - HTTPS/TLS for web servers and APIs
  • βœ… Client Certificates - Client authentication and mTLS
  • βœ… Email (S/MIME) - Email encryption and signing
  • βœ… Code Signing - Software and code signing
  • βœ… Subject Alternative Names (DNS, IP Address, Email)
  • βœ… Advanced key algorithms (RSA-2048/4096, ECDSA-P256/P384)
  • βœ… Certificate renewal with same parameters
  • βœ… Revocation with standard reasons (keyCompromise, superseded, etc.)
  • βœ… Comprehensive certificate details view

Export & Download

  • βœ… Multiple formats: PEM, CRT, DER, CER
  • βœ… Certificate chains (PEM Chain)
  • βœ… PKCS#7 (P7B)
  • βœ… PKCS#12 with private key (PFX, P12) - password protected
  • βœ… Java KeyStore (JKS)
  • βœ… Batch download (all formats as ZIP)
  • βœ… Security warnings for private key exports

Bulk Operations

  • βœ… CSV-based bulk certificate creation
  • βœ… Flexible field mapping with optional parameters
  • βœ… SAN auto-detection (email, IP, DNS)
  • βœ… Batch download multiple certificates
  • βœ… Bulk renewal for expiring certificates
  • βœ… Batch revocation with reason
  • βœ… Multi-select deletion

Monitoring & Alerts

  • βœ… Real-time dashboard with PKI statistics
  • βœ… Expiration tracking with visual indicators
  • βœ… "Expiring Soon" widget (configurable threshold)
  • βœ… Color-coded status badges (active, revoked, expired)
  • βœ… Automatic status updates based on validity periods

Search & Filtering

  • βœ… Search by Common Name or SAN
  • βœ… Filter by issuing CA (with persistence)
  • βœ… Filter by status (active/revoked/expired)
  • βœ… Filter by certificate type
  • βœ… Sortable tables with instant results

Security

  • βœ… Cosmian KMS integration for secure key storage
  • βœ… Private keys never stored unencrypted locally
  • βœ… Password-protected private key exports
  • βœ… Audit logging for all operations
  • βœ… Revocation tracking with detailed reasons
  • βœ… Secure key pair generation (RSA, ECDSA)

User Experience

  • βœ… Modern, responsive UI with card-based layout
  • βœ… Light/Dark theme with system detection
  • βœ… Sample data generators for quick testing
  • βœ… Form validation with helpful error messages
  • βœ… Contextual action buttons
  • βœ… Real-time status updates

Architecture

This is a monorepo project with two main packages:

pki-manager/
β”œβ”€β”€ backend/          # Node.js/Fastify API server
β”œβ”€β”€ frontend/         # React 19 SPA
β”œβ”€β”€ assets/           # Screenshots and images
└── tests/            # E2E screenshot tests

Technology Stack

Backend

  • Framework: Fastify 5.2 (high-performance HTTP server)
  • API Layer: tRPC v11 (end-to-end type safety)
  • Database: SQLite with better-sqlite3 (embedded, portable)
  • ORM: Drizzle ORM 0.36 (type-safe SQL)
  • Validation: Zod 3.24 (schema validation)
  • KMS: Cosmian KMS (secure key management)
  • Testing: Vitest 2.1
  • Runtime: Node.js 20+

Frontend

  • Framework: React 19.2
  • Routing: TanStack Router 1.133 (file-based, type-safe)
  • State Management: TanStack Query 5.90 (server state)
  • API Client: tRPC 11.0 (type-safe RPC)
  • Styling: Tailwind CSS 4.1 (utility-first)
  • UI Components: shadcn/ui (Radix UI primitives)
  • Icons: Lucide React, FontAwesome
  • Build Tool: Vite 7.1

Testing

  • E2E: Playwright 1.56 (screenshot automation)

Prerequisites

  • Node.js >= 20.0.0
  • pnpm >= 9.0.0
  • Cosmian KMS instance (for secure key storage)

Getting Started

1. Installation

# Install dependencies pnpm install

2. Environment Configuration

# Copy backend environment template cp backend/.env.example backend/.env # Edit backend/.env with your configuration: # - Database path # - Cosmian KMS endpoint and authentication # - Server port (default: 3000)

3. Database Setup

# Run migrations cd backend pnpm db:migrate

4. Start Development Servers

# Start both backend and frontend (from root) pnpm dev

This will start:

  • Backend API at http://localhost:3000
  • Frontend at http://localhost:5173

5. Build for Production

# Build both packages pnpm build # Start production servers cd backend && pnpm start # Backend cd frontend && pnpm preview # Frontend preview

Available Scripts

Root (Workspace)

pnpm dev # Start both backend and frontend in dev mode pnpm build # Build both packages for production pnpm test # Run tests in all packages pnpm typecheck # Type check all packages pnpm lint # Lint all packages pnpm clean # Clean all build artifacts and node_modules pnpm test:screenshots # Run Playwright screenshot tests

Backend

pnpm dev # Start dev server with hot reload pnpm build # Build for production pnpm start # Start production server pnpm test # Run Vitest tests pnpm db:generate # Generate Drizzle migrations pnpm db:migrate # Run database migrations pnpm db:studio # Open Drizzle Studio (DB GUI)

Frontend

pnpm dev # Start Vite dev server pnpm build # Build for production pnpm preview # Preview production build pnpm lint # Run ESLint

Project Structure

pki-manager/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ server.ts               # Fastify server entry point
β”‚   β”‚   β”œβ”€β”€ trpc/
β”‚   β”‚   β”‚   β”œβ”€β”€ router.ts           # Main tRPC router
β”‚   β”‚   β”‚   β”œβ”€β”€ schemas.ts          # Zod validation schemas
β”‚   β”‚   β”‚   └── procedures/         # API endpoints by domain
β”‚   β”‚   β”‚       β”œβ”€β”€ ca.ts           # CA management
β”‚   β”‚   β”‚       β”œβ”€β”€ certificate.ts  # Certificate operations
β”‚   β”‚   β”‚       β”œβ”€β”€ dashboard.ts    # Dashboard stats
β”‚   β”‚   β”‚       └── crl.ts          # CRL management
β”‚   β”‚   β”œβ”€β”€ db/
β”‚   β”‚   β”‚   β”œβ”€β”€ schema.ts           # Drizzle ORM schema
β”‚   β”‚   β”‚   β”œβ”€β”€ index.ts            # Database
5-Dim Analysis
Clarity8/10
Novelty7/10
Utility9/10
Completeness8/10
Maintainability9/10
Pros & Cons

Pros

  • Self-hosted for full control
  • Supports multiple certificate types
  • Modern UI with responsive design
  • Type-safe API interactions

Cons

  • Requires setup of Cosmian KMS
  • Might be complex for beginners
  • Limited community support
  • Dependency on Node.js and pnpm

Related Skills

terraform-engineer

A
toolCo-Pilot
82/ 100

β€œPowerful, but the setup might scare off the impatient.”

pytorch

S
toolCode Lib
92/ 100

β€œIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

β€œIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author oriolrius.