Manage User Rights By Decorating Their Claims Identity

  Рет қаралды 3,094

Jeff Zuerlein

Jeff Zuerlein

Күн бұрын

Пікірлер: 14
@krccmsitp2884
@krccmsitp2884 7 ай бұрын
That was very insightful, thanks. I'd like to see more about implementing authorization topics.
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
I’m working on it!
7 ай бұрын
Thank you! I worked with all components but it never crossed my mind to combine them like this. And it makes perfect sense
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
I know! I can’t figure out why people don’t talk about it more.
@alexisfibonacci
@alexisfibonacci 7 ай бұрын
How about implementing the IClaimsTransformation interface?
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
I've been avoiding your comment for long enough... You could use the IClaimsTransformation interface to "Decorate" or "Transform" a ClaimsPrincipal, in a very similar way to what I describe in my video. I presented the option of using middleware because a while back I read Brock Allen's blog post on the transform occurring more than once per request. However, I recently learned that Microsoft added a HashSet to the AuthenticationService to cache the result of the transform, so it effectively only gets transformed once. github.com/dotnet/aspnetcore/commit/814a37548b6adae2f846eae3144e8f37c1388520 That makes IClaimsTransformation much more compelling. At the end of the day, both work. I think the differentiator between the two options are...Do you need the HTTPContext in the decoration process? Do you need to implement your own caching of ClaimsPrincipal data for performance reasons, if so where and how? I still think there could be a slight performance advantage to using the middleware approach, but I don't have data to support that.
@cuongphung9163
@cuongphung9163 7 ай бұрын
The way you organize content and present are great. Thanks so much
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
So nice of you to say. I appreciate it.
@07309415
@07309415 7 ай бұрын
Thanks for video. I like how you explained the material and would like to see more on this subject. I appreciate access to the source as well.
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
Thank you! I want to make one or two more videos on Authorization, so I’m working on cleaning up the source code and adding a few more examples. Glad you liked the content!
@ProstoDoCelu316
@ProstoDoCelu316 7 ай бұрын
you will make call to database on every request right?
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
Yep. Caching could be a good option. Typically application specific claims don’t change very often. That would reduce the round trips and latency.
@massinamas
@massinamas 7 ай бұрын
What is the difference between groups and roles?
@JeffZuerlein
@JeffZuerlein 7 ай бұрын
To me...They are completely different, to Microsoft, they are the same thing. My notion of a Role would be the personal assistant to a CEO, or the CEO. It's a job that gets filled by a user. I don't want to code rights to an individual user, but I would to a role. My notion of a group would be a set of users. That set of users could all be given the same right, or the group could be assigned to a role. An example would be... Role = Online Content Reviewer, and there could be a group of users who fill that role. Microsoft doesn't support relationships between users, roles, groups, and tenants. I think it makes managing authorization much easier.
Span of T vs. Memory of T
9:44
Jeff Zuerlein
Рет қаралды 7 М.
Entity Based Authorization: When Roles Are Not Enough...
11:16
Jeff Zuerlein
Рет қаралды 748
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Avoid Deadlocks
4:10
Jeff Zuerlein
Рет қаралды 3 М.
T-SQL Skills: Loading Millions Of Rows Of Test Data In Seconds
11:19
Put An End To Your DateTime Nightmares!
6:20
Jeff Zuerlein
Рет қаралды 319
Deep Dive On Authorization Handlers
10:33
Jeff Zuerlein
Рет қаралды 238
Unit Testing Authorization Handlers And Policies
10:58
Jeff Zuerlein
Рет қаралды 211
Boost Performance By Sorting With Span of T
9:41
Jeff Zuerlein
Рет қаралды 513