Keypal core features
mainkeypal provides a secure, type-safe framework for managing API keys with the following capabilities:
- Security: Uses SHA-256/SHA-512 hashing with optional salt and timing-safe comparisons.
- Automatic Detection: Extracts keys from
Authorization,x-api-key, or custom headers. - Caching: Supports optional in-memory or Redis caching for validated keys.
- Pluggable Storage: Includes adapters for Memory, Redis, Drizzle ORM, Prisma, Kysely, and Convex.
- Access Control: Fine-grained, scope-based permissions and resource-specific scopes.
- Management: Features for enabling/disabling, rotating, and soft-revoking keys, plus organization via tags.
- Observability: Opt-in audit logging to track key usage and management actions.