Sign inSign up

faultmaven/fm-auth-service

By faultmaven

•Updated 10 months ago

FaultMaven Authentication - JWT-based authentication for single-user deployments

Image
0

1.2K

faultmaven/fm-auth-service repository overview

⁠fm-auth-service

FaultMaven Authentication Microservice - Open source JWT-based authentication for single-user deployments.

License Docker

⁠Overview

Lightweight JWT authentication service for FaultMaven PUBLIC deployments. Provides user registration, login, and JWT token generation using RS256 asymmetric keys.

Features:

  • User registration with bcrypt password hashing
  • JWT token generation (access + refresh tokens)
  • RS256 asymmetric key signatures
  • JWKS endpoint for token verification
  • SQLite user database
  • Redis session storage

⁠Quick Start

docker run -d -p 8001:8001 \
  -v ./data:/data \
  -e REDIS_URL=redis://host.docker.internal:6379 \
  faultmaven/fm-auth-service:latest

⁠API Endpoints

MethodEndpointDescription
POST/api/v1/auth/registerRegister new user
POST/api/v1/auth/loginLogin and get JWT tokens
POST/api/v1/auth/refreshRefresh access token
POST/api/v1/auth/logoutLogout (invalidate tokens)
GET/.well-known/jwks.jsonJSON Web Key Set
GET/healthHealth check

⁠Configuration

VariableDefault
PORT8001
DATABASE_URLsqlite+aiosqlite:////data/fm_auth.db
REDIS_URLredis://localhost:6379
JWT_PRIVATE_KEY_PATHsecrets/jwt-private-key.pem
JWT_PUBLIC_KEY_PATHsecrets/jwt-public-key.pem
ACCESS_TOKEN_EXPIRE_MINUTES30
REFRESH_TOKEN_EXPIRE_DAYS7

⁠License

Apache 2.0 - See LICENSE⁠ for details.

Tag summary

Content type

Image

Digest

sha256:d4d3efbe8…

Size

73.2 MB

Last updated

10 months ago

docker pull faultmaven/fm-auth-service