You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OAuth 2.0 + OpenID Connect identity provider with multi-tenant isolation,
role-based access control, a browser-facing consent flow, and production
security controls. Built with Go, React, PostgreSQL, and Redis using Clean
Architecture.
Project Status
Keyles is in active development. The core SSO platform and production
security hardening are implemented through Feature 007.
Feature
Status
Tenant registration and email verification
Implemented
SSO landing page and tenant dashboard
Implemented
OAuth 2.0 and OpenID Connect provider
Implemented
OAuth client registration and secret rotation
Implemented
User management and client-scoped RBAC
Implemented
Browser login, consent, and logout flow
Implemented
Production security hardening
Implemented
Features
OAuth 2.0 + OIDC: Authorization Code Flow with S256 PKCE, token
exchange, refresh, revocation, and introspection (RFC 6749, 7009, 7662)
Multi-Tenant: Complete tenant isolation with organization-scoped
users, clients, and roles
User Management & RBAC: Invitation-based onboarding, user lifecycle
(enable/disable/delete), role assignment per client, session listing,
and audit activity feeds
OAuth Client Management: Register, update, rotate secrets, and
manage redirect URIs for OAuth client applications
JWT Tokens: RS256 asymmetric signing with JWKS endpoint and OIDC
discovery
Integration Guide: Public and dashboard documentation for client
registration, authorization, token handling, refresh, revocation, and
production readiness
git clone https://github.com/ranggaaprilio/keyles.git
cd keyles
# Copy and configure the Compose environment
cp .env.example .env
# Set POSTGRES_PASSWORD, DB_PASSWORD, JWT_SECRET, and other required values# Start PostgreSQL, Redis, backend, frontend, and Caddy
docker compose up -d
# Run migrationscd backend && make migrate-up && make seed
# Access the application# Frontend: http://localhost:3000# Backend: http://localhost:8080# Health: http://localhost:8080/health# HTTPS: https://localhost# Metrics: http://localhost:8080/metrics
Production deployment uses the base Compose file plus hardened overrides:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Before deployment, configure strong secrets, HTTPS URLs, ACME_EMAIL, and a
TLS-enabled PostgreSQL connection. The backend rejects insecure production
configuration at startup. See the
production hardening quickstart
for the complete checklist.
API Endpoints
OAuth 2.0 / OIDC
Method
Path
Description
GET
/oauth2/auth
Browser authorization (redirects to login or consent)
POST
/oauth2/login
End-user credential authentication
GET
/oauth2/consent/:transactionId
Read consent details
POST
/oauth2/consent
Approve or deny consent
POST
/oauth2/logout
Terminate provider-local SSO session
POST
/oauth2/token
Token endpoint (code exchange, refresh)
POST
/oauth2/revoke
Token revocation (RFC 7009)
POST
/oauth2/introspect
Token introspection (RFC 7662)
GET
/oauth2/userinfo
User profile (Bearer token)
GET
/.well-known/openid-configuration
OIDC discovery
GET
/.well-known/jwks.json
JSON Web Key Set
Tenant Registration
Method
Path
Description
POST
/api/v1/register
Register new tenant
GET
/api/v1/check-availability
Check email or org name availability
POST
/api/v1/verify-otp
Verify email OTP
POST
/api/v1/resend-otp
Resend verification OTP
Authentication
Method
Path
Description
POST
/api/v1/login
Admin login (returns JWT)
GET
/api/v1/dashboard
Tenant dashboard (requires JWT)
GET
/api/v1/invitations/:token/validate
Validate a user invitation
POST
/api/v1/invitations/:token/accept
Accept an invitation and set a password
Admin: Client Management
Method
Path
Description
POST
/api/v1/admin/clients
Register OAuth client
GET
/api/v1/admin/clients
List clients
GET
/api/v1/admin/clients/:clientId
Get client details
PUT
/api/v1/admin/clients/:clientId
Update client
DELETE
/api/v1/admin/clients/:clientId
Delete client
POST
/api/v1/admin/clients/:clientId/rotate-secret
Rotate client secret
Admin: User Management
Method
Path
Description
GET
/api/v1/admin/users
List users
POST
/api/v1/admin/users/invite
Invite new user
GET
/api/v1/admin/users/:id
Get user details
PATCH
/api/v1/admin/users/:id
Update user
PATCH
/api/v1/admin/users/:id/status
Enable or disable user
DELETE
/api/v1/admin/users/:id
Delete user
POST
/api/v1/admin/users/:id/resend-invitation
Resend invitation
GET
/api/v1/admin/users/:id/roles
List user's role assignments
POST
/api/v1/admin/users/:id/roles
Assign role to user
DELETE
/api/v1/admin/users/:id/roles/:assignmentId
Revoke role
GET
/api/v1/admin/users/:id/sessions
List user's active sessions
DELETE
/api/v1/admin/users/:id/sessions/:sessionId
Revoke session
GET
/api/v1/admin/users/:id/activity
List user's audit activity
Admin: Role Management
Method
Path
Description
POST
/api/v1/admin/roles/assign
Assign user role
POST
/api/v1/admin/roles/revoke
Revoke user role
GET
/api/v1/admin/roles/users/:userId
List roles for a user
GET
/api/v1/admin/roles/clients/:clientId
List roles for a client
Security
PKCE: S256 mandatory for all authorization code flows
RS256: Asymmetric JWT signing with 2048-bit RSA keys
TLS: Caddy terminates HTTPS and manages certificates; production
configuration requires HTTPS issuer/frontend URLs
Secrets: Runtime environment variables replace committed credentials;
weak production configuration is rejected during startup
CSRF: Double-submit cookie validation protects state-changing API
operations, with explicit exemptions for protocol and public auth endpoints