Skip to content

Add host-verified invocation authentication to V10 - #5892

Draft
cloutiertyler wants to merge 53 commits into
tyler/http-handler-authfrom
tyler/v10-abi-extensions
Draft

cloutiertyler wants to merge 53 commits into
tyler/http-handler-authfrom
tyler/v10-abi-extensions

Conversation

@cloutiertyler

@cloutiertyler cloutiertyler commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Description of Changes

Makes sender_auth.is_internal() mean that the host invoked the function, rather than guessing from the absence of a client connection ID. A client call without a connection ID must still be treated as external. This is a prerequisite for container hosting: a container can call reducers as its database's identity without receiving the privileges of the host itself.

The host now records whether each reducer or procedure call is internal. A new syscall exposes that flag to the Rust, TypeScript, C#, and C++ module libraries, which use it to construct the call's authentication context, including inside procedure transactions.

Modules also declare a hosted_auth_v1 marker to indicate that they implement these rules. The container-hosting PR will use it to reject modules built with older libraries that still infer internal status from connection IDs. This PR adds the marker; it does not yet enforce that container requirement.

Includes the separate HTTP handler fix #5978 and C++ JWT-reading fix #5977, which should merge first. Private companion: #3941. Function visibility changes are separate in #5958.

API and ABI breaking changes

Extends V10 with the authentication syscall and module marker. Newly compiled modules require an updated host. This does not introduce V11 or change visibility defaults or V9 schema exports.

is_internal() and has_jwt() become independent: an internal call can have a JWT. JwtClaims::identity() returns the sender identity verified by the host instead of deriving it from the token's claims. The HTTP-handler behavior change is covered separately in #5978.

Rollback safety impact

Requires merged ENV #5887. Before rolling back to an older host, restore module builds that do not use the new syscall or marker.

Expected complexity level and risk

3/5. Changes the authentication information modules use to authorize calls. Lifecycle functions remain restricted to host invocation.

Testing

Rust, TypeScript, C#, and C++ authentication tests cover external and internal calls and transaction contexts. Wasm/V8 invocation tests and the downstream container-call authentication and revocation test have passed.

Keep ENV metadata at section 15 and move draft capabilities to section 16. Regenerate module-library definitions together and preserve explicit host authority through canonical procedure namespace resolution.
Keep ENV imports at Wasm10.6 and JS2.2 and move invocation authority
to Wasm10.7 and JS2.3. Preserve Environment15 and Capabilities16.

Carry the reviewed sealed Rust ENV trait, module-library fixes, and
CLI extraction/output changes. Preserve .NET10 NativeAOT linkage for
the authorization import alongside ENV.

Validated all five actual ENV cases, actual Wasm and V8 authority
checks, four module libraries, Rust compile diagnostics, and scoped lint.
@cloutiertyler
cloutiertyler force-pushed the tyler/v10-abi-extensions branch from 384c9c0 to 8a1b09e Compare September 12, 2026 01:18
@cloutiertyler
cloutiertyler force-pushed the tyler/v10-abi-extensions branch from dee6d8d to f8684bb Compare September 12, 2026 02:06
@cloutiertyler
cloutiertyler force-pushed the tyler/environment-variables branch from 6972d73 to b7adb97 Compare September 12, 2026 02:06
@cloutiertyler
cloutiertyler changed the base branch from tyler/environment-variables to master September 18, 2026 03:47
@cloutiertyler cloutiertyler changed the title Extend V10 function visibility and host invocation authority Add host-verified invocation authentication to V10 Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we even changing this file at all?

@cloutiertyler
cloutiertyler changed the base branch from master to tyler/cpp-jwt-source-read September 24, 2026 12:12
@cloutiertyler
cloutiertyler changed the base branch from tyler/cpp-jwt-source-read to tyler/http-handler-auth September 24, 2026 14:42

This branch has not been deployed

No deployments
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.

3 participants