Files
cozystack/packages
Aleksei Sviridkin e64e312361 feat(redis): declare the CA source and surface the tenant trust anchor
Wire redis into the engine-agnostic CA extraction contract so a tenant
can verify the Redis server without being handed private key material.

Use the declared source rather than labelling the chart's CA Certificate.
The operator fork already reconciles a key-free Opaque Secret holding
nothing but the ca.crt it lifts out of the release TLS Secret, and naming
that as the source is strictly better than the label route: no private
key ever sits beside the object the projection reads from. The
cert-manager Secret that does hold the CA key is not referenced here at
all.

The include selector matching the tenant-ca label is what makes the
lineage webhook mark the projection as a tenant resource, which is what
the tenant-secrets registry gates on. The selector is deliberately
specific — an empty one resolves to labels.Everything() and would mark
every Secret in the namespace.

Because that selector matches on the label alone with no name constraint,
add an exclude backstop naming the two release-owned Secrets that carry
private keys. Exclude is evaluated before include, so a name listed there
cannot be promoted whatever labels it acquires. The comment states the
bound honestly: matching is exact-name with no globs, so Secrets a future
operator version introduces are not covered, and the primary defence
stays the controller stamping the label only on its own projection.

This is inert until the CA-extraction controller merges. The
ApplicationDefinition CRD has no caCert field yet, so the block is pruned
on apply and no projection exists for the include to select.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-02 17:56:06 +03:00
..