duplicate-cn ineffective when combined with override-username in SSO/OAuth2 scenarios
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- c
- 領域
- networking, security
調査の方向性
duplicate-cn チェックと、override-username によって CN が変更されるクライアント認証パスを追跡し、issue で言及されている management-interface の処理も含めます。まず、どの遅延チェック、再評価、または client-kill の動作が OpenVPN core に適合するかを判断します。完了の条件は、最終的なユーザー名が判明した後に duplicate-cn がアクティブなセッションを 1 つに確実に制限することです。
索引モデルが issue の本文から書いたものです。
説明
Problem
When OpenVPN is used with OAuth2/SSO authentication (e.g., via openvpn-auth-oauth2), the duplicate-cn option becomes ineffective. Here's why:
The .ovpn config is shared across all users and contains an inline auth-user-pass block with a placeholder username — this is the recommended approach per OpenVPN documentation for SSO scenarios (see --auth-user-pass in client-options.rst):
<auth-user-pass>
username
no_password
</auth-user-pass>
Since all users share the same placeholder credentials:
- Every client connects with
CN=username(the placeholder) duplicate-cncheck runs at connect time — seesCN=username, allows the connection (it's the same CN after all)- The plugin then sends
client-authwithoverride-username: true, changing CN to the real user (e.g.alice) - But by now
duplicate-cnhas already done its check and has no effect
Result: the same user can have multiple active OpenVPN sessions simultaneously (from different devices), with no built-in mechanism to prevent it.
Why this matters
- Orphaned sessions accumulate, consuming server resources
- No security enforcement of "one session per user"
- The workaround (
duplicate-cn) exists in OpenVPN but is broken in SSO flows by design, since the real identity is only known after authentication completes
Suggested options for OpenVPN core
- Deferred duplicate check — run
duplicate-cncheck afterclient-auth/override-usernamehas set the final CN, not at connect time client-killon duplicate CN — when a new connection completes with a real CN that already has an active session, automaticallyclient-killthe old oneduplicate-cnre-evaluation — when CN changes via management interface (client-authwith override), re-evaluate the duplicate-cn constraint
Related
- 主要言語
- C
- スター
- 14.8k
- フォーク
- 3.4k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenVPN/openvpn のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
-
CVE-2026-11604 vs OpenVPN 2.7.x Documentation再び着手できるかも @lstipakov が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンDCO website Windows
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Document Real Address format change in management/status output (OpenVPN 2.7)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdocumentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Since 2.7.9 "route-method exe" can't set route対応中かも @d12fk が 1 日前に担当しました。 オープンoutdated code Windows
-
enhancement feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
OpenVPN/openvpn の issue をすべて見る
似ている issue
-
issue: bug report
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Stellarium/stellarium#5197 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ChupathingyCE/chupathingyce#1550 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] SWAPDB sends no invalidation to CLIENT TRACKING clients対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
redis/redis#16302 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信