Skip to content

Implement secure API key hashing and storage #387

@Smartdevs17

Description

@Smartdevs17

Description

API keys are stored in plaintext in the database. Implement bcrypt hashing with key prefix for identification.

Acceptance Criteria

  • API key hashing with bcrypt (cost factor 10)
  • Key prefix (first 8 chars) for key identification
  • Key rotation with overlapping validity
  • Key creation audit with access logging
  • Key revocation with immediate effect
  • Migration script for existing keys

Technical Scope

  • api/src/services/
  • api/src/middleware/auth.ts
  • Edge: key leakage in logs, timing attacks on comparison, bcrypt performance on high-traffic auth

Metadata

Metadata

Assignees

No one assigned

    Labels

    200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveDrips Wave project taskhighHigh priority issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions