Kerberos credential delegation: allowDelegation() and CLI --allow-delegate (winrs -allowdelegate)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- java
調査の方向性
まず既存の KerberosAuthScheme と client builder の検証を読み、次に CLI オプションの解析と Authentication および CLI のマニュアルページを追跡します。単体テストで委任設定と Kerberos 以外の認証の拒否を確認し、文書化された前提条件を満たしたうえで、内部 AD ホストに対する実環境での検証を完了します。
索引モデルが issue の本文から書いたものです。
説明
winrs parity:
-a[llow]d[elegate]— let the remote shell use the user's credentials to reach a further hop (a share on a third machine, a database, ...). Without delegation, anything the remote command does with the user's identity over the network fails with access denied (the classic double-hop problem).
Context
winrs implements this with CredSSP or Kerberos delegation. For this client:
- Kerberos (in scope): the JDK GSS-API supports delegation natively —
GSSContext.requestCredDeleg(true)on the contextKerberosAuthSchemealready creates. The TGT must be forwardable (forwardable = trueinkrb5.conf, or a forwardable ticket in the ticket cache), and the target service must be trusted for delegation in AD (OK-AS-DELEGATE; for constrained delegation the KDC decides). All pure JDK, zero new dependencies. - CredSSP (out of scope): NTLM-based delegation requires implementing CredSSP (TLS channel + SPNEGO inside TSRequest ASN.1 structures + credential submission). That is a whole new authentication protocol and a significant security surface; explicitly not part of this issue — file separately if ever needed.
Proposed API
try (WinRMClient client = WinRMClient.builder("server.example.net")
.https()
.authentication(AuthScheme.KERBEROS)
.allowDelegation() // connection-scoped, Kerberos only
.credentials("DOMAIN\user", password)
.build()) {
client.command("dir \\fileserver\share").execute();
}
- Builder-level (delegation is a property of the authentication, not of one command).
build()rejectsallowDelegation()when Kerberos is not among the requested schemes — silently ignoring it would give a false sense of security posture.- When the KDC does not grant a forwardable/delegable ticket, GSS reports it — surface a clear message (this is the number-one support question with delegation).
CLI
winrm-java -h server -u 'DOMAIN\user' -pf pw.txt \
--https --kerberos --allow-delegate \
exec 'dir \fileserver\share'
Usage error when --allow-delegate is given without --kerberos.
Acceptance criteria
requestCredDeleg(true)set on the GSS context iff delegation was requested; unit-testable at theKerberosAuthSchemelevel.- Configuration rejections (NTLM-only + delegation) at
build()/ CLI parse time with actionable messages. - Live validation against a real AD host with
OK-AS-DELEGATE(see the internal test host) — the FakeWsmanServer speaks NTLM only, so delegation is covered by unit + live tests. - Documented on the Authentication page (including the krb5.conf
forwardableand AD trust prerequisites) and in the CLI manual.
🤖 Generated with Claude Code
- 主要言語
- Java
- スター
- 11
- フォーク
- 4
- 平均マージ
- 5日 5時間
- マージ済み PR(30日)
- 6
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MetricsHub/winrm-java のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
MetricsHub/winrm-java#148 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
MetricsHub/winrm-java#147 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
MetricsHub/winrm-java#146 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
MetricsHub/winrm-java#145 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
MetricsHub/winrm-java#139 ·
MetricsHub/winrm-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
infinispan/infinispan#18150 ·
-
area/frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
opensearch-project/k-NN#3597 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100