adhit-r / adhit-r/aran-mcp

Implement API Key Management System

未关闭
#35 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api authentication backend enhancement feature frontend security
主要语言
TypeScript
星标
0
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

## Overview
Build a complete API key management system with CRUD operations, rotation, expiration, and usage tracking.

## Business Value
API keys enable programmatic access to the platform. This is essential for integrations and automation.

## Technology Stack
- Backend: Go, JWT/Token generation, Middleware
- Frontend: TypeScript, React, Next.js
- Database: PostgreSQL
- Security: Secure key generation and storage

## Skill Level Required
- Intermediate
- Understanding of authentication and authorization
- Knowledge of secure token generation
- Experience with middleware patterns
- Security best practices awareness

## Learning Opportunities
- Learn API key generation and management best practices
- Understand secure token storage and hashing
- Practice building authentication middleware
- Gain experience with key rotation strategies
- Learn about usage tracking and analytics

## Impact
This feature enables programmatic access to the platform, opening up integration possibilities. Contributors will work on security-critical code and learn authentication patterns used across the industry.

## Current State
- Database table exists (api_keys)
- No API endpoints for key management
- No UI for key management

## Subtasks
- [ ] Create API key generation service
- [ ] Implement API key CRUD endpoints
- [ ] Add API key authentication middleware
- [ ] Create API key management UI
- [ ] Implement key rotation
- [ ] Add expiration handling
- [ ] Track key usage statistics
- [ ] Add key revocation

## Implementation Steps
1. Create backend/internal/auth/api_key.go service
2. Add API endpoints: GET, POST, PUT, DELETE /api/v1/api-keys
3. Update authentication middleware to support API keys
4. Create frontend API key management component
5. Add usage tracking

## Getting Started
1. Review existing authentication code in backend/internal/auth/
2. Study secure key generation practices
3. Check middleware implementation in backend/internal/middleware/
4. Review frontend authentication components

## Acceptance Criteria
- [ ] Users can create API keys
- [ ] Keys can be rotated
- [ ] Keys can expire
- [ ] Key usage is tracked
- [ ] Keys can be revoked
- [ ] UI shows key list and details
- [ ] API authentication works with keys

## Estimated Effort
- Hours: 16-20
- Complexity: Medium

贡献指南

打开贡献指南

调研方向

Start by reviewing the existing authentication code in backend/internal/auth/, the middleware in backend/internal/middleware/, and the existing api_keys database table. Then map the listed API endpoints, authentication middleware, frontend component, rotation, expiration, revocation, and usage tracking work to the acceptance criteria. Done means users can manage keys through the API and UI, authenticate with them, and see the required lifecycle and usage behavior.

由索引模型根据 Issue 内容生成。

评估

技术栈
go, next.js, postgresql, react, typescript
领域
api, authentication, authorization, backend, database, frontend, security
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。