Skip to content

Add API Tokens and Rate Limiter per Token #68

@clsource

Description

@clsource

Create a mechanism for API protection against bad actors and malicious scrappers.

  • Create access tokens table
  • Protect all endpoints with access token
  • Rate limit per token and type

Table api_tokens {
  id string [primary key, note: 'uuidv7']
  name string [not null, note: 'identifier for backoffice']
  description string [note: 'small description for backoffice']
  token string [not null, note: 'uuidv7']
  type string [not null, note: 'user | admin']
  max_requests integer [not null, default: 100, note:'max requests per minute']
  created_at timestamp
  last_used_at timestamp
}

This token table will replace the current admin token hardcoded in config.
Maybe it will need a new process to check if the max was exceeded.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions