mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
[PR #1254] [MERGED] Add API key authentication #1251
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/plankanban/planka/pull/1254
Author: @JustSamuel
Created: 7/13/2025
Status: ✅ Merged
Merged: 11/6/2025
Merged by: @meltyshev
Base:
master← Head:Feature/api-keys📝 Commits (6)
985354dfeat: apiKey migration09bc059feat: extend is-authenticated.js logic with api key checking080881efeat: add routes for creating, cycling and deleting apiKeysba6544bfeat: implement apikey management frontendf745360chore: Rework2b84980fix: Complete missing translations, cleanup📊 Changes
75 files changed (+1504 additions, -97 deletions)
View changed files
📝
client/src/actions/users.js(+55 -0)📝
client/src/api/users.js(+4 -0)📝
client/src/components/board-memberships/BoardMemberships/ActionsStep.jsx(+1 -1)📝
client/src/components/common/AdministrationModal/SmtpPane.jsx(+5 -5)📝
client/src/components/common/AdministrationModal/UsersPane/ActionsStep.jsx(+47 -25)➕
client/src/components/common/AdministrationModal/UsersPane/ApiKeyStep.jsx(+169 -0)➕
client/src/components/common/AdministrationModal/UsersPane/ApiKeyStep.module.scss(+65 -0)📝
client/src/components/common/AdministrationModal/UsersPane/Item.jsx(+51 -8)📝
client/src/components/common/AdministrationModal/UsersPane/Item.module.scss(+33 -2)📝
client/src/components/common/AdministrationModal/UsersPane/UsersPane.jsx(+6 -11)📝
client/src/components/users/EditUserEmailStep/EditUserEmailStep.jsx(+6 -3)📝
client/src/components/users/EditUserPasswordStep/EditUserPasswordStep.jsx(+8 -7)📝
client/src/components/users/EditUserUsernameStep/EditUserUsernameStep.jsx(+6 -3)📝
client/src/components/users/UserSettingsModal/AccountPane/AccountPane.jsx(+3 -3)📝
client/src/constants/ActionTypes.js(+7 -0)📝
client/src/constants/EntryActionTypes.js(+3 -0)📝
client/src/entry-actions/users.js(+24 -0)📝
client/src/locales/ar-YE/core.js(+17 -0)📝
client/src/locales/bg-BG/core.js(+17 -0)📝
client/src/locales/cs-CZ/core.js(+17 -0)...and 55 more files
📄 Description
This PR adds API key authentication to
plankausing theX-Api-Keyheader.Authentication works by storing a
prefixand hash per user. If provided the API key is checked to see if it matches the stored hash and the user is deemed authenticated.Related
Closes #945
Draft
PR is in draft because this allows for intermediate feedback by any other contributors
The frontend adds a panel to the admin actions:

Which contains an overview of all current apikeys, traceable using their prefix:

A menu allows for creation:

Which updates the modal:

allowing for cycling and deleting:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.