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

Aperta
#1,028 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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>
Lingua principale
Nessun dato sulla lingua
Stelle
598
Fork
280
Merge medio
5h 23m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MicrosoftDocs/sysinternals

Tutte le issue di MicrosoftDocs/sysinternals

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.