adhit-r / adhit-r/aran-mcp

Implement API Key Management System

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
api authentication backend enhancement feature frontend security
Dominant language
TypeScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## 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

Contributor guide

Open the contributing guide

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, next.js, postgresql, react, typescript
Domain
api, authentication, authorization, backend, database, frontend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.