-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[authorization] userToPrinciple using incorrect id/securityId #3707
Comments
Thanks @JohnPhoto for tagging them. :) @jannyHou @raymondfeng , could you please take a look? Thanks. |
@JohnPhoto we released |
Those are the ones I am using as you can see in my edit of my original post. |
Related to #3766 |
Fixed with #3807 ? |
@jannyHou @raymondfeng @JohnPhoto |
Closing as resolved. |
Steps to reproduce
The
userToPrinciple
method in authZ breaks currentUserProfile
at the following line:https://github.com/strongloop/loopback-next/blob/81890fce1e5cdaf1821557537164f23ba687386b/packages/authorization/src/authorize-interceptor.ts#L160
Current Behavior
As you can see the method basically throws the
securityId
away (by setting it to the name) and tries to set theid
(which no longer is valid in UserProfile tosecurityId
on the principal.So from here on,
currentUserProfile
always has anundefined
securityId.Expected Behavior
The principal which is used in authorizors
( currentUser = authorizationCtx.principals[0];)
should have a workingsecurityId
.tagging @raymondfeng @jannyHou as the usual suspects :)
Using:
The text was updated successfully, but these errors were encountered: