AbandonTech / AbandonTech/abandonauth

Short lived and one-time-use tokens for authentication endpoints

Open
#12 2 comments 0 reactions 0 assignees View on GitHub
backend enhancement vulnerability
Dominant language
Python
Stars
4
Forks
2
Avg merge
59m
Merged PRs (30d)
1

Description

## Summary

When a service attempts to login with abandonauth, they are given a temporary token that is used to identify them on the respective service. This token is currently a regular JWT with a relatively long lifetime, it can also be used multiple times to authenticate a single user. This is a security vulnerability. The token should be as short lived as possible and also only be valid for a single use.

## Acceptance Criteria
- Temporary JWTs have a very short lifespan, no more than 60 seconds
- We cache all the currently issued, valid and unused tokens on abandon auth
- An endpoint exists to check that a given token is in this cache of valid/unused tokens
- An endpoint exists to burn short-lives tokens (pop them from the cache of valid tokens)
- This allows a service to call the endpoint and burn a token that is known to be consumed
- Garbage collector exists to remove all unused and expired tokens from this cache
- This is to prevent the cache from becoming a memory leak

Contributor guide

No contributing guide indexed for this repository

Research direction

Look at the authentication endpoints in the codebase, likely under a directory like 'auth' or 'api'. Identify where JWTs are currently generated and validated. The work involves implementing a token cache (possibly using Redis or an in-memory store), adding endpoints to check and burn tokens, and setting up a garbage collector. Start by examining the existing token handling logic and the project's structure for where to place the new cache and endpoints.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, backend-api-design, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.