-
Notifications
You must be signed in to change notification settings - Fork 47
feat(*): Add dynamic policy management to Weld #17
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thomastaylor312
approved these changes
Jul 29, 2025
0de360c to
dd830af
Compare
This commit adds a dynamic policy management system to the MCP server. You can now attach, detach, and get policies for individual components. The policy can be attached from a local file, an OCI reference, or a URL, and co-located with the component in plugin_dir directory. Signed-off-by: Jiaxiao Zhou <[email protected]>
This commit refactos the resource loading logic by abstracting the "Loadable" trait for handling different types of resources (i.e. component, policy, etc.) Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
This commit adds a new permission control system to the Weld MCP server. It deprecates the 'attach-policy' and 'detach-policy' tools, and introduces new tools for managing permissions: - 'grant-storage-permission' - 'grant-network-permission' These grant permission Tools can be used to grant fine-grained permissions to components. For example, a component can be granted permission to read from a specific file system path, or to access a specific network host. This PR adds more integration tests for the new permission system and a design document for it. What's left to do: - The error message needs to be improved to inform the LLM that the whether the erorr is due to the permission system or the execution of the component. This error message needs to also inform the LLM what's then next step to fix if the error is due to the permission system. Signed-off-by: Jiaxiao Zhou <[email protected]>
…documentation This commit refactors the Justfile to remove unnecessary policy file arguments from the run commands for filesystem, get-weather, and fetch-rs plugins. Additionally, it updates the tools.rs file to enhance the description of the URI property for storage resources. The lib.rs file is modified to correct the usage of the OCI client type and streamline the lifecycle manager's policy attachment and detachment methods. Lastly, the design document is corrected for a typo in the overview section. Signed-off-by: Jiaxiao Zhou <[email protected]>
To fix the breaking changes from the mcp SDK Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
This commit enforces network policies by filtering outgoing HTTP requests based on list of allowed hosts defined in the policy file associated with the component. This commit adds an integration test for the network policy enforcement. Note that this commit implements a simplified version of the network policy enforcement. The policy is only enforced for exact host matches, no wildcard matching is supported. The policy also does not enforce IP address matching. Signed-off-by: Jiaxiao Zhou <[email protected]>
…elated tests Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
This was
linked to
issues
Aug 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new policy management to Weld by allowing each component to associate with a policy file for it's capabilities. This PR adds a few new built-in Tools:
grant-storage-permission: Grants a fine-grained storage permission
grant-network-permission: Grants a fine-grained network permission
get-policy: Gets the policy for a component
In addition, it deprecates the global policy flag. Weld no longer accepts the policy-file argument in it's CLI.
The policy file will be co-locate the policy.yaml and policy.meta.json files to plugin_dir.