This is a backlog of deferred hardening work. Each item is a candidate to be planned and implemented later; none of them is a current defect that makes the server unusable. The items came out of a threat-model review that asked two questions: what an attacker can still read or crack from a full dump of the PostgreSQL database, and what an attacker already inside the image's trust boundary can reach.
This document only records the gaps. It does not describe anything that is already implemented, and it does not propose code changes here.
Each item names the risk, the change to plan, and the files it would touch. The list is deliberately short and ordered by value.
email
lookup so case-insensitive uniqueness still works.src/db/user_repo.rs, src/db/client_repo.rs,
src/db/redirect_repo.rs, src/keys.rs, migrations/.src/crypto/totp.rs, src/keys.rs.The attack surface and the controls already in place are documented in SECURITY.md; this section lists only the mitigations that remain. It answers a second threat-model question: if an attacker is already inside the image's trust boundary, how could they reach the container or the host, and how should we reduce that risk? The remaining vectors are narrow.
request_urirequest_uri fetch (src/jose/jar/fetch.rs) cannot reach a publicly routable
request-object host. A deployment either relies on a feature that silently
fails, or loosens egress further than intended.request_uri is
unavailable under the shipped policy. A blanket 443 allowance is not an
option because it restores arbitrary exfiltration.deploy/k8s/networkpolicy.yaml, docs/DEPLOYMENT.md.networkpolicy.yaml allows egress to any address on ports 5432 and
6379 (link-local excluded), so those ports are an exfiltration channel to an
arbitrary internet host, not only the database and cache.ipBlock: 0.0.0.0/0 peer with their namespaceSelector/podSelector so only
the real endpoints are reachable; keep a port-scoped rule only for an external
managed database.deploy/k8s/networkpolicy.yaml, docs/DEPLOYMENT.md.Ranked by value against effort:
Recommendation: implement item 1 next. It closes the largest plaintext disclosure; item 2 then reduces the cost of a future key compromise.
request_uri objects? This
decides whether item 3 needs a scoped egress rule or only documentation.