NTNT 0.6.3 verifies the database behind the encryption

A padlock can tell you that a conversation is private. It cannot, by itself, tell you who is listening at the other end.

That distinction matters when an application connects to a database. Encryption can stop a passerby from reading the traffic, while still delivering the traffic beautifully encrypted to an impostor. PostgreSQL's own documentation separates those jobs: encryption protects against eavesdropping; certificate and hostname verification protect against a server pretending to be the one you intended.

NTNT 0.6.3 makes that separation explicit for PostgreSQL, Redis and Valkey connections. It is a security release rather than a parade of new syntax, and its most useful feature is a refusal to call two different promises the same thing.

Encrypted is not the same as verified

For a remote PostgreSQL host, an NTNT connection string without an sslmode now defaults to verified TLS. The runtime checks the certificate chain and confirms that the hostname in the connection string matches the certificate. Localhost, loopback addresses, Unix sockets and single-label local service names such as db keep their previous local behavior.

The explicit modes say what they mean. verify-full checks the chain and hostname. verify-ca checks the chain but not the hostname. require encrypts without verifying identity, and disable stays plaintext. NTNT rejects prefer and allow because both can fall back to an unencrypted connection.

postgresql://[email protected]/app?sslmode=verify-full

Redis gets a smaller vocabulary with the same sharp edge. A rediss:// or valkeys:// URL now means verified TLS against the host certificate store. The ordinary redis:// and valkey:// forms remain plaintext. The version-pinned runtime guide also spells out connection deadlines, CA handling and the cases that still require a restart after trust roots change.

The same boundary appears elsewhere

The release fixes authentication rules that could disagree with the router about paths such as //admin, and it prevents an application's .env file from changing process-execution or outbound-network policy after the runtime starts. Cloud metadata addresses stay blocked even when an application allows other private addresses. The common idea is pleasantly strict: application input can choose behavior inside the policy, but it cannot quietly rewrite the policy itself.

Safe Markdown now follows that idea too. I downloaded the published Linux x64 archive, verified its supplied checksum, and ran NTNT 0.6.3 against three links (the data URL is shortened here):

import { to_html_safe } from "std/markdown"

print(to_html_safe("[reset password](javascript:alert(1))"))
print(to_html_safe("[release notes](https://github.com/ntntlang/ntnt/releases/tag/v0.6.3)"))
print(to_html_safe("![tracking pixel](data:image/gif;base64,...)"))

The unsafe link became plain text, the HTTPS link remained a link, and the data-URL image was reduced to its alt text:

<p>reset password</p>
<p><a href="https://github.com/ntntlang/ntnt/releases/tag/v0.6.3">release notes</a></p>
<p>tracking pixel</p>

That probe checks the published binary's Markdown behavior, not the database TLS path. The release also updates the SMTP library behind std/email to a version that fixes six advisories, including a STARTTLS response-injection flaw and an SMTP command-injection flaw.

There are upgrade consequences. Remote PostgreSQL connections that relied on plaintext or unverified TLS may now fail until their connection strings and certificates say what the deployment actually intends. Some PostgreSQL and Redis waits still lack complete deadlines, and a failed development hot reload can still expose routes without auth middleware. The release notes name those limits rather than burying them below the padlock.