-
Notifications
You must be signed in to change notification settings - Fork 167
Introduce toml configuration file with a set of deny list #133
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
Conversation
pkg/config/conf.toml
Outdated
| # A list of denied Kubernetes resources in Group/Version/Kind format. | ||
| # If a resource is in this list, your MCP server should deny all operations | ||
| # on that resource type across all namespaces. | ||
| [[denied_resources]] |
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.
Would this format make sense to you?.
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.
Let's move this discussion to #132
pkg/config/conf.toml
Outdated
| kind = "Secret" | ||
|
|
||
| [[denied_resources]] | ||
| group = "rbac.authorization.k8s.io" |
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.
We allow group based prohibitions.
713cdec to
601f882
Compare
| if c.staticConfig == nil { | ||
| c.staticConfig = &config.StaticConfig{ | ||
| DeniedResources: []config.GroupVersionKind{ | ||
| { | ||
| Version: "v1", | ||
| Kind: "Secret", | ||
| }, | ||
| { | ||
| Group: "rbac.authorization.k8s.io", | ||
| Version: "v1", | ||
| }, | ||
| }, | ||
| } | ||
| } |
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.
Additionally, this PR adds predefined set of resources to not allow any operations in MCP Server.
I wouldn't set any opinionated defaults (at least for the default upstream full profile)
Maybe we want to discuss if we want to provide an upstream safe profile or maybe even a mode of operation that users could activate and added the opinionated denied resources.
Everything else looks good :)
601f882 to
685558e
Compare
685558e to
24de5d3
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.
LGTM, thx!
Fixes #131
Introduces PoC for #132
This PR introduces a new static configuration file in toml format that defaults to
conf.tomlbut can be modified via flagconfig.Additionally, this PR adds predefined set of resources to not allow any operations in MCP Server.
This PR is supposed to fix #132 and #131