[PR #808] [MERGED] Add support for refreshing signing keys on expiry #13027

Closed
opened 2026-08-05 02:07:16 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/808
Author: @bcmmbaga
Created: 4/14/2023
Status: Merged
Merged: 5/2/2023
Merged by: @pascal-fischer

Base: mainHead: main


📝 Commits (7)

  • c6190fa add use-key-cache-headers flag to management command
  • a89808e initialize jwt validator with keys rotation state
  • 9f352c1 validate keys for idp's with key rotation mechanism
  • 53d78ad make variable unexported
  • f7196cd refactoring
  • 90c8cfd synchronize access to the signing keys
  • 45224e7 fallback to olde keys if failing to fetch refreshed keys

📊 Changes

5 files changed (+73 additions, -10 deletions)

View changed files

📝 management/cmd/management.go (+2 -0)
📝 management/cmd/root.go (+9 -7)
📝 management/server/config.go (+2 -0)
📝 management/server/grpcserver.go (+3 -1)
📝 management/server/jwtclaims/jwtValidator.go (+57 -2)

📄 Description

Describe your changes

Introduces a new flag --idp-sign-key-refresh-enabled that enables the Cache-Control header to be checked when fetching signing keys to determine the rotation period for signing keys. This feature will automatically refresh the signing key upon its expiry.

  • Add support for rotating signing keys on expiry (#806)

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/808 **Author:** [@bcmmbaga](https://github.com/bcmmbaga) **Created:** 4/14/2023 **Status:** ✅ Merged **Merged:** 5/2/2023 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`c6190fa`](https://github.com/netbirdio/netbird/commit/c6190fa2bac2f27e0628138925ce0bb15eddbf3b) add use-key-cache-headers flag to management command - [`a89808e`](https://github.com/netbirdio/netbird/commit/a89808ecae38969c6452bdd586b531d6b4d87551) initialize jwt validator with keys rotation state - [`9f352c1`](https://github.com/netbirdio/netbird/commit/9f352c1b7e3c771495a767375af9f5ba1dfd4d62) validate keys for idp's with key rotation mechanism - [`53d78ad`](https://github.com/netbirdio/netbird/commit/53d78ad98260d0754bbd8debf22415044d084cf6) make variable unexported - [`f7196cd`](https://github.com/netbirdio/netbird/commit/f7196cd9a57506bc58a49c823e3f41636bb16947) refactoring - [`90c8cfd`](https://github.com/netbirdio/netbird/commit/90c8cfd8633bceef0434673718de5f41b1635ad9) synchronize access to the signing keys - [`45224e7`](https://github.com/netbirdio/netbird/commit/45224e76d04e1fdff7d96291ed27f08921c8ed42) fallback to olde keys if failing to fetch refreshed keys ### 📊 Changes **5 files changed** (+73 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `management/cmd/management.go` (+2 -0) 📝 `management/cmd/root.go` (+9 -7) 📝 `management/server/config.go` (+2 -0) 📝 `management/server/grpcserver.go` (+3 -1) 📝 `management/server/jwtclaims/jwtValidator.go` (+57 -2) </details> ### 📄 Description ## Describe your changes Introduces a new flag `--idp-sign-key-refresh-enabled` that enables the Cache-Control header to be checked when fetching signing keys to determine the rotation period for signing keys. This feature will automatically refresh the signing key upon its expiry. ## Issue ticket number and link * Add support for rotating signing keys on expiry ([#806][i806]) [i806]: https://github.com/netbirdio/netbird/issues/806 ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:07:16 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#13027