Skip to content

Sort out whether AllowPartiallyTrustedCallers gets defined #248

@jonorossi

Description

@jonorossi

I think the removal of System.Security.AllowPartiallyTrustedCallers assembly attribute from Windsor should be listed under "Breaking Changes" (@alinapopa)

I thought Castle Core was defining the attribute and so I was going to say it should go back in, however it appears the attribute was never defined out of the box for Castle Core.

For Castle Core:

I mentioned this file already to @Fir3pho3nixx in castleproject/Core#261 (comment) where it got removed in a open PR.

Interesting that Windsor was always defining the attribute and then had the option to define it in the build scripts:

Looking at MSDN I think these two remarks are the reason APTCA got all messed up and we didn't want to always define it:

  • "The .NET Framework 4 introduces new security rules that affect the behavior of the AllowPartiallyTrustedCallersAttribute attribute (see Security-Transparent Code, Level 2). In the .NET Framework 4, all code defaults to security-transparent, that is, partially trusted. However, you can annotate individual types and members to assign them other transparency attributes. For this and other security changes, see Security Changes in the .NET Framework."
  • "Caution: The presence of this assembly-level attribute prevents the default behavior of placing FullTrustLinkDemand security checks, and makes the assembly callable from any other (partially or fully trusted) assembly."
  • (https://msdn.microsoft.com/en-us/library/system.security.allowpartiallytrustedcallersattribute(v=vs.110).aspx)

We should make a decision whether we want this in the code and then implement it in both Castle Core and Windsor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions