[PR #5116] [CLOSED] Remove duplicate audience length check #27139

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5116
Author: @braginini
Created: 1/16/2026
Status: Closed

Base: mainHead: fix/browser-ssh-audience-valiudation


📝 Commits (5)

  • 7b59b41 Fix SSH server audience validator
  • 9b2038b Fix tests
  • 68d77fc Fall back to the deprecated field if connecting to an old mgmt server
  • 977166c Add more logging and fix potential out of bounds
  • d9b76b4 Remove duplicate audiences check

📊 Changes

8 files changed (+560 additions, -370 deletions)

View changed files

📝 client/internal/engine_ssh.go (+8 -1)
📝 client/ssh/proxy/proxy_test.go (+1 -1)
📝 client/ssh/server/jwt_test.go (+109 -4)
📝 client/ssh/server/server.go (+9 -6)
📝 management/internals/shared/grpc/conversion.go (+7 -0)
📝 management/internals/shared/grpc/conversion_test.go (+51 -0)
📝 shared/management/proto/management.pb.go (+370 -357)
📝 shared/management/proto/management.proto (+5 -1)

📄 Description

Describe your changes

Stack

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features

    • JWT authentication now supports multiple audiences for enhanced flexibility in token validation configuration
  • Tests

    • Added comprehensive test coverage for multi-audience JWT validation scenarios, including acceptance and rejection cases

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 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/5116 **Author:** [@braginini](https://github.com/braginini) **Created:** 1/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/browser-ssh-audience-valiudation` --- ### 📝 Commits (5) - [`7b59b41`](https://github.com/netbirdio/netbird/commit/7b59b4107bf4991b6bc0095552b28e1a13479d3e) Fix SSH server audience validator - [`9b2038b`](https://github.com/netbirdio/netbird/commit/9b2038b06aa184f6dc81188d5cd667a913421f11) Fix tests - [`68d77fc`](https://github.com/netbirdio/netbird/commit/68d77fc935e17b239c296449233239b50c300908) Fall back to the deprecated field if connecting to an old mgmt server - [`977166c`](https://github.com/netbirdio/netbird/commit/977166cae0db914ca023ec9a639199aaf6161f9c) Add more logging and fix potential out of bounds - [`d9b76b4`](https://github.com/netbirdio/netbird/commit/d9b76b454e44ad9c5c42cbf9ae1abaa7f6b7da25) Remove duplicate audiences check ### 📊 Changes **8 files changed** (+560 additions, -370 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/engine_ssh.go` (+8 -1) 📝 `client/ssh/proxy/proxy_test.go` (+1 -1) 📝 `client/ssh/server/jwt_test.go` (+109 -4) 📝 `client/ssh/server/server.go` (+9 -6) 📝 `management/internals/shared/grpc/conversion.go` (+7 -0) 📝 `management/internals/shared/grpc/conversion_test.go` (+51 -0) 📝 `shared/management/proto/management.pb.go` (+370 -357) 📝 `shared/management/proto/management.proto` (+5 -1) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * JWT authentication now supports multiple audiences for enhanced flexibility in token validation configuration * **Tests** * Added comprehensive test coverage for multi-audience JWT validation scenarios, including acceptance and rejection cases <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 07:08:15 -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#27139