docs(gateway): stop saying the route-hostname policy admits hostname-less routes (#5352)

## What this PR does

Refs #4938

The edge-termination section of `packages/extra/gateway/README.md` said
that on a class sharing one edge address the class controller has to
keep route hostnames inside the tenant apex, "since the platform's
route-hostname policy admits routes that declare no hostnames at all".

That stopped being true in 1.7.
`packages/system/cozystack-basics/templates/route-hostname-policy.yaml`
now requires `spec.hostnames` to be present and non-empty for
`HTTPRoute`, `TLSRoute` and `GRPCRoute` in `tenant-*` namespaces
(#3475), and it rejects any hostname outside the namespace's
`namespace.cozystack.io/host` apex. The policy doesn't depend on the
Gateway class. This PR replaces the sentence with one that says so and
links to the policy's entry under "Security model".

This fixes only the line the issue points at. I didn't audit the rest of
the README against the code, so I used `Refs` and not `Closes`. The
issue asks for that full review, and it should stay open for it.

`make generate` (cozyvalues-gen) only rewrites the parameter table, and
this change doesn't touch it.

### Screenshots

Not a UI change.

### Downstream repositories

I left every box below unticked on purpose. The only downstream copy of
this text is the Gateway reference page on cozystack/website. Per
`docs/agents/contributing.md`, the release bot regenerates that page
from this README on the next stable tag, so I don't think any manual
follow-up is needed. A maintainer should confirm that.

- [ ] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
docs(gateway): the Gateway README no longer says the route-hostname policy admits routes without hostnames; since 1.7 it rejects them in tenant namespaces.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Clarified that the route-hostname policy applies to `HTTPRoute`,
`TLSRoute`, and `GRPCRoute` resources in `tenant-*` namespaces on
creation and update. It rejects routes with no hostnames or hostnames
outside their namespace’s apex. Routes stored before the policy is
installed are not rejected unless they are subsequently updated.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Aleksei Sviridkin authored and GitHub committed 2026-11-23 11:56:48 +03:00
commit dec14c736d
1 file changed
+1 -1
+1 -1
View File
@@ -74,7 +74,7 @@ The two halves of that move are not ordered against each other: the wildcard-sec
Moving an existing tenant onto such a class also withdraws the operator wildcard from that tenant: its namespace stops counting as a termination point, so the replica described under [existing wildcard Secret](#opt-in--existing-wildcard-secret-operator-provided) is deleted from it on the next reconcile. Its neighbours keep theirs, and so does a namespace that also owns an ingress controller — that one still terminates locally.
Route hostnames still stay inside the tenant apex; on a class that shares one edge address between all Gateways the class controller has to enforce that itself, since the platform's route-hostname policy admits routes that declare no hostnames at all.
Route hostnames still stay inside the tenant apex on such a class: the platform's route-hostname policy (`cozystack-route-hostname-policy`, described under [Security model](#security-model)) does not depend on the Gateway class, and it rejects an `HTTPRoute`, `TLSRoute` or `GRPCRoute` in a `tenant-*` namespace that declares no `spec.hostnames` or names a hostname outside the namespace's apex. The policy is checked on CREATE and UPDATE only, so a route stored without `spec.hostnames` before it was installed is not rejected until it is next updated; audit existing routes in `tenant-*` namespaces before relying on this boundary.
The publishing tenant is the one tenant that cannot move itself across that line: the chart refuses to render when its selected class is edge-terminated and `gateway.className` is not, or the reverse. The cluster-wide ACME `ClusterIssuer`s point their HTTP-01 solver at that tenant's Gateway, and whether the solver pins `sectionName: http` is decided from `gateway.className` alone — a tenant's own class choice does not travel on that channel. A publishing tenant that went to an edge class on its own would therefore keep a solver pinned to the `http` listener its Gateway no longer renders, and every HTTP-01 certificate in the cluster would stop issuing with nothing in any status naming the cause. The guard is symmetric because either direction leaves those two decisions derived from different classes. Move `gateway.className` instead; which namespace counts as the publishing tenant comes from `publishing.ingressName`.