RDCMan 3.23 bug: smart card logon fails after reopening a saved .rdg (works in newly created file)

オープン
#1,028 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
領域
backend

調査の方向性

Start by tracing how RDCMan loads saved .rdg files and applies logon credentials before creating the Remote Desktop ActiveX connection. Compare that path with creating a new file in the same session, using the supplied repro.rdg and RDCMan.settings details as clues. Done means smart card authentication works after reopening the saved file; no source files or tests are identified in the issue.

索引モデルが issue の本文から書いたものです。

説明

Summary

In RDCMan 3.23, smart card (TPM virtual smart card) logons work only in an .rdg file created during the current session. After RDCMan is closed and reopens the same file from disk, smart card logons fail every time. mstsc.exe works with the same card and server every time.

Environment

  • RDCMan 3.23.0.0 (signed by Microsoft, downloaded from Sysinternals)
  • Windows 11 Enterprise 24H2 (10.0.26100), domain-joined
  • mstscax.dll 10.0.26100.8875
  • TPM virtual smart card (Microsoft Base Smart Card Crypto Provider), NLA/CredSSP enabled

Steps to reproduce

  1. Start RDCMan with no RDCMan.settings file (factory defaults).
  2. File > New, then Edit > Add server, then connect.
  3. At the Windows Security prompt: More choices > Smart card > enter PIN.
    Result: connects and logs on successfully.
  4. Close RDCMan (it saves the .rdg and RDCMan.settings), reopen it, and connect to the same server the same way.
    Result: after the PIN is entered, RDCMan immediately shows "Disconnected from [server]".

Observations when it fails

  • When the Windows Credential Prompt appears, it does not display the "Remember Me" checkbox.
  • No events in Microsoft-Windows-TerminalServices-RDPClient/Operational (no 1024 "trying to connect"), so the ActiveX control never starts connecting.
  • No PIN verification events in Microsoft-Windows-SmartCard-Audit/Authentication, so the PIN never reaches the card.
  • No TERMSRV entries in Credential Manager (cmdkey /list).

Already ruled out

  • Reset RDCMan.settings and created a brand-new .rdg with a single server
  • File-level logon credentials set to inherit none with blank username, domain and password
  • Blank default logon credentials in RDCMan.settings, including removing the password elements entirely
  • Server at the top level of the tree vs. nested in groups

Repro files (sanitized)

The .rdg below works when created in-session and fails once reopened. Its contents do not change between the two.

repro.rdg:

<?xml version="1.0" encoding="utf-8"?>
<RDCMan programVersion="3.23" schemaVersion="3">
  <file>
    <credentialsProfiles />
    <properties>
      <expanded>True</expanded>
      <name>repro</name>
    </properties>
    <server>
      <properties>
        <name>server01</name>
      </properties>
    </server>
  </file>
  <connected />
  <favorites />
  <recentlyUsed />
</RDCMan>

RDCMan.settings as saved by RDCMan before the failing reopen (sanitized: user, domain, paths and server names replaced):

<?xml version="1.0" encoding="utf-8"?>
<Settings programVersion="3.23">
  <AutoSaveFiles>False</AutoSaveFiles>
  <AutoSaveInterval>0</AutoSaveInterval>
  <BuiltInGroups>
    <groups>
      <connected>
        <properties>
          <expanded>False</expanded>
          <name />
        </properties>
      </connected>
      <favorites>
        <properties>
          <expanded>False</expanded>
          <name />
        </properties>
      </favorites>
      <recentlyUsed>
        <properties>
          <maxNumberOfServers>10</maxNumberOfServers>
          <expanded>False</expanded>
          <name />
        </properties>
        <server>repro\server01</server>
      </recentlyUsed>
    </groups>
  </BuiltInGroups>
  <ConnectionBarState>Pinned</ConnectionBarState>
  <CredentialsProfiles>
    <credentialsProfiles />
  </CredentialsProfiles>
  <DefaultGroupSettings>
    <defaultSettings>
      <properties>
        <expanded>False</expanded>
        <name />
      </properties>
      <logonCredentials>
        <profileName scope="Local">Custom</profileName>
        <userName />
        <password />
        <domain />
      </logonCredentials>
      <connectionSettings>
        <connectToConsole>False</connectToConsole>
        <startProgram />
        <workingDir />
        <port>3389</port>
        <loadBalanceInfo />
      </connectionSettings>
      <gatewaySettings>
        <enabled>False</enabled>
        <hostName />
        <logonMethod>Any</logonMethod>
        <localBypass>True</localBypass>
        <credSharing>True</credSharing>
        <profileName scope="Local">Custom</profileName>
        <userName />
        <password />
        <domain />
      </gatewaySettings>
      <remoteDesktop>
        <sameSizeAsClientArea>False</sameSizeAsClientArea>
        <fullScreen>True</fullScreen>
        <colorDepth>24</colorDepth>
      </remoteDesktop>
      <localResources>
        <audioRedirection>Client</audioRedirection>
        <audioRedirectionQuality>Dynamic</audioRedirectionQuality>
        <audioCaptureRedirection>DoNotRecord</audioCaptureRedirection>
        <keyboardHook>FullScreenClient</keyboardHook>
        <redirectClipboard>True</redirectClipboard>
        <redirectDrives>False</redirectDrives>
        <redirectDrivesList />
        <redirectPrinters>False</redirectPrinters>
        <redirectPorts>False</redirectPorts>
        <redirectSmartCards>True</redirectSmartCards>
        <redirectPnpDevices>False</redirectPnpDevices>
        <redirectWebAuthn>False</redirectWebAuthn>
        <redirectLocation>False</redirectLocation>
      </localResources>
      <displaySettings>
        <liveThumbnailUpdates>True</liveThumbnailUpdates>
        <allowThumbnailSessionInteraction>False</allowThumbnailSessionInteraction>
        <showDisconnectedThumbnails>True</showDisconnectedThumbnails>
        <thumbnailScale>1</thumbnailScale>
        <smartSizeDockedWindows>None</smartSizeDockedWindows>
        <smartSizeUndockedWindows>None</smartSizeUndockedWindows>
        <dpiScaling>AsHost</dpiScaling>
      </displaySettings>
      <securitySettings>
        <authentication>Warn</authentication>
        <enableCredSspSupport>True</enableCredSspSupport>
        <enableRdsAadAuth>False</enableRdsAadAuth>
        <restrictedAdmin>False</restrictedAdmin>
        <remoteGuard>False</remoteGuard>
      </securitySettings>
      <encryptionSettings>
        <encryptionMethod>LogonCredentials</encryptionMethod>
        <credentialName>DOMAIN\user</credentialName>
        <credentialData />
      </encryptionSettings>
    </defaultSettings>
  </DefaultGroupSettings>
  <DimNodesWhenInactive>False</DimNodesWhenInactive>
  <EnablePanning>False</EnablePanning>
  <FilesToOpen>
    <item>C:\Users\user\Documents\RDCMan\repro.rdg</item>
  </FilesToOpen>
  <FocusOnClick>False</FocusOnClick>
  <FullScreenWindowIsTopMost>False</FullScreenWindowIsTopMost>
  <GroupSortOrder>ByName</GroupSortOrder>
  <HideMainMenu>False</HideMainMenu>
  <HotKeyAltEsc>Insert</HotKeyAltEsc>
  <HotKeyAltShiftTab>Next</HotKeyAltShiftTab>
  <HotKeyAltSpace>Delete</HotKeyAltSpace>
  <HotKeyAltTab>PageUp</HotKeyAltTab>
  <HotKeyCtrlAltDel>End</HotKeyCtrlAltDel>
  <HotKeyCtrlEsc>Home</HotKeyCtrlEsc>
  <HotKeyFocusReleaseLeft>Left</HotKeyFocusReleaseLeft>
  <HotKeyFocusReleaseRight>Right</HotKeyFocusReleaseRight>
  <HotKeyFullScreen>Cancel</HotKeyFullScreen>
  <LastUpdateCheckTimeUtc>2012-06-01 00:00:00Z</LastUpdateCheckTimeUtc>
  <LockWindowSize>False</LockWindowSize>
  <PanningAcceleration>1</PanningAcceleration>
  <PerformanceFlags>0</PerformanceFlags>
  <PersistentBitmapCaching>True</PersistentBitmapCaching>
  <PluginSettings>
    <plugins />
  </PluginSettings>
  <ReconnectOnStartup>True</ReconnectOnStartup>
  <ServerSortOrder>ByStatus</ServerSortOrder>
  <ServerTreeAutoHidePopUpDelay>0</ServerTreeAutoHidePopUpDelay>
  <ServerTreeLocation>Left</ServerTreeLocation>
  <ServerTreeVisibility>Dock</ServerTreeVisibility>
  <ServerTreeWidth>200</ServerTreeWidth>
  <ShowConnectedGroup>False</ShowConnectedGroup>
  <ShowFavoritesGroup>False</ShowFavoritesGroup>
  <ShowRecentlyUsedGroup>False</ShowRecentlyUsedGroup>
  <ShowReconnectGroup>False</ShowReconnectGroup>
  <ThumbnailPercentage>15</ThumbnailPercentage>
  <ThumbnailSize>160 x 120</ThumbnailSize>
  <ThumbnailSizeIsInPixels>True</ThumbnailSizeIsInPixels>
  <UseMultipleMonitors>False</UseMultipleMonitors>
  <WindowIsMaximized>True</WindowIsMaximized>
  <WindowPosition>200, 200</WindowPosition>
  <WindowSize>1273 x 823</WindowSize>
  <WorkspaceFeedCacheDir />
  <WorkspaceFeedDiscoveryUrl>https://rdweb.wvd.microsoft.com/api/arm/feeddiscovery</WorkspaceFeedDiscoveryUrl>
  <WorkspaceFeedEnabled>True</WorkspaceFeedEnabled>
</Settings>
主要言語
言語のデータがありません
スター
598
フォーク
280
平均マージ
5時間 23分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MicrosoftDocs/sysinternals のほかの issue

MicrosoftDocs/sysinternals の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。