Skip to content

ohttp: add an AEAD suite policy for ingress and egress - #310

Merged
imlk0 merged 3 commits into
masterfrom
ohttp-aead-suite-policy
Nov 5, 2026
Merged

imlk0 merged 3 commits into
masterfrom
ohttp-aead-suite-policy

Conversation

@imlk0

@imlk0 imlk0 commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Adds ohttp.aead_suites, an ordered HPKE AEAD allowlist on both sides.

  • egress: the list drives both the advertised key config and the decapsulation allowlist. A disallowed suite returns HTTP 422 so a TNG ingress refetches its key config. This also covers keys issued before a policy change and keys synced from a peer_shared peer.
  • ingress: the list is an allowlist and a client preference order. The ingress picks the first server key config with an intersection, then the first suite in its own order. The metadata hint and status public key come from that selected config. No intersection fails the key fetch, with no fallback.
  • Unset keeps existing behavior. The egress default now advertises AES-256-GCM as well.
  • Adds AES-256-GCM to both ohttp HPKE backends and pins the fork to 2ec8816.

cargo build --locked and make clippy pass locally; CI runs the tests.

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@imlk0
imlk0 force-pushed the ohttp-aead-suite-policy branch from 675c5b5 to 663b390 Compare November 5, 2026 07:07
@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@imlk0
imlk0 force-pushed the ohttp-aead-suite-policy branch from 663b390 to 90a5284 Compare November 5, 2026 07:11
@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@imlk0
imlk0 force-pushed the ohttp-aead-suite-policy branch from 90a5284 to 13f8887 Compare November 5, 2026 08:00
@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

imlk0 added 3 commits November 5, 2026 16:58
The fork's tng branch now carries AES-256-GCM in both HPKE backends and the explicit-suite constructors the ingress policy uses. The pin also picks up d2c5e38, which was already on the branch.

Assisted-by: Claude:fable-5
Add an ordered ohttp.aead_suites allowlist. On the egress it drives both the advertised key config and the decapsulation allowlist. A disallowed suite returns HTTP 422 so a TNG ingress refetches its key config, and the check also covers keys issued before a policy change and keys synced from a peer_shared peer.

On the ingress the list is an allowlist and a client preference order. The ingress picks the first server key config with an intersection, then the first suite in its own order. The selected config drives the metadata hint and the status public key. No intersection fails the key fetch, with no fallback. Not setting the field keeps the previous behavior.

Include AES-256-GCM in both ohttp HPKE backends, unit and integration tests, and the configuration and changelog documentation.

Assisted-by: Claude:fable-5
Both rules come from the OHTTP AEAD suite policy review. A name must match the value space it selects, and an invariant belongs to the type that owns it rather than to a global config pass.

Assisted-by: Claude:fable-5
@imlk0
imlk0 force-pushed the ohttp-aead-suite-policy branch from 13f8887 to 0f97f74 Compare November 5, 2026 09:01
@imlk0
imlk0 merged commit 0f97f74 into master Nov 5, 2026
@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@imlk0
imlk0 deleted the ohttp-aead-suite-policy branch November 5, 2026 09:01

This branch was previously deployed

1 inactive deployment
github-pages — 0f97f744 Deployed Nov 5, 2026 by imlk0 via Deploy demo to GitHub Pages #766
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants