-
-
Notifications
You must be signed in to change notification settings - Fork 12
[AIBundle] Add #[IsGrantedTool]
for tool access control
#102
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
base: main
Are you sure you want to change the base?
Conversation
0fe967a
to
d1cb720
Compare
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.
Thanks for bringing it to Symfony AI and switching to the bundle - I think it makes more sense 👍
Besides the pipeline, this needs a rebase after #94, and a brief section in the docs of the bundle - it's a powerful new feature users should know about :)
Rebased & added docs. About PHPStan error, not sure what to do with it, it's about this 3rd parameter: https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Security/Core/Authorization/AuthorizationCheckerInterface.php#L27 |
return 'ACME Corp.'; | ||
} | ||
} | ||
|
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.
maybe to clarify, we could add:
The attribute ``IsGrantedTool`` can be added on class- or method-level - even multiple | |
times. If multiple attributes apply to one tool call, a logical AND is used and all access | |
decisions have to grant access. | |
or similar - if I even got it right
my first thought here would be to ignore the error in the |
Add
#[IsGrantedTool]
attribute for tool access control with similar behavior as#[IsGranted]
insymfony/security-http
.Moved from php-llm/llm-chain#382