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

AppDomain Security vs Reflection Emit #6

Closed
RxDave opened this issue Mar 19, 2016 · 1 comment
Closed

AppDomain Security vs Reflection Emit #6

RxDave opened this issue Mar 19, 2016 · 1 comment
Labels

Comments

@RxDave
Copy link
Owner

RxDave commented Mar 19, 2016

The malicious client example app doesn't work as it used to.

Seems that Reflection Emit is demanding full trust now. Qactive only asserts Reflection permission but apparently that's not enough. Did Emit always demand full trust or did something change in Rx?

Unfortunately, if full trust is required by Rx's Qbservable Provider (the call to Subscribe) then CAS security may be useless here and all of the AppDomain code may be removed.

Alternatively, consider writing a custom Qbservable Provider just like Rx but relaxing the permission set, if possible. Perhaps one way to do this is to ensure that the expression tree is compiled outside of the call to Subscribe and therefore full trust can be asserted? (Note that asserting full trust around the call to Subscribe entirely defeats the purpose of using CAS because it means that the client's entire query will be running with full trust!)

@RxDave RxDave closed this as completed Mar 27, 2016
@RxDave RxDave added the bug label Mar 27, 2016
@RxDave
Copy link
Owner Author

RxDave commented Mar 27, 2016

Fixed by wrapping Rx's queryable implementation and ensuring that the expression is compiled with full trust but the call to Subscribe is not. I'm using reflection, so it's a fragile solution; however, I've also added a new ISecureQbservable interface that theoretically Rx could adopt (as can custom queryable providers) and then the reflection can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant