Can this protocol run on this target?
The application submits intent; the exact loaded package reports capability and effective backend. An API enum does not prove a provider exists.
Product knowledge · Advanced · Security boundary
Protocol selection, transport-peer authentication and business authorization are three separate decisions. CoAkka HTTP Runtime owns the first two at the HTTP edge; the application always owns the last.
01 · Three decisions
The application submits intent; the exact loaded package reports capability and effective backend. An API enum does not prove a provider exists.
The runtime validates TLS material, performs the handshake and fails closed when identity or trust is invalid.
The application combines verified peer facts with token, session and business policy to authorize a route and action.
TLS does not replace authorization. mTLS can prove that a client presented a trusted certificate, but Core does not decide which customer it represents or whether it may charge, read a record or call an administrative route.
02 · Security modes
| Mode | Server identity | Client identity | Listener material |
|---|---|---|---|
| Plaintext | None | None | TLS fields empty; credential generation is zero. |
| TLS | Client verifies server certificate | Not required | Nonzero generation, credential ID, certificate chain and private key. |
| mTLS | Client verifies server certificate | Server verifies client certificate | TLS material plus trust roots for client identity. |
When a reverse proxy terminates TLS, that proxy owns its certificate and rotation. Document whether the backend hop uses plaintext, TLS or mTLS; a successful proxy handshake does not prove CoAkka listener reload.
03 · Listener declaration
HTTP_1_1 is the portable baseline. Select HTTP/2 or HTTP/3 only when the exact package and target report that capability.partner-api; it contains no secret.listener intent
address + port
protocol + security mode
credential ID + generation
certificate chain + private key
trust roots (mTLS only)
↓ copy / freeze / validate / bind
accepted → effective listener facts
rejected → typed startup failure; never report ready
04 · Capability before configuration
Built-in baseline. Still verify handshake, response, bounds and resource return on the matching host.
Shared contract but feature-gated per target. Never infer support from an enum or package presence.
A security API does not make a provider appear. Unsupported combinations fail rather than silently downgrade.
Read the protocol and backend the runtime accepted. Linux io_uring is only for eligible HTTP/2/3 configurations, not an HTTP/1.1 label.
06 · Fail closed by stage
| Stage | Example | Safe conclusion |
|---|---|---|
| Startup | Malformed PEM, key mismatch, missing material, unsupported protocol/security | Listener is not ready; fix declaration, package or deployment. |
| Handshake | Unknown CA, expired/not-yet-valid certificate, name/policy mismatch, missing client certificate | Fail closed before the application handler. |
| Authorization | Verified peer lacks permission for the route or action | Application returns a safe refusal; transport identity may still be valid. |
| Reload | Stale generation or incomplete/invalid candidate | Refuse the candidate; preserve the old effective credential. |
| Rollout | New instance starts but handshake/request verification fails | Keep it out of ingress; the old instance continues serving. |
07 · Credential reload · SDK 2.3.0
This workflow applies to standalone listeners. Listener V1 has no mTLS or live credential reload in this release.
Use distinct paths for the chain, matching key and intended trust roots; never mutate files beneath the live listener.
Obtain the current generation from the running listener; do not guess the next number from local state.
Submit the complete set. A stale or invalid candidate is refused and the old effective state stays intact.
Perform a real handshake and request; for mTLS, verify both trusted-client acceptance and untrusted-client refusal.
Remove old deployment material only after retirement. Existing connections are not re-authenticated against new trust.
Changing a file is not reload. Overwriting a PEM, replacing a symlink, incrementing a generation or swapping a handler does not change a live listener's identity.
08 · Replacement service
prepare new service at a distinct endpoint
→ start and read effective facts
→ real handshake + request (+ negative mTLS case)
→ admit replacement to ingress
→ stop selecting old instance
→ finite close old service
→ remove old resources only after successful convergence
Use replacement when the package or listener lacks reload, or when changing address or protocol. Two services cannot be assumed to bind the same endpoint; a single process slot may cause interruption. This recipe does not promise zero downtime. A compromised credential may require terminating old sessions instead of a normal drain.
09 · Verification checklist