[PR #725] [MERGED] Adding Personal Access Token generation #15356

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/725
Author: @pascal-fischer
Created: 3/6/2023
Status: Merged
Merged: 3/16/2023
Merged by: @pascal-fischer

Base: mainHead: feature/add_PAT_generation


📝 Commits (10+)

  • 69be2a8 add generating token (only frame for now, actual token is only dummy)
  • e0fc779 add id to the PAT
  • b3f339c improved code for token checksum calc
  • 2f2d45d updated PAT struct to only use user id instead of user
  • 95d8738 fixed some namings
  • bcac5f7 fixed some namings
  • cb8abac extend User Copy function
  • ed470d7 add comments for exported functions
  • 83e7e30 store hashedToken as string
  • 2b1965c switch secret generation to use lib

📊 Changes

6 files changed (+135 additions, -5 deletions)

View changed files

📝 go.mod (+3 -0)
📝 go.sum (+6 -0)
📝 management/server/account_test.go (+13 -1)
management/server/personal_access_token.go (+63 -0)
management/server/personal_access_token_test.go (+40 -0)
📝 management/server/user.go (+10 -4)

📄 Description

Describe your changes

Adding backend structs and logic to generate PATs for later usage within the service.

This PR is part of a set of PRs to fully support this feature.

https://github.com/netbirdio/netbird/issues/718

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/725 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 3/6/2023 **Status:** ✅ Merged **Merged:** 3/16/2023 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `feature/add_PAT_generation` --- ### 📝 Commits (10+) - [`69be2a8`](https://github.com/netbirdio/netbird/commit/69be2a8071e979f5b9815fe12bcd9a122ce43a13) add generating token (only frame for now, actual token is only dummy) - [`e0fc779`](https://github.com/netbirdio/netbird/commit/e0fc779f58db71e5ad82f28f173732716d69c6df) add id to the PAT - [`b3f339c`](https://github.com/netbirdio/netbird/commit/b3f339c753b4b41dd58b61ce26ab38e43da3fea5) improved code for token checksum calc - [`2f2d45d`](https://github.com/netbirdio/netbird/commit/2f2d45de9e11f1bab7dae02eec97ec05b46076af) updated PAT struct to only use user id instead of user - [`95d8738`](https://github.com/netbirdio/netbird/commit/95d87384ab941b69a29e733da30c07766f7dae73) fixed some namings - [`bcac5f7`](https://github.com/netbirdio/netbird/commit/bcac5f7b327c382fce382e49ae82af4f9753198d) fixed some namings - [`cb8abac`](https://github.com/netbirdio/netbird/commit/cb8abacadd198bc6e2d498b2ed3aa7576db40934) extend User Copy function - [`ed470d7`](https://github.com/netbirdio/netbird/commit/ed470d7dbeec1393b3ce4f67b387dd514d2b336a) add comments for exported functions - [`83e7e30`](https://github.com/netbirdio/netbird/commit/83e7e30218521553fb0cc8978f1abdb6db253baf) store hashedToken as string - [`2b1965c`](https://github.com/netbirdio/netbird/commit/2b1965c9416c04a22e6cc7e7d5d72236d48e2be1) switch secret generation to use lib ### 📊 Changes **6 files changed** (+135 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+3 -0) 📝 `go.sum` (+6 -0) 📝 `management/server/account_test.go` (+13 -1) ➕ `management/server/personal_access_token.go` (+63 -0) ➕ `management/server/personal_access_token_test.go` (+40 -0) 📝 `management/server/user.go` (+10 -4) </details> ### 📄 Description ## Describe your changes Adding backend structs and logic to generate PATs for later usage within the service. This PR is part of a set of PRs to fully support this feature. ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/718 ### Checklist - [ ] 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 03:07:28 -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#15356