Once merged the variant is one value away, and the values comment is
what an operator reads before choosing it, so it now says the variant
has no e2e coverage and is not for production. The threat model's note
also lists what the variant leaves unenforced beyond tenant isolation:
the platform components' own Cilium policies, several of them
ingressDeny rules that native NetworkPolicy cannot express.
Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
An opt-in bundles.system.networkingVariant for the isp-full (Talos)
bundle: "cozyplane" swaps kube-ovn, Cilium and kube-proxy for the
cozyplane eBPF CNI, its aggregated sdn.cozystack.io apiserver and the
cozyplane-kpr socket-LB proxy. The default "kubeovn-cilium" renders
identically to main.
The variant drops the packages that assume the replaced stack —
kubeovn-webhook/-plunger, multus, securitygroup-controller, the
virtualprivatecloud app — and turns off sdn aggregation in
cozystack-api, since cozyplane owns the group. The selector is
validated before any branch is taken: accepted off isp-full it would
half-apply, stripping the kube-ovn control plane and the sdn
APIService while the Cilium networking package keeps running; and the
default "cilium" gateway class is refused on cozyplane, where nothing
serves it. The platform's networking.podCIDR and serviceCIDR (and
clusterDNS, derived from the service CIDR when not set explicitly) are
threaded into the cozyplane component, so the egress masquerade and
the VPC gateways' internal denies match the cluster rather than the
chart defaults.
CiliumNetworkPolicy objects apply but are not enforced on this
variant; the values comment, the networking source and the threat
model say so, and the threat model records the SecurityGroup split:
cozyplane's is a first-class tenant instrument for traffic inside and
across VPCs, not cozystack-api's projection onto CiliumNetworkPolicy.
Tenant isolation rebuilt on native NetworkPolicy + HostFirewall is a
follow-up.
Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
A VMDisk created with source upload waits in UploadReady for an image,
but no tenant role can fill it. virtctl image-upload reads the disk PVC
and CDI's PVC Prime and requests an upload token, and the tenant roles
grant neither get on persistentvolumeclaims nor create on
uploadtokenrequests, so the command stops on a forbidden PVC read.
cozy:tenant:admin:base now grants both, so tenant admins and
super-admins get them in their own namespaces through the existing
RoleBindings, while the use and view tiers do not. Reading the
DataVolume is already granted for the disk's own name by the vm-disk
chart's dashboard role. The vm-disk notes print the command with
--no-create, because the chart has already created the DataVolume, and
the security self-assessment and threat model list the new grants.
The rules, their tests, the notes change and the docs lines come from
#3847, which also carries a console upload panel and an upload proxy
certificate that are still in review there.
Fixes#3759
Co-authored-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
A Redis release with external: true and TLS off publishes a plaintext
endpoint outside the cluster, and nothing stopped a tenant from asking
for one. The chart never infers TLS from external, because enabling it
moves Redis to a TLS-only listener, so external: true without an
explicit tls.enabled: true is exactly that case. A
ValidatingAdmissionPolicy on the Redis kind now refuses it with a
message naming the release and a remedy that works.
TLS is fixed when a Redis instance is created: the operator's
RedisFailover schema refuses a change, but the Redis API accepts it.
A spec's tls.enabled is therefore a request, not the instance's state,
and cannot prove on UPDATE that an instance has TLS; trusting it would
let a tenant flip it, expose the instance, and remove it again. So
external access can be enabled only at creation, where tls.enabled
does decide the instance, and any UPDATE turning it on is refused.
The RedisFailover schema does not exist before the first reconcile, so
a release admitted as external with TLS could have TLS dropped before
the instance is created. tls.enabled is therefore frozen while
external access stays on. Withdrawing external access in the same edit
lifts the freeze, which leaves a tenant a way to unblock an instance
whose TLS was flipped earlier, and the callers trusted by the tenant
host policy are exempt so an administrator can repair one in place.
Other edits to an instance that is already external pass, so releases
exposed in plaintext before the policy keep working.
Postgres is left out on purpose. CNPG pins ssl=on, and its default
pg_hba accepts plaintext from any client that asks, whatever the
chart's tls.enabled says; that field only decides whether the external
hostname goes into the certificate. A policy keyed on it would close
nothing.
The decisions are tested by compiling the shipped template with the
apiserver's own CEL compiler, since a structural chart test cannot
show what the policy admits.
BREAKING CHANGE: creating a Redis with external: true and without
tls.enabled: true, which applied before, is now refused, including a
GitOps re-apply of such a manifest into a fresh cluster. Turning
external on for an existing Redis is refused as well, so exposing an
instance means creating a new one with TLS, and tls.enabled can no
longer be changed on an instance with external access.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The isp-hosted variants install no CNI of their own, so on a host
without Cilium the cilium.io/v2 kinds do not exist and the tenant
install fails, taking the root tenant and everything that depends on
cozystack-basics down with it.
The policies now render on isp-hosted only when the host serves both
Cilium policy kinds. On every other variant Cozystack installs Cilium
itself, so they keep rendering unconditionally: a CRD that is missing
at render time there fails the install loudly instead of leaving the
tenant without network isolation, because helm-controller does not
re-render a release when only API discovery changes.
On isp-hosted without Cilium the tenant gets no network isolation from
Cozystack; isolating tenants is then up to the host's CNI.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The route hostname policy short-circuited on an absent field. Its CEL
opened with `!has(object.spec.hostnames) ||`, so an HTTPRoute,
TLSRoute or GRPCRoute declaring no hostnames satisfied the first
operand and was
admitted without a single hostname compared against the tenant apex.
An explicitly empty list reached the same outcome by a different path,
because `all()` over an empty list is vacuously true.
A route that names no hostname does not match nothing. Under Gateway
API it inherits the hostnames of every listener it attaches to, so it
covers whatever that listener covers. Require the field to be present
and non-empty before validating it.
All three policies rendered by the template share one CEL string, so
HTTPRoute, TLSRoute and GRPCRoute pick the change up together. The denial message
now names the missing-hostnames case, and the Gateway e2e grep moves to
the part of that message common to every denial it issues.
The Gateway e2e suite carried the one fixture that relied on the old
behaviour: its parentRef probe declared no hostnames and is applied
into the suite's tenant namespace. It now reads the apex from the
namespace label and names a hostname under it, as the neighbouring
cases in that suite already did.
Radius is unchanged: the policy still matches only tenant-* namespaces.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The port-443 kinds set still excludes GRPCRoute, TCPRoute and UDPRoute.
cilium#45559 governs only that every port-443 listener carries the same
set, not what is in it, so the contents are a least-privilege choice:
nothing the platform ships needs gRPC, TCP or UDP routing on port 443.
TCPRoute and UDPRoute additionally carry no hostname and no admission
rule gates them.
The gateway README described HTTPS and TLS-passthrough listeners as
carrying different kinds. They carry the same one, which is what
cilium#45559 requires.
The threat model and the self-assessment enumerate which route kinds the
hostname policies cover, and both listed two.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Document the platform's actors, boundary-crossing actions, and security
goals/non-goals, organized by trust boundary (T0-T4) per the CNCF
TAG-Security Actors/Actions model. Records the primary trust-boundary
invariant (tenant RBAC grants no HelmRelease/core writes; the aggregated
API server fixes the chart reference server-side) and the two admission
enforcement points (core kube-apiserver vs cozystack-api). Every claim
cites a source file so the model can be re-verified as the code evolves.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>