mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-07-16 05:54:01 +03:00
[PR #1088] [MERGED] feat!: drop support for storing JWK on the filesystem #1044
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/pocket-id/pocket-id/pull/1088
Author: @stonith404
Created: 11/11/2025
Status: ✅ Merged
Merged: 11/14/2025
Merged by: @stonith404
Base:
breaking/v2← Head:feat/drop-fs-keys-support📝 Commits (7)
63432aefeat!: drop support for storing JWK on the filesystem410cfa3addENCRYPTION_KEYto.enva82fd7evalidateEncryptionKey7d13699fix unit tests49fc824addENCRYPTION_KEY_FILEreference to.env.example9ff8233Merge branch 'breaking/v2' into feat/drop-fs-keys-supportb205536set encrpytion key on every test env📊 Changes
13 files changed (+243 additions, -1315 deletions)
View changed files
📝
.env.example(+12 -0)📝
backend/cmd/main.go(+7 -0)📝
backend/internal/cmds/key_rotate_test.go(+1 -67)📝
backend/internal/common/env_config.go(+6 -27)📝
backend/internal/common/env_config_test.go(+39 -80)📝
backend/internal/service/jwt_service.go(+2 -10)📝
backend/internal/service/jwt_service_test.go(+171 -597)📝
backend/internal/service/oidc_service_test.go(+1 -0)📝
backend/internal/utils/jwk/key_provider.go(+2 -10)➖
backend/internal/utils/jwk/key_provider_file.go(+0 -202)➖
backend/internal/utils/jwk/key_provider_file_test.go(+0 -320)📝
tests/setup/docker-compose-s3.yml(+0 -1)📝
tests/setup/docker-compose.yml(+2 -1)📄 Description
This PR drops the support for storing the JWK on the filesystem, the JWK private key will now be stored in the database. There isn't really an advantage of storing them on the disk and keeping it supported adds unnecessary complicated logic to the import/export feature in #998.
This change removes the
KEYS_PATHandKEYS_STORAGEenvironment variables.There are two breaking changes:
ENCRYPTION_KEYenvironment variable is now mandatory and must be at least 16 bytes long.RS256was used, the key needs to be regenerated again withpocket-id key-rotate -a <algo>Note: This PR gets merged into the
breaking/v2branch where all breaking changes will get collected.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.