Andrei Kvapil cdc34d6e34 fix(kubeovn-webhook): restrict the webhook port to the API server
The /mutate-pods handler returns namespace-derived annotations to any
caller that reaches it (GHSA-g883-q79m-8225), and until now nothing
stopped an arbitrary in-cluster pod from being that caller.

Client-certificate verification, added in #2698, cannot close this on
its own. Enabling --client-ca-file requires the API server to *present*
a certificate, which it does only when its AdmissionConfiguration names
a kubeConfigFile for the webhook plugins. Checked on a running
Cozystack control plane: the AdmissionConfiguration carries a
PodSecurity block and nothing else, so no certificate is offered at
all. Flipping to RequireAndVerifyClientCert there would reject the API
server itself, and with failurePolicy: Fail that stops pod creation
cluster-wide. No amount of log observation changes that — it is a
property of the control plane's configuration, not of the traffic.

So the network is where the caller can actually be constrained. The
policy denies pod and world traffic to the serving port and needs no
carve-out: the API server runs on the host network, so it is not a
Cilium endpoint and fromEndpoints never matches it. Unlike the
ingress-nginx admission webhook this component exists only on the
management cluster, so there is no konnectivity-tunnelled caller to
exempt either, and no forgeable pod label anywhere in the selector.

It is a CiliumNetworkPolicy rather than a core NetworkPolicy, and that
distinction is why it works at all: kube-ovn runs with ENABLE_NP: false
and programs no ACLs, so a core NetworkPolicy would be created and
never enforced. The values comment claiming NetworkPolicy was simply
not an option is corrected — it was true only of the core kind.

Deny-only with default-deny disabled, matching the ingress-nginx
admission policy: putting these pods behind a default-deny would mean
enumerating every port they serve and breaking traffic on the first one
forgotten.

Signed-off-by: Andrei Kvapil <andrei.kvapil@aenix.io>
2026-08-24 23:54:33 +02:00
2025-10-08 09:43:34 +05:00
2024-02-08 12:04:32 +01:00

Cozystack Cozystack

Open Source Apache-2.0 License Support Active GitHub Release GitHub Commit OpenSSF Best Practices OpenSSF Scorecard

Cozystack

Cozystack is a free platform and framework for building clouds.

Cozystack is a CNCF Sandbox Level Project that was originally built and sponsored by Ænix.

With Cozystack, you can transform a bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.

Use Cozystack to build your own cloud or provide a cost-effective development environment.

Cozystack user interface

Use-Cases

Documentation

The documentation is located on the cozystack.io website.

Read the Getting Started section for a quick start.

If you encounter any difficulties, start with the troubleshooting guide and work your way through the process that we've outlined.

Versioning

Versioning adheres to the Semantic Versioning principles.
A full list of the available releases is available in the GitHub repository's Release section.

Contributions

Contributions are highly appreciated and very welcomed!

In case of bugs, please check if the issue has already been opened by checking the GitHub Issues section. If it isn't, you can open a new one. A detailed report will help us replicate it, assess it, and work on a fix.

You can express your intention to on the fix on your own. Commits are used to generate the changelog, and their author will be referenced in it.

If you have a concrete feature request, open an issue. For a cross-cutting or architectural change, open a design proposal in the community repo. For questions or early ideas, use GitHub Discussions. See CONTRIBUTING.md for the full routing.

Community

You are welcome to join our Telegram group and come to our weekly community meetings. Add them to your Google Calendar or iCal for convenience.

License

Cozystack is licensed under Apache 2.0.
The code is provided as-is with no warranties.

Commercial Support

A list of companies providing commercial support for this project can be found on official site.

Languages
Go 52%
Shell 34%
TypeScript 6.8%
Go Template 4.7%
Makefile 1.3%
Other 1.1%