-
Notifications
You must be signed in to change notification settings - Fork 104
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
Implement Authorization Callback Function #108
Conversation
…uest returns error
Implement Authorization Callback Function
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.
I think overall this approach looks fine to me; I'm curious if we considered adding the authorize fallback function as a part of the PrincipalMux
struct. That way we could keep the same CanAccess
pattern and just modify the principalMux to fallback to this authorizer. Another benefit I see is that we don't have a global variable holding the fallback authorization function and instead it's bound to a struct which should be safer in terms of different pieces of code accidentally modifying the function
Description
This feature introduces a callback function that allows service owners to define a fallback mechanism for access control within Knox. This capability supports the integration of custom logic to evaluate access decisions.
Changes Made
Testing
Run all tests in the repo, including new ones implemented for SetAccessCallback and authorizeRequest
Checklist