Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

AuthZ Regression: PolicyEvaluator always passes HttpContext for resource #1329

Closed
HaoK opened this issue Jul 20, 2017 · 2 comments
Closed

AuthZ Regression: PolicyEvaluator always passes HttpContext for resource #1329

HaoK opened this issue Jul 20, 2017 · 2 comments
Assignees
Milestone

Comments

@HaoK
Copy link
Member

HaoK commented Jul 20, 2017

See line: https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authorization.Policy/PolicyEvaluator.cs#L80

The resource should be taken by IPolicyEvaluator.AuthorizeAsync() and passed into the IAuthorizationService instead of always passing in the HttpContext.

This is a regression from 1.0 in MVC where there's no longer any way to access the AuthorizationFilterContext from a policy requirement. Previously the context.Resource was set to the AuthorizationFilterContext.

Fix is #1328

@Eilon
Copy link
Member

Eilon commented Jul 20, 2017

Approved for 2.0, incl. the MVC and SignalR changes:

@HaoK HaoK added 3 - Done and removed 2 - Working labels Jul 21, 2017
@HaoK
Copy link
Member Author

HaoK commented Jul 21, 2017

869d98e

@HaoK HaoK closed this as completed Jul 21, 2017
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

2 participants