-
Notifications
You must be signed in to change notification settings - Fork 357
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
refactor: authz provider implementation and authz users basic implementation #4676
refactor: authz provider implementation and authz users basic implementation #4676
Conversation
✅ Deploy Preview for determined-ui canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Couple of questions below
} | ||
return nil, errors.Wrap(grpcutil.ErrPermissionDenied, err.Error()) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no check for if the user can patch other users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PatchUser
in grpc I think only allows for setting a users display name currently
The check for setting other use display names is in CanSetUsersDisplayName
I think?
return | ||
} | ||
|
||
knownAuthZTypes = make(map[string]bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like knownAuthZTypes
can be remade if this is called more than once? Should be locked down with a once like in the provider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a nil check for knownAuthZTypes
above -- which I missed for like a couple minutes wondering how it even worked lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh lmao I'm just blind
Is this dependent on Ilia's authz work? Would you want to merge this into |
Ilia's authz work is already in this PR and I think I would rather to keep commit history cleaner keeping this change separate? Also I think I changed my mind about |
Description
Refactor the user api both echo and grpc to use the new
authz
pattern.Test Plan
existing e2e tests + new integration tests
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
/webui/react/src/shared/
verifymake -C webui/react test-shared
passes.