microsoft / win32-app-isolation

Tools and documentation for Win32 app isolation
MIT License
1.26k stars 33 forks source link

[Feature]: Add support for packages registered in place #33

Closed riverar closed 10 months ago

riverar commented 1 year ago

Summary

It appears isolatedWin32-accessToPublisherDirectory does not work for packages that are registered in-place with Add-AppxPackage -Register path/to/appxmanifest.xml. Or perhaps sub-directories?

AppManifest.xml snippet:

<Identity
  Name="40459File-New-Project.EarTrumpet"
  ProcessorArchitecture="x86"
  Publisher="CN=6099D0EF-9374-47ED-BDFE-A82136831235"
  Version="2.3.0.0" />

Summary.txt snippet:

Missing capability coverage for 40459File-New-Project.EarTrumpet_2.3.0.0_x86__1sdd7yawvg6ne
Executables run by package: svchost.exe csrss.exe EarTrumpet.exe rundll32.exe

...

Type: File

\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\EarTrumpet.exe
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\EarTrumpet.dll
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\hostfxr.dll
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\coreclr.dll
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\EarTrumpet.deps.json
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\EarTrumpet.runtimeconfig.json
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\hostpolicy.dll
\Device\NamedPipe\dotnet-diagnostic-17520
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\mscorrc.dll
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\System.Private.CoreLib.dll
\??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet\clrjit.dll
...

Pitch

Visual Studio debug loop for packaged applications utilizes in-place registration. It is too cumbersome to fully package and deploy an application for debug/test scenarios.

tiangao-ms commented 1 year ago

Sorry could you explain why you think the capability is not working? This is a feature that allows access to a very specific (and manually created) directory. Did you test it?

riverar commented 1 year ago

I expected the capability named "access to publisher directory" to control, well, access to the directory in which the app is published to. I recognize now, after finding the separate docs, this is not supported. (https://github.com/microsoft/win32-app-isolation/blob/main/docs/fundamentals/consent.md)

Perhaps it should? The files in the summary.txt above are pretty critical.

tiangao-ms commented 1 year ago

This is @macruzco 's expertise area. I do believe that the app has access to the directory it's installed in (so all the installed files). Are you able to bring up your app without the profiler?

macruzco commented 1 year ago

Hi @riverar,

Please find a few questions for troubleshooting below:

1) summary.txt is appended to by every new run, not overwritten. Are you looking into the summary.txt contents for the run of the package you registered in place? 2) Was the AppXManifest located in the installation directory of the application? If not, what happens when you try that? 3) Did you Start-Profiling again for the new package manifest? Did it complain about the package not being installed? 4) Do you run into the same issue if you create an MSIX package via MPT using the new AppXManifest with the isolatedWin32-accessToPublisherDirectory capability? 5) Do you see lines for the \??\C:\Sources\EarTrumpet\EarTrumpet.Package\AppPackages\40459File-New-Project.EarTrumpet\EarTrumpet* files in the AccessAttemptRecords.csv generated by Get-ProfilingResults run for the package registered in place? If so, could you please send me one or two of those lines?

Good catch nonetheless! Generally speaking, I know the isolated app would have access to install directories under ProgramFiles, but I'm not sure if default access would be supported for other installation paths.

Thank you!

DrusTheAxe commented 1 year ago

Add-AppxPackage -Register path is equivalent to PackageManager.RegisterPackageAsync(file://path, DeploymentOptions_DevelopmentMode). That has differences if you register the package w/o DevelopmentMode. The cmdlet sets that option by default; you need to add -DisableDevelopmentMode for the cmdlet to NOT pass that option to PackageManager when registering the package.

the app has access to the directory it's installed in (so all the installed files)

Please define "access".

In general, yes - Windows.ApplicationModel.Package.Current.InstalledPath (or GetCurrentPackagePath(), etc) gets an app the location its installed in (aka its packagedirectory aka pkgdir), but the directory may be ACL'd in ways that don't work for certain types of access e.g. no write access to a pkgdir when under C:\Program Files\WindowsApps, not all ACEs are added when the pkg is registered.

I'm not familiar with isolatedWin32-accessToPublisherDirectory, so I can't say if/how that alters behavior.

macruzco commented 1 year ago

It seems like the problem may be that the directory impacted is not ACL'ed to allow the necessary access by the package, which wouldn't be changed by registration.

@riverar could you please send us the Security Descriptor on the impacted package directory in the following three instances: 1) Before Add-AppxPackage -Register. 2) After Add-AppxPackage -Register in the broken scenario. 3) After Add-AppxPackage -Register in the working scenario.

Thank you!

riverar commented 1 year ago

Hi @macruzco, here's my results.

icacls before registration

App
    NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
    BUILTIN\Administrators:(I)(OI)(CI)(F)
    DESKTOP-4P4GJJ1\Rafael:(I)(OI)(CI)(F)
    BUILTIN\Users:(I)(OI)(CI)(RX)
    NT AUTHORITY\Authenticated Users:(I)(M)
    NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)

icacls after registration

App
+   S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(RX)
+   S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(OI)(CI)(IO)(GR,GE)
+   NT AUTHORITY\SYSTEM:(F)
+   NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
+   NT AUTHORITY\LOCAL SERVICE:(OI)(CI)(RX)
+   NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(RX)
+   NT AUTHORITY\RESTRICTED:(OI)(CI)(RX)
+   BUILTIN\Users:(OI)(CI)(Rc,S,RD,REA,X,RA)
+   S-1-15-3-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302:(OI)(CI)(RX)
+   BUILTIN\Users:(OI)(CI)(R)
    NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
    BUILTIN\Administrators:(I)(OI)(CI)(F)
    DESKTOP-4P4GJJ1\Rafael:(I)(OI)(CI)(F)
    BUILTIN\Users:(I)(OI)(CI)(RX)
    NT AUTHORITY\Authenticated Users:(I)(M)
    NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)
Summary.txt ``` 7/7/2023 8:23:55 PM Microsoft.Windows.Win32Isolation.CapabilityAccessParser Output Summary Input parsed: C:\Sources\IsolationRepros\register-in-place\trace.etl Target(s): 40459File-New-Project.EarTrumpet_2.1.10.0_x86__725pr5jq8wr8a(lsass.exe,svchost.exe,EarTrumpet.exe,services.exe,csrss.exe) Capabilities identified for 40459File-New-Project.EarTrumpet_2.1.10.0_x86__725pr5jq8wr8a Executables run by package: lsass.exe svchost.exe EarTrumpet.exe services.exe csrss.exe Missing capability coverage for 40459File-New-Project.EarTrumpet_2.1.10.0_x86__725pr5jq8wr8a Executables run by package: lsass.exe svchost.exe EarTrumpet.exe services.exe csrss.exe Access to the resources listed below was attempted by the profiled application package(s). However, there are no capabilities currently supported by the system that would allow such desired access to be obtained to the target object. You may submit the profiling output to Microsoft for future OS capability support consideration. Type: File \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe.config \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe \??\C:\Sources\IsolationRepros\register-in-place\ \??\C:\Sources\ \??\C:\Sources\IsolationRepros\ \??\C:\Sources\IsolationRepros\register-in-place\App\ \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\ \Device\HarddiskVolume4\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe \??\C:\Users\Rafael \Device\HarddiskVolume4\Users\Rafael\AppData\Local\Packages\40459File-New-Project.EarTrumpet_725pr5jq8wr8a\LocalCache\Roaming \??\C:\Users\Default\AppData\Roaming \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\Bugsnag.ConfigurationSection.dll \Device\HarddiskVolume4\Sources\IsolationRepros\register-in-place\App\EarTrumpet\Bugsnag.ConfigurationSection.dll \??\C:\Users\Rafael\AppData\Local\Temp \??\C:\ProgramData \Device\MountPointManager \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\Bugsnag.dll \Device\HarddiskVolume4\Sources\IsolationRepros\register-in-place\App\EarTrumpet\Bugsnag.dll \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.PDB \DEVICE\NETBT_TCPIP_{D4556DC6-A3C7-44CF-AAFA-0DC338798D17} \??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\WpfAnimatedGif.dll \Device\HarddiskVolume4\Sources\IsolationRepros\register-in-place\App\EarTrumpet\WpfAnimatedGif.dll Type: Key \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store \REGISTRY\USER\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\Volatile Environment \REGISTRY\MACHINE\System\CurrentControlSet\Services\rasman\parameters \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\\Connections \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\Software\Microsoft\Windows\DWM \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\Software\Classes\Local Settings\MuiCache\6\52C64B7E \REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\ECCParameters \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{699745C2-5066-4B82-A8E3-D40478DBEC8C}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{43324B33-A78F-480F-9111-9638AACCC832}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{DDE33513-774E-4BCD-AE79-02F4ADFE62FC}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{AA7E3C50-864C-4604-BC04-8B0B76E637F6}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{8F914656-9D0A-4EB2-9019-0BF96D8A9EE6}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{50D42F09-ECD1-4B41-B65D-DA1FDAA75663}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{D9403860-297F-4A49-BF9B-77898150A442}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{3697790B-223B-484E-9925-C4869218F17A}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{B5C8B898-0074-459F-B700-860D4651EA14}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{FB012959-F4F6-44D7-9D09-DAA087A9DB57}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{03012959-F4F6-44D7-9D09-DAA087A9DB57}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{D4DCD3D7-B4C2-47D9-A6BF-B89BA396A4A3}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{0010668C-0801-4DA6-A4A4-826522B6D28F}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{5805137A-E348-4F7C-B3CC-6DB9965A0599}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{02805F1E-D5AA-415B-82C5-61C033A988A6}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{4B59AFCC-B8C3-408A-B670-89E5FAB6FDA7}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{72B624DF-AE11-4948-A65C-351EB0829419}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{01B90D9A-8209-47F7-9C52-E1244BF50CED}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{E7E79A30-4F2C-4FAB-8D00-394F2D6BBEBE}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{7F12E753-FC71-43D7-A51D-92F35977ABB5}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{AA94DCC2-B8B0-4898-B835-000AABD74393}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{41070793-59E4-479A-A1F7-954ADC2EF5FC}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{B92E345D-F52D-41F3-B562-081BC772E3B9}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{7447A267-0015-42C8-A8F1-FB3B94C68361}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{1767B93A-B021-44EA-920F-863C11F4F768}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{9F66347C-60C4-4C4D-AB58-D2358685F607}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{50B1904B-F28F-4574-93F4-0BADE82C69E9}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{356F2F88-05A6-4728-B9A4-1BFBCE04D838}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{32557D3B-69DC-4F95-836E-F5972B2F6159}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{3692CA39-E082-4350-9E1F-3704CB083CD5}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{0CE7A4A6-03E8-4A60-9D15-282EF32EE7DA}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{AABFB2FA-3E1E-4A8F-8977-5556FB94EA23}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{F90B5F36-367B-402A-9DD1-BC0FD59D8F62}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{877A0BB7-A313-4491-87B5-2E6D0594F520}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{F5D3E63B-CB0F-4628-A478-6D8244BE36B1}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{FB40360C-547E-4956-A3B9-D4418859BA66}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{D94EDF02-EFE5-4F0D-85C8-F5A68B3000B1}\Containers \Registry\Machine\Software\Classes\WOW6432Node\CLSID\{276C88CA-7533-4A86-B676-66B36080D484}\Containers \Registry\WC\Silo4aa980e0-fd6f-388c-ab25-93988eb0c33fuser_sid \REGISTRY\USER\S-1-5-21-3696692206-1257570271-3327070725-1000\SOFTWARE\Microsoft\CTF\CUAS\DefaultCompositionWindow Type: Mutant \BaseNamedObjects\Local\SM0:1400:120:WilError_03 Type: RPC Interface 11899a43-2b68-4a76-92e3-a3d6ad8c26ce Type: Section \Sessions\1\AppContainerNamedObjects\S-1-15-2-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302\windows_shell_global_counters \BaseNamedObjects\windows_shell_global_counters \Sessions\1\AppContainerNamedObjects\S-1-15-2-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302\Global\NLS_CodePage_1252_3_2_0_0 Type: Semaphore \BaseNamedObjects\Local\SM0:1400:120:WilError_03_p0 \BaseNamedObjects\Local\SM0:1400:120:WilError_03_p0h ```
Other files [AccessAttemptRecords.csv.zip](https://github.com/microsoft/win32-app-isolation/files/11987535/AccessAttemptRecords.csv.zip) [trace.etl.zip](https://github.com/microsoft/win32-app-isolation/files/11987536/trace.etl.zip) [AppxManifest.xml.zip](https://github.com/microsoft/win32-app-isolation/files/11987567/AppxManifest.xml.zip)
riverar commented 1 year ago

And here's a fresh set of files after adding isolatedWin32-accessToPublisherDirectory.

When I originally created this issue, I thought isolatedWin32-accessToPublisherDirectory would address the file-based hits, such as:

\??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe.config
\??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe
\??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.PDB
...
macruzco commented 1 year ago

Thank you, @riverar ! This is helpful and opens up avenues for investigation on my end. I'll keep you posted.

macruzco commented 1 year ago

@riverar , at your convenience, could you please send me step-by-step instructions on how you hit this problem?

The S-1-15-3-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302:(OI)(CI)(RX) ACE added by Add-AppxPackage -Register to the package directory should be enough to confer the access your package needs. However, observing the trace you sent us, it looks like your package activation did not work as expected.

I tried reproing this using my fork of EarTrumpet and your AppSilo AppXManifest, but things worked as expected for me.

riverar commented 1 year ago

Video: https://www.youtube.com/watch?v=N1waBtr3NA4 (quickly put together)

Files on desktop from video: Video_Assets.zip

Missing from the video is a third attempt that adds the remaining capabilities the tool found:

<rescap:Capability Name="inputInjection"/>
<rescap:Capability Name="isolatedWin32-profilesRootMinimal"/>

Running the app resulted in the same app behavior as seen in the video--can't click toggle switches, etc.

macruzco commented 1 year ago

Hi @riverar , thank you for this!

The traces you sent me point to the culprit being activation issues for the package, where access primitives set by register in-place are not translated as expected to the package token upon activation. Although that's clear from the traces, I wasn't able to repro it to understand why that's happening. See below for details. I'll pursue other avenues of investigation and keep you posted. Activation might have some trace logs we can collect from your machine to help understand what's happening.

I tried reproing this using my fork of EarTrumpet and your AppSilo AppXManifest, but things worked as expected for me.

By the above I don't mean EarTrumpet worked as expected, with toggles and functionality operating smoothly, etc. These are separate issues/investigations. What I mean is that the issue at hand of denied access to the package directory registered in place did not repro. The package was able to access those resources after being registered in place.

I ran your scenario according to the video on a clean 25393.1.amd64fre.zn_release.230608-1158 client Enterprise VM (matching the build on your video) with developer mode enabled from an Administrator PowerShell 7 terminal.

I was not able to repro the denied access. After register in place, both with and without capabilities declared, the package was granted Read and Execute access to the target package directory. You can find the results of my repro attempt below. If you can think of anything that may help me repro this that is not in the video, a machine setting or a particular step in the video I should be paying special attention to, please let me know.

repro-results.zip

At this point, the best bet to resolve the issue at hand would probably be to try a clean machine. Although if you decide to do this, please keep the machine that repros the issue live if you can, in case we need to get back to it for more diagnostics.

Just to clarify, the isolatedWin32-accessToPublisherDirectory capability has a misleading name. It's not intended to grant access to the package directory in the register in place scenario. It's intended for publishers of packages to allow for multiple such packages to access a common publisher path as long as that path includes the publisher ID. We are working on clarifying the intent and perhaps the name of the capability.

Thank you, Matheus

riverar commented 1 year ago

The trace/logs I provided were from a clean virtual machine; I can give you full RDP access to the box if needed.

But I think I lost track of what the goal of all this troubleshooting was. It sounds like you already confirmed isolatedWin32-accessToPublisherDirectory is not designed to grant access in the register-in-place scenario so the following entries in the README.txt are expected behavior with no current workaround, right? (If so, that loops us back to my original feature request.)

Type: File

\??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe.config
\??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\EarTrumpet.exe
\??\C:\Sources\IsolationRepros\register-in-place\
\??\C:\Sources\
\??\C:\Sources\IsolationRepros\
\??\C:\Sources\IsolationRepros\register-in-place\App\
\??\C:\Sources\IsolationRepros\register-in-place\App\EarTrumpet\
...
macruzco commented 1 year ago

Right, the issues are conflated here. Thanks for bearing with this, please let me know if the below makes things clearer.

isolatedWin32-accessToPublisherDirectory does not apply to register in place, so we don't need to think of the issue in terms of this capability at all.

If so, that loops us back to my original feature request

As far as adding support for packages registered in place, the icacls output you sent us and my repro attempts tell us that packages registered in place are already supported.

As per icacls, Add-AppxPackage -Register adds the appropriate ACE to the registered package directory to make sure the package can read and execute its contents, namely:

S-1-15-3-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302:(OI)(CI)(RX)

The SID above is a capability specific to your package, where the RIDs in bold are derived from your package name. The package token should have this capability "by default". It's not something declared in the manifest.

In my repro attempt, the package token correctly carries the S-1-15-3-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302 capability as expected. Thus, you'll see in my repro files that nothing under \??\C:\Sources\IsolationRepros\register-in-place\App (i.e., the registered directory) was flagged for denied access.

so the following entries in the README.txt are expected behavior with no current workaround, right?

No. Some of the entries, namely anything under \??\C:\Sources\IsolationRepros\register-in-place\App, are not expected and should not have appeared in summary/readme even in the case where you had no capabilities declared in the manifest. As it stands today, your package should have been able access to anything under \??\C:\Sources\IsolationRepros\register-in-place\App after being registered in place.

The traces you sent me show that, specifically in the scenario you ran on your VM, the package's token was not created with the "default" package capability (S-1-15-3-2386727626-4250381418-2784579416-2751325192-2387952516-4069137933-1462935302) like it should have been. This leads to your package not being able to access anything under \??\C:\Sources\IsolationRepros\register-in-place\App and to entries for this directory showing up in the summary/readme files. Although this makes it seem that register in place is not supported, that is not likely the issue. The issue is probably a bug in the activation path.

The troubleshooting has turned into finding out what happened in your specific case that led to improper token creation. I'm following up with the activation folks for investigation ideas. RDP access would be great! I'll follow up with you when I hear back from them.

Thanks, Matheus

riverar commented 1 year ago

Perfect summary, thanks. I'm on the same page now.

riverar commented 11 months ago

@macruzco Any updates?

macruzco commented 11 months ago

@riverar I've followed up with activation and they pointed me to the source for package instantiation. I was working on reproing it locally when I got sidetracked by other work. I should be able to get back to it in the next two weeks. Apologies for the delay.

macruzco commented 10 months ago

Update: Getting back into it, EarTrumpet activates correctly on my end and has default access to the register in place directory as expected. I'll close this feature-request as register in place is already supported, and I'll file an internal OS bug to track the inconsistency I observed in the trace files for your specific VM to investigate what in the activation stack may be causing the issue.