[PR #803] [MERGED] api: implement support for api keys #8666

Closed
opened 2026-04-21 20:40:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/imputnet/cobalt/pull/803
Author: @dumbmoron
Created: 10/4/2024
Status: Merged
Merged: 10/5/2024
Merged by: @dumbmoron

Base: developHead: api-keys


📝 Commits (10+)

  • 741dfd4 api/security: implement api keys as method of authentication
  • 44f7e4f web: remove TURNSTILE_KEY env from readme
  • 034f7eb api/core: extract rate limit response to function
  • f2248d4 api/core: move api limiter after authentication
  • 38fcee4 api/core: rename tunnel limiter, move to endpoint
  • 418602c api/core: add rate limiter for session
  • dcd3380 api/core: generate JWT rate limiting key in auth handler
  • 81818f8 api/core: implement authentication with api keys
  • 3d7713a security/api-keys: clarify error when number is not positive
  • 9cc6fd1 api/core: skip turnstile verification if user authed with api key

📊 Changes

9 files changed (+346 additions, -31 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 api/package.json (+1 -1)
📝 api/src/config.js (+5 -0)
📝 api/src/core/api.js (+63 -26)
📝 api/src/misc/console-text.js (+7 -0)
api/src/security/api-keys.js (+205 -0)
📝 docs/run-an-instance.md (+54 -0)
📝 pnpm-lock.yaml (+10 -3)
📝 web/README.md (+0 -1)

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/imputnet/cobalt/pull/803 **Author:** [@dumbmoron](https://github.com/dumbmoron) **Created:** 10/4/2024 **Status:** ✅ Merged **Merged:** 10/5/2024 **Merged by:** [@dumbmoron](https://github.com/dumbmoron) **Base:** `develop` ← **Head:** `api-keys` --- ### 📝 Commits (10+) - [`741dfd4`](https://github.com/imputnet/cobalt/commit/741dfd40f5d6a076c3598ffcdd52e7071faac3d5) api/security: implement api keys as method of authentication - [`44f7e4f`](https://github.com/imputnet/cobalt/commit/44f7e4f76ce587558b15b674c5666d6f6d8ca6be) web: remove `TURNSTILE_KEY` env from readme - [`034f7eb`](https://github.com/imputnet/cobalt/commit/034f7ebe4a23c63d2d44eec90fe7d674c8c0eeb7) api/core: extract rate limit response to function - [`f2248d4`](https://github.com/imputnet/cobalt/commit/f2248d4e9a84d429c4741f0243fd97ab6a7c215d) api/core: move api limiter after authentication - [`38fcee4`](https://github.com/imputnet/cobalt/commit/38fcee4a506ac548ced88b1d652a396637994d39) api/core: rename tunnel limiter, move to endpoint - [`418602c`](https://github.com/imputnet/cobalt/commit/418602ca87d9a9e42b63162a9a5b1d14fa41d8d0) api/core: add rate limiter for session - [`dcd3380`](https://github.com/imputnet/cobalt/commit/dcd33803c185045b8a743a3b1125457e5cfe955c) api/core: generate JWT rate limiting key in auth handler - [`81818f8`](https://github.com/imputnet/cobalt/commit/81818f874148dc922dd583a1ba0ae295f4801201) api/core: implement authentication with api keys - [`3d7713a`](https://github.com/imputnet/cobalt/commit/3d7713a9426140e9f0f0ab55d6247975d18ef7c4) security/api-keys: clarify error when number is not positive - [`9cc6fd1`](https://github.com/imputnet/cobalt/commit/9cc6fd13fa05eb9eacc0901087e3561100a87496) api/core: skip turnstile verification if user authed with api key ### 📊 Changes **9 files changed** (+346 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `api/package.json` (+1 -1) 📝 `api/src/config.js` (+5 -0) 📝 `api/src/core/api.js` (+63 -26) 📝 `api/src/misc/console-text.js` (+7 -0) ➕ `api/src/security/api-keys.js` (+205 -0) 📝 `docs/run-an-instance.md` (+54 -0) 📝 `pnpm-lock.yaml` (+10 -3) 📝 `web/README.md` (+0 -1) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-21 20:40:52 -05:00
Sign in to join this conversation.