Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
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

@HaoK

Description

@HaoK

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions