[PR #1905] [CLOSED] add mTLS client cert support for the PKCE idp provider #16012

Open
opened 2026-08-05 03:08:48 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1905
Author: @Foosec
Created: 4/29/2024
Status: Closed

Base: mainHead: idp-mtls


📝 Commits (10+)

  • 0386145 Add support for mTLS certificates on the IDP provider
  • dab29b1 Remove config change code, resulted in empty entries
  • e6f6cc6 Merge branch 'main' into idp-mtls
  • 3eb8f61 Ignore mTLS argument in GetPKCEAuthorizationInfo on android and IOS
  • 691b770 Remove testing code, replace with config values
  • a015c06 Moved cert parsing code into UpdateConfig function, ReadConfig seems to only be called on iOS and Android
  • 50b220a Cleaned up logging code
  • e4378d2 Add support for mTLS certificates on the IDP provider
  • 981df7f Remove config change code, resulted in empty entries
  • 128c353 Ignore mTLS argument in GetPKCEAuthorizationInfo on android and IOS

📊 Changes

6 files changed (+51 additions, -6 deletions)

View changed files

📝 client/android/login.go (+1 -1)
📝 client/internal/auth/oauth.go (+1 -1)
📝 client/internal/auth/pkce_flow.go (+15 -0)
📝 client/internal/config.go (+28 -2)
📝 client/internal/pkce_auth.go (+5 -1)
📝 client/ios/NetBirdSDK/login.go (+1 -1)

📄 Description

Describe your changes

Added configuration options to support working with an IDP provider that has mTLS enabled.
A working example is Authentik hosted behind a mTLS nginx reverse proxy, it adds security and helps mitigate 0-days on
.

I would appreciate the addition of this feature, and perhaps expanding on it to allow netbirds own APIs to be hosted
behind a mTLS proxy.

Not being familiar with the codebase, i hope i added it to the best location for this.

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

🔄 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/1905 **Author:** [@Foosec](https://github.com/Foosec) **Created:** 4/29/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `idp-mtls` --- ### 📝 Commits (10+) - [`0386145`](https://github.com/netbirdio/netbird/commit/038614580fec9b5a265ff60d10cc9db216a73349) Add support for mTLS certificates on the IDP provider - [`dab29b1`](https://github.com/netbirdio/netbird/commit/dab29b150726c115af5114cbb1424bd9c41e4838) Remove config change code, resulted in empty entries - [`e6f6cc6`](https://github.com/netbirdio/netbird/commit/e6f6cc6333c51c6cca3af3f959275cd359f7a7b2) Merge branch 'main' into idp-mtls - [`3eb8f61`](https://github.com/netbirdio/netbird/commit/3eb8f61e0ca21678caa6682a1bbac00f9d9d63a6) Ignore mTLS argument in GetPKCEAuthorizationInfo on android and IOS - [`691b770`](https://github.com/netbirdio/netbird/commit/691b77027ae4bf1582ec68248b2ae24508300bba) Remove testing code, replace with config values - [`a015c06`](https://github.com/netbirdio/netbird/commit/a015c06154c1cbbcfe256405ccaadcf1c323b5e1) Moved cert parsing code into UpdateConfig function, ReadConfig seems to only be called on iOS and Android - [`50b220a`](https://github.com/netbirdio/netbird/commit/50b220af66a73d9ab508bf25660be7f7275c77da) Cleaned up logging code - [`e4378d2`](https://github.com/netbirdio/netbird/commit/e4378d233ba43618d4d225d2fc81e33718ff009c) Add support for mTLS certificates on the IDP provider - [`981df7f`](https://github.com/netbirdio/netbird/commit/981df7fdea6b94fd3c973385268421382716aaa5) Remove config change code, resulted in empty entries - [`128c353`](https://github.com/netbirdio/netbird/commit/128c353ebbf3a782bb9f395e77be81e669df4ce2) Ignore mTLS argument in GetPKCEAuthorizationInfo on android and IOS ### 📊 Changes **6 files changed** (+51 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `client/android/login.go` (+1 -1) 📝 `client/internal/auth/oauth.go` (+1 -1) 📝 `client/internal/auth/pkce_flow.go` (+15 -0) 📝 `client/internal/config.go` (+28 -2) 📝 `client/internal/pkce_auth.go` (+5 -1) 📝 `client/ios/NetBirdSDK/login.go` (+1 -1) </details> ### 📄 Description ## Describe your changes Added configuration options to support working with an IDP provider that has mTLS enabled. A working example is Authentik hosted behind a mTLS nginx reverse proxy, it adds security and helps mitigate 0-days on <insert idp>. I would appreciate the addition of this feature, and perhaps expanding on it to allow netbirds own APIs to be hosted behind a mTLS proxy. Not being familiar with the codebase, i hope i added it to the best location for this. ### 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:08:48 -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#16012