Skip to content

feat: generate jwt tokens from signing key #3969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Aug 1, 2025

What kind of change does this PR introduce?

feature

What is the new behavior?

  • Generates local anon and service role keys from signing key.
  • Refactors JWT struct in preparation for updating signing keys with config push.

Additional context

TODO:

  • handle multiple standby keys

@sweatybridge sweatybridge requested a review from a team as a code owner August 1, 2025 17:29
@coveralls
Copy link

coveralls commented Aug 1, 2025

Pull Request Test Coverage Report for Build 16906932911

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 11 of 13 (84.62%) changed or added relevant lines in 1 file are covered.
  • 272 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-0.5%) to 54.799%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/gen/signingkeys/signingkeys.go 11 13 84.62%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
internal/branches/list/list.go 7 0.0%
internal/db/diff/pgschema.go 12 0.0%
internal/db/diff/diff.go 18 69.34%
cmd/root.go 21 0.0%
internal/branches/get/get.go 22 0.0%
internal/start/start.go 26 64.83%
internal/db/diff/migra.go 28 53.33%
internal/utils/flags/db_url.go 28 61.49%
internal/bootstrap/bootstrap.go 49 29.18%
Totals Coverage Status
Change from base Build 16677900504: -0.5%
Covered Lines: 6201
Relevant Lines: 11316

💛 - Coveralls

@hf
Copy link
Contributor

hf commented Aug 4, 2025

Pushing a signing key is OK but it should come with a huge warning that the security of the key relies on the security of the device and person making the push.

@sweatybridge sweatybridge changed the title feat: push signing keys to remote feat: generate jwt tokens from signing key Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants