Skip to content

Conversation

@ardaguclu
Copy link
Member

@ardaguclu ardaguclu commented Jun 19, 2025

Fixes #131
Introduces PoC for #132

This PR introduces a new static configuration file in toml format that defaults to conf.toml but can be modified via flag config.

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

# 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]]
Copy link
Member Author

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?.

Copy link
Member

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

kind = "Secret"

[[denied_resources]]
group = "rbac.authorization.k8s.io"
Copy link
Member Author

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.

@ardaguclu
Copy link
Member Author

@manusa @mrunalp

Comment on lines +130 to +143
if c.staticConfig == nil {
c.staticConfig = &config.StaticConfig{
DeniedResources: []config.GroupVersionKind{
{
Version: "v1",
Kind: "Secret",
},
{
Group: "rbac.authorization.k8s.io",
Version: "v1",
},
},
}
}
Copy link
Member

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 :)

@manusa manusa added this to the 0.1.0 milestone Jun 19, 2025 — with automated-tasks
@manusa manusa mentioned this pull request Jun 19, 2025
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx!

@manusa manusa merged commit 754da19 into containers:main Jun 19, 2025
5 checks passed
@ardaguclu ardaguclu deleted the static-conf-file branch June 19, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow/Deny resources list Configuration file

2 participants