Windows Virtual Desktop #85 プロキシ利用のガイドライン

Microsoft Docs に Proxy server guidelines for Windows Virtual Desktop (Windows Virtual Desktop におけるプロキシサーバのガイドライン)が公開されたのでその内容の紹介です。 Windows Virtual Desktop の Infrastructure (コントロールプレーンなど)、セッションホスト、クライアントの3つについてプロキシ利用に関するガイドラインとなっています。

企業のネットワークではプロキシ(昔ながらのキャッシュというよりは Web フィルタやマルウェア対策、情報漏洩対策などが現在の主たる用途)を利用していないケースはほとんどないと考えます。また、SSL 通信をスキャンするセキュリティ装置との相性などこれまで現場でわかっていた問題などもこのドキュメントでは言及されています。そして結論を先に言えば Windows Virtual desktop 環境ではプロキシを利用しないことが推奨されるということで、プロキシを利用しなければいけない場合の制限、留意事項を知るという点で必読のドキュメントとなっています。

ドキュメントの場所と目次

ドキュメントは Microsoft Docs で公開されています。URL はこちら。 Reference > Proxy support guidelines です。 2021/4/30 時点で英語のみのようです。

目次は以下。

  1. What are proxy servers? (プロキシとは何ですか?)
  2. Bypassing a proxy server (プロキシを経由しない構成)
  3. Recommendations for using proxy servers (プロキシ利用時の推奨事項)
  4. Session host configuration recommendations (セッションホストの推奨構成)
  5. Client-side proxy support (クライアントサイドのプロキシサポート)
  6. Support limitations (サポートに関する制限)

ここからは6つの章のポイントをまとめて紹介していきます。

What are proxy servers?

最初の一文が以下となっていて、Windows Virtual Desktop 環境ではプロキシをバイパスすることを推奨するとのこと。   What are proxy servers? とありますが、この章ではプロキシサーバを利用する弊害が4点説明されています(というかその話だけ)。

We recommend bypassing proxies for Windows Virtual Desktop traffic.

理由は複数あり、1つ目に Windows Virtual Desktop の通信が暗号化されており、プロキシ(キャッシュ/Webフィルタ/マルウェア対策/情報漏洩対策などの機能)が意味を為さないためです。

Proxies don’t make Windows Virtual Desktop more secure because the traffic is already encrypted. To learn more about connection security, see Connection security.

2つ目の理由はほとんどのプロキシは WebSocket に対応しない(最適化されていない)こと。

Most proxy servers aren’t designed for supporting long running WebSocket connections and may affect connection stability. Proxy server scalability also causes issues because Windows Virtual Desktop uses multiple long-term connections. If you do use proxy servers, they must be the right size to run these connections.

3つ目の理由は Azure 上の仮想の Windows 10 とプロキシサーバの地理的な距離です。 例えば、元々あるオンプレミスのプロキシを利用するとなるとその Latency を考慮する必要が出てきます。 Latency がよろしくないと最近利用が激増している Web 会議や音声通信の利用に支障がでることもあります。

If the proxy server’s geography is far from the host, then this distance will cause more latency in your user connections. More latency means slower connection time and worse user experience, especially in scenarios that need graphics, audio, or low-latency interactions with input devices. If you must use a proxy server, keep in mind that you need to place the server in the same geography as the Windows Virtual Desktop Agent and client.

4つ目の理由は、プロキシを経由すると RDP over TCP しか利用出来ず、RDP over UDP で得られる画質や応答性を得られないこと。

If you configure your proxy server as the only path for Windows Virtual Desktop traffic to take, the Remote Desktop Protocol (RDP) data will be forced over Transmission Control Protocol (TCP) instead of User Datagram Protocol (UDP). This move lowers the visual quality and responsiveness of the remote connection.

Bypassing a proxy server

すでにプロキシが存在するネットワーク環境では、Windows Virutal Desktop についてはプロキシをバイパスしようという話です。

If your organization’s network and security policies require proxy servers for web traffic, you can configure your environment to bypass Windows Virtual Desktop connections while still routing the traffic through the proxy server. However, each organization’s policies are unique, so some methods may work better for your deployment than others. Here are some configuration methods you can try to prevent performance and reliability loss in your environment:

とは言え、元々何らかの目的があってプロキシが存在するわけで、バイパスする場合は目的を達成する代替の手段が必要となります。 また、バイパスする手段も必要です。 その点も簡単に紹介されています(以下の5点)。

  1. Azure service tags on the Azure firewall
  2. Proxy server bypass using Proxy Auto Configuration (.PAC) files
  3. Bypass list in the local proxy configuration
  4. Using proxy servers for per-user configuration
  5. Using RDP shortpath for the RDP connection while keeping the service traffic over the proxy

1つ目は Azure Firewall でアクセス制限(主に Destination でしょうが)しようという話。 ただ、Web フィルタリングのデータベースは持っていないので静的なURLを追加する必要がありますし、ワイルドカードの用法など万能ではない部分もあるのでそれほど有効なソリューションでは無いなぁというのが私の感想。

2つ目はプロキシを除外する方法として PAC を利用する話。これは PAC ファイルのメンテナンスを誰がいつやるかだけが検討課題になります。 マイクロソフトさんが PAC ファイルを提供する Web サーバを提供してくれるのがベストソリューションなのだと思います。

3つ目は Windows Virtual desktop の仮想の Windows 10 や 物理端末のOSやブラウザ側でプロキシの除外リストを利用する話。 グループポリシーでも Intune でも Chrome の管理ツールでもやり方は沢山あります。 PAC 同様にリストの維持(最新のIPアドレスリストの入手)が検討課題です。

4つ目は各ユーザ設定毎にプロキシを利用する対応。 これはどういう実現方法となるのかイメージ出来ません。3つ目に書いた仮想のWindows 10 や物理端末側の設定の話がこっちで、3つ目はプロキシサーバ側の話なのかもです(プロキシは経由するがキャッシュや Webフィルタなどプロキシの機能はOFFにする、など)。

5つ目はまだプレビューですが RDP shortpath を利用する解決策です。 これが一番有望な解決策とは考えています。

Recommendations for using proxy servers

この章ではどうしてもプロキシを利用しなければいけない場合の推奨事項、留意事項が以下の7点説明されています。

  1. Use proxy servers in the same Azure geography
  2. Use RDP shortpath for desktop connectivity
  3. Don’t use SSL termination on the proxy server
  4. Don’t use proxy servers that need authentication
  5. Plan for the proxy server network capacity
  6. Proxy servers for Windows 7 session hosts
  7. Proxy servers and Teams optimization

3つ目の SSL termination は使うな!はまさにその通りですよね。 大量の画面転送通信が SSL として流れる中、それを毎回復号して中身スキャンして再度暗号化など行っていたらユーザサイドには応答性の悪化というデメリットが出てきます。 管理者視点でもプロキシサーバの性能問題に頭を抱えることになるのではと思います。 SSL termination を使わない場合でも小さいパケットの連続転送が数百人、数千人分発生する画面転送通信はプロキシ泣かせです。これに SSL の複合/暗号が加わったら超高性能なプロキシサーバを何台も何十台も準備する、すなわち大きなコストアップになるのではないかと考えます。  プロキシ側で利用サイトに応じて SSL termination をOFFにするのが解決策となりますがプロキシの実装によってうまく設定出来ないケースもあるので Windows Virtual Desktop で OFF に出来るか事前検証は必須になると思います。 透過型なプロキシがすでに存在するネットワークではほんと悩ましい話ですね。

4つ目は認証プロキシは使うな!という話。 除外するしかないです。

5つ目はプロキシサーバのキャパシティ設計を見直そうという話。 先にも書いたのですが、画面転送通信は通常のWeb閲覧とは通信特性が全く異なります。 小さなパケットを絶え間なく連続転送し続けます。それも利用者数分同時にです。 例えば1000人が常時ショートパケットを転送し続けるとどれくらいのプロキシが必要となるか想像が出来ますか? Web閲覧であればこれまでの傾向など蓄積されたノウハウがありますがその知見が使えないということでもあります。 まあ、Windows Virtual Desktop に限らずこの話はオンプレミスの VDI の時からあった話ではあるのでプロキシを扱うメーカさんや代理店さんに聞いてみるとよいと思います。

7つ目は Teams 最適化はプロキシ環境では利用出来ないとのこと。 最適化通信の仕様上仕方が無いですが、残念な制限です。

Session host configuration recommendations

この章ではセッションホストでのプロキシ構成の推奨が説明されています。 結論として、プロキシ設定はブラウザじゃなくシステムワイド(OS全般)に設定しよう、ということがあります。その方法として4つの具体的な方式も紹介されています。

  1. WPADに対応
  2. PACに対応
  3. Network Proxy CSPに対応
  4. bitsadminコマンドで設定することも可能

Client-side proxy support

この章では物理端末とクライアントサイドの設定の推奨が説明されています。

  1. Network Proxy CSPに対応
  2. Windows 7 はプロキシ未対応

また、プロキシをサポートしないOSもあります。 Android / iOS / macOS です。

Client nameProxy server support
Windows DesktopYes
Web clientYes
AndroidNo
iOSNo
macOSNo
Windows StoreYes

Support limitations

プロキシは様々なベンダーから色々提供されている、なのでマイクロソフトとしてもすべての構成をサポートすることは難しい、その点でもバイパスをお勧めするよ、とのことです。

There are many third-party services and applications that act as a proxy server. These third-party services include distributed next-gen firewalls, web security systems, and basic proxy servers. We can’t guarantee that every configuration is compatible with Windows Virtual Desktop. Microsoft only provides limited support for connections established over a proxy server. If you’re experiencing connectivity issues while using a proxy server, Microsoft support recommends you configure a proxy bypass and then try to reproduce the issue.

以上