Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Key Reuse Prevention #69

Open
koladev32 opened this issue Oct 27, 2024 · 0 comments
Open

API Key Reuse Prevention #69

koladev32 opened this issue Oct 27, 2024 · 0 comments
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@koladev32
Copy link
Owner

Is your feature request related to a problem? Please describe.

Replay attacks are a security concern when API keys are intercepted and reused in quick succession. This leads to unauthorized access, resource exhaustion, and data misuse. Currently, there’s no safeguard in place to prevent rapid reuse of intercepted API keys.

Describe the solution you'd like

Introduce an optional Django app to prevent replay attacks by tracking API key usage and blocking identical requests within a configurable cooldown period. This app would leverage Redis as the primary storage for low-latency tracking with TTL management. If Redis isn’t available, the app would support using the primary database as an alternative, though with potential performance impacts.

Describe alternatives you've considered

Considered rate limiting and third-party security solutions, but these do not directly address replay attacks by blocking identical requests in short intervals. Redis was chosen as the primary storage for its speed and suitability for time-based data.

Additional context

This app would be added to INSTALLED_APPS, allowing necessary migrations and an admin interface for monitoring and adjusting settings. Redis support offers optimal performance, while fallback to the primary database provides flexibility for varied infrastructures.

@koladev32 koladev32 added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant