Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider exposing AppDomain.get_PermissionSet #27594

Closed
ericstj opened this issue Oct 10, 2018 · 7 comments
Closed

Consider exposing AppDomain.get_PermissionSet #27594

ericstj opened this issue Oct 10, 2018 · 7 comments
Assignees
Milestone

Comments

@ericstj
Copy link
Member

ericstj commented Oct 10, 2018

I've seen a number of libraries depend on this property. API Usage shows that it is quite high: https://apisof.net/catalog/System.AppDomain.PermissionSet

In my early prototypes for .NETCore 3.0 I needed to expose it.
https://devdiv.visualstudio.com/DevDiv/_git/DotNet-CoreFX-Trusted/commit/5704601346049767433cd5d717fed16733056f58?refName=refs%2Fheads%2Fericstj%2Fadd.back.types.experiment

The gist of that change is that it pushed PermissionSet and IStackWalk down into System.Runtime.Extensions and exposed AppDomain.get_PermissionSet as return new PermissionSet(PermissionState.Unrestricted);.

The controversial thing here is pushing those types down, however it was relatively contained; it luckily didn't bring down all of S.Sec.Permissions.

/cc @danmosemsft

@danmoseley
Copy link
Member

The change makes sense to me. @maryamariyan another one for your list - porting @ericstj change above.

@danmoseley
Copy link
Member

danmoseley commented Oct 11, 2018

@ericstj why was it necessary to create a netcoreapp configuration in S.S.Permissions? Isn't it not breaking to change to a type forward?

@ericstj
Copy link
Member Author

ericstj commented Oct 11, 2018

Because AppDomain is part of netstandard.dll and we cannot retroactively push PermissionSet into netstandard.dll.

Another way to look at this is we needed to typeforward to S.R.Extensions which was absorbed into netstandard, which we cannot change.

This is not a breaking change to forward a type, so long as you forward from the previous location.

@jkotas
Copy link
Member

jkotas commented Oct 11, 2018

Isn't this going to push S.S.Permissions into a partial .NET Core OOB with all the mess that comes with it?

@ericstj
Copy link
Member Author

ericstj commented Oct 11, 2018

No, this just means S.S.Permissions needs to cross-compile for netcoreapp3.0. Nothing else changes, we're not suggesting to change the inbox behavior of any assembly.

@MarcoRossignoli
Copy link
Member

@jkotas unrelated to this...i see term OOB in some discussion...can point me to some documentation of out-of-band meaning?Sorry for the noise here...but i'd like to understand all.

@jkotas
Copy link
Member

jkotas commented Oct 11, 2018

No, this just means S.S.Permissions needs to cross-compile for netcoreapp3.0.

Ok, I see that we have several other types forwarded from S.S.Permissions already.

can point me to some documentation of out-of-band meaning?

I am not sure whether we have it written anywhere ... here is the decoder ring:

  • OOB means out-of-band. It means that the library implementation is shipping as NuGet package.
  • Opposite of OOB is inbox. Inbox means that the library implementation is shipping as part of the runtime.
  • Partial OOB is a library that ships implementation as NuGet package for some runtimes, and inbox for other runtimes.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 3.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants