Skip to documentation
KonclaveDocumentationSource snapshot · Apache 2.0
Browse documentation

Harness attestation provider contract

Issue #141 asks what a harness must expose before Konclave can truthfully issue HarnessAttested grants. ADR 0019 owns the decision. This page records the...

GuideSource revision 8d0d3676e9fcView authoritative source

Repository-relative paths and “this checkout” refer to the Konclave source repository, not this website. The source link above identifies the exact revision used here.

On this page

Issue #141 asks what a harness must expose before Konclave can truthfully issue HarnessAttested grants. ADR 0019 owns the decision. This page records the public API survey, normalized provider contract, lifecycle matrix, conformance cases, and the smallest upstream capability request.

The research baseline is 2026-09-13. Konclave currently packages @github/copilot-sdk 1.0.11 from commit a550258d5c37bd662197536992a23d633bfe5804. Public surfaces can change, so a provider implementation must re-run this survey against its pinned harness version. The public SDK 1.0.13 release and public main at f45c46fd1812f8bed5b4cbc250f47177c83068f0 were also checked; neither exposes a verifier-facing session-attestation or challenge-signing contract.

Finding

No inspected local harness API currently satisfies ADR 0019.

The available session identifiers and lifecycle events are useful for continuity under AccountTrusted, but they are not signed, challenge-bound evidence. Konclave must not relabel them as HarnessAttested.

This conclusion is limited to the documented public surfaces and source revisions listed below. A private or future vendor API may provide stronger guarantees, but it cannot be integrated until those guarantees and verifier inputs are public and testable.

Public capability matrix

Wide tables scroll horizontally.

SurfaceVerified public capabilityMissing for HarnessAttestedCurrent classification
Copilot CLI extensionSeparate child process; joinSession() reads SESSION_ID; SDK events expose start/resume, session ID, remote-steerable state, extension discovery, and subagent event IDsNo public challenge-signing API, verifier key set, assertion expiry/revocation contract, or host-computed extension digestAccountTrusted only
Copilot SDK embedding hostCan create/resume sessions and declare caller metadata for telemetry/host attributionCaller-declared identity is not authentication; no extension-callable signed exact-session assertionNot evidence
Claude Code local hooks/pluginsHook JSON includes session_id, lifecycle source, tool metadata, and subagent eventsLocal hook input is unsigned and available to same-account code; no challenge/session-key bindingAccountTrusted only
Claude Code self-hosted cloud sessionAnthropic-signed ES256 JWT identifies one session, environment, organization, and creator through published JWKSExportable bearer token; no Konclave nonce, service, profile, ephemeral key, capability, or loaded-extension bindingCandidate provider-specific workload/session-origin input, not sufficient as-is
Codex app-serverThread lifecycle; experimental client-supplied opaque token for upstream x-oai-attestationattestation/generate takes no caller challenge and publishes no general local verification contractNot sufficient as-is
Codex native user verificationPlatform ceremony signs a caller challenge with a registered P-256 credentialProves user presence, not harness/session or extension identityCandidate UserPresence provider

Why the current Copilot path is not attestation

The Copilot extension entry calls joinSession(). In SDK 1.0.11 that function reads the plain SESSION_ID environment variable, creates a parent-process JSON-RPC client, and resumes the named session. ToolInvocation carries sessionId, toolCallId, tool name, and arguments. Lifecycle events add useful facts such as start versus resume and subagent instance identifiers.

Those values originate from the host process, but the SDK exposes no signed artifact that another local service can verify. The extension also receives no host-computed digest of the code actually loaded. A same-account process can set an environment variable, copy metadata, or run modified extension code. Process ancestry and installation paths are similarly observations, not cryptographic proof.

This is sufficient for the existing, explicit AccountTrusted contract. It is not a failure of that contract; it is the reason a stronger evidence name must remain unavailable.

Provider-neutral challenge

konclave.harness-attestation.challenge.v1 is a logical, provider-independent value. This contract freezes its canonical encoding and initial deterministic vectors before any provider is enabled.

Wide tables scroll horizontally.

FieldBoundPurpose
versionExact value 1Prevent cross-version interpretation
nonce32 random bytes, one usePrevent replay
connection_id16 random bytesBind the proof to one provisional connection
audienceExact ASCII konclave.local-servicePrevent cross-protocol reuse
installation_fingerprint32 bytesPrevent cross-installation reuse
local_service_public_key32 bytesBind the authenticated service identity
request_id16 bytesBind durable idempotent issuance
session_public_key32-byte Ed25519 public keyBind proof of possession
harnessClosed HarnessKindPrevent relabeling
capabilitiesClosed nonzero bitsetPrevent privilege expansion
extension_policyBounded configured identifierSelect approved extension identity rules
issued_atUnsigned millisecondsBound freshness
expires_atGreater than issued_at, within provider maximumBound challenge lifetime

The extension passes the service-issued challenge unchanged. It never supplies a profile, session subject, lifecycle, extension identity, evidence kind, issuer identity, or verified outcome.

Canonical challenge bytes begin with utf8("konclave.harness-attestation.challenge.v1") || 0x00, then encode the table fields in order. Integers are unsigned big-endian. Variable ASCII or UTF-8 fields use an unsigned two-byte big-endian length followed by their exact bytes. Version and harness use two bytes; capabilities and timestamps use eight bytes. The assertion binds the SHA-256 digest of these complete bytes. The provider-specific assertion carrier is not part of the 279-byte challenge vector.

The owner-restricted local service may issue this challenge before authorization, but the client first verifies the pinned service signature. The assertion is accepted only on the same live provisional connection that received the challenge and proves the challenged ephemeral private key. The extension obtains and submits its own challenge internally; it never exposes attestation through a model tool, command, hook result, or signing oracle. Challenge issuance allocates no profile runtime, performs no profile side effect, and is bounded globally and per connection. Disconnect or service restart discards the pending challenge.

Provider identifiers and extension policy identifiers are at most 64 canonical ASCII characters. Each provider declares tighter maxima for signing-key identifiers, opaque session subjects, session instances, source-qualified extension identifiers, and assertion carriers beneath global ceilings of 1 KiB per field and 64 KiB per assertion. Challenge and extension digests are exactly 32 bytes. Challenges expire within 60 seconds. Each provider declares a finite assertion lifetime and clock-skew tolerance; zero skew is the default, and uncertainty outside that tolerance fails closed. Grants never outlive their authorizing assertion.

Normalized verified assertion

A provider adapter accepts an opaque signed carrier and returns this closed shape only after verification:

Code example
VerifiedHarnessAttestation
- contract version
- provider identifier and signing-key identifier
- exact challenge digest
- opaque session subject
- fresh session-instance identifier
- lifecycle: new | resume | fork
- optional parent-subject digest for fork
- exact harness kind
- source-qualified extension identifier
- loaded extension version when known
- SHA-256 digest of the extension code the host executed
- assertion issued-at and expiry
- provider revocation/generation metadata

The local service independently compares the normalized claims with its pending connection-bound challenge and provider policy. It derives the installation-local profile from the verified session subject; the caller does not provide a profile to this flow. Only this successful comparison adds HarnessAttested to the evidence set used by ordinary grant issuance.

Provider adapters own token syntax, certificate chains, JWKS parsing, and vendor claims. The local-service grant protocol consumes only normalized validated claims.

The provider boundary is equivalent to:

Code example
createChallenge(sessionPublicKey, requestedCapabilities)
  -> PendingHarnessChallenge

verifyAssertion(pendingChallenge, opaqueAssertion, now)
  -> VerifiedHarnessAttestation | finite failure

issueGrant(verifiedAttestation)
  -> exact-profile SessionGrant with HarnessAttested evidence

The verifier derives the expected profile as:

Code example
session- + first_24_hex(
  SHA-256(
    utf8("konclave.harness-profile.v1") || 0x00 ||
    installation_fingerprint_32 ||
    u16_be(provider_identifier_utf8_length) || provider_identifier_utf8 ||
    u16_be(session_subject_length) || session_subject
  )
)

This keeps a provider subject stable across resume while preventing it from becoming a cross-installation identifier. The service returns the derived profile with the grant, so new and forked sessions do not need to know their subject in advance. Providers should scope subjects to the relying application or organization when possible; Konclave does not require a human email or globally correlatable account identifier. The verifier discards the raw subject after validation and derivation; durable state retains only the installation-local profile.

The initial deterministic derivation vector is:

Wide tables scroll horizontally.

InputValue
Installation fingerprint32 bytes of 0x11
Provider identifierUTF-8 github-copilot
Session subjectUTF-8 session-example
SHA-256 digestdffe52852461b2e6a99f832aa1143a387ec8e69f30284f1aa4511890af92ae06
Derived profilesession-dffe52852461b2e6a99f832a

The initial challenge-digest vector uses version 1, 32 bytes of 0x22 for the nonce, 16 bytes of 0x66 for the connection identifier, audience konclave.local-service, 32 bytes of 0x11 for the installation fingerprint, 32 bytes of 0x33 for the service public key, 16 bytes of 0x44 for the request identifier, 32 bytes of 0x55 for the session public key, Copilot harness wire value 1, capabilities 15, extension policy github-copilot:konclave, issued-at 1700000000000, and expiry 1700000060000. The encoded challenge is 279 bytes and its SHA-256 digest is 5dddc0fcefedbfa7e0eb5c86da75338cb75c921d878113c8c9e0d2cc6c1cc664.

Provider key disablement uses the existing durable issuer lifecycle. New assertion verification fails after disablement, while existing grants follow the configured retain-or-revoke disposition and the daemon’s existing one-second observation bound. Extension policy pins an exact loaded-code digest or a signed publisher provenance chain that resolves to that digest. File paths, manifests, names, and caller-declared versions remain diagnostics.

Lifecycle requirements

Wide tables scroll horizontally.

LifecycleSubjectInstance and keyRequired outcome
NewNewNewNew profile and grant
ResumeSameNewSame profile; fresh assertion and grant
Extension/CLI restart with resumeSame only when host attests resumeNewNever recover continuity from local metadata alone
ForkNew; parent digest optionalNewNew profile; parent context grants no authority
Remote controlSame root sessionExisting or renewedRemote controller metadata does not widen authority
Parent-owned subagent tool callParentParentNo independent grant
Independently addressable subagentNew signed subjectNewSeparate profile/grant; missing identity denies
Cross-machine migrationProvider subject may persistNew and installation-boundNo silent device/profile migration

Required verification order

  1. Parse within provider-specific size and structure bounds.
  2. Require an allowlisted algorithm and registered signing key.
  3. Verify the signature before trusting claims.
  4. Verify provider, key validity, audience, and installation binding.
  5. Match the exact challenge digest and require the nonce to remain pending.
  6. Verify the matching live provisional connection identifier and proof of the challenged ephemeral private key.
  7. Check challenge and assertion time windows.
  8. Check harness, extension identity/digest, session key, and capabilities.
  9. Validate lifecycle and parent relationships.
  10. Apply provider revocation/generation state.
  11. Atomically consume the nonce and issue the ordinary exact-profile grant.

Any failure returns a finite unavailable, invalid, expired, replay, or unauthorized result. Missing provider support returns required_evidence_unavailable. No path falls back to AccountTrusted.

If the grant response is lost, an exact retry reuses the same issuer request identifier and assertion digest and returns the recorded grant. A different request or assertion cannot reuse the consumed challenge.

Deterministic conformance cases

A future provider must freeze canonical challenge bytes and provider assertion vectors for at least these cases:

Wide tables scroll horizontally.

CaseExpected result
Exact challenge and valid assertionAccept once
Same assertion and consumed nonceReplay rejection
Assertion submitted on another provisional connectionConnection-binding rejection
Different local-service audienceAudience rejection
Caller injects a profile into the attestation requestInvalid request
Issued grant names a profile other than the derived profileProfile substitution rejection
Different ephemeral session keyKey mismatch
Expanded capability bitsetCapability mismatch
Challenge or assertion expiredExpired
Unknown key or disallowed algorithmUntrusted issuer
Loaded extension digest differs from policyExtension mismatch
Resume changes session subjectLifecycle mismatch
Fork reuses parent subjectLifecycle mismatch
Missing independent subagent identityEvidence unavailable
Remote-control metadata claims extra authorityIgnore metadata; no authority increase
Unknown normalized claim or enumInvalid assertion

Vectors use fixed keys, timestamps, nonces, identifiers, and expected finite outcomes. Provider-generated signatures are checked byte-for-byte only when that provider defines a canonical signature representation.

Smallest Copilot CLI capability request

Konclave needs one supported extension API:

Code example
const assertion = await session.attest({
  contractVersion: 1,
  nonce,
  connectionId,
  audience,
  installationFingerprint,
  localServicePublicKey,
  requestId,
  sessionPublicKey,
  requestedCapabilities,
  expectedExtensionPolicy,
});

The CLI must:

  • fill session subject, instance, lifecycle, optional fork parent, harness, and loaded extension identity/digest itself;
  • sign the complete challenge and host claims with a key unavailable to the extension and arbitrary same-account processes;
  • return a bounded, short-lived assertion with a unique identifier;
  • publish an authenticated verification-key and rotation contract usable by local services;
  • document behavior for new, resume, fork, extension reload, remote control, subagents, and migration; and
  • fail explicitly when the current platform or account cannot produce the assertion.

The API may perform outbound vendor verification. An offline mode is valid only when the host has a platform-protected signing key and the verifier has a still-valid authenticated key set. Returning SESSION_ID, caller-declared clientInfo, an unsigned object, or an exportable bearer token is insufficient.

No upstream issue is opened from this repository. This request is intentionally kept as a public, sanitized specification until a maintainer chooses the appropriate vendor channel.

Requirements for other integrations

  • Claude Code local and IDE surfaces: require a challenge-bound host signature, not the local session_id, transcript path, plugin manifest, or hook origin.
  • Claude self-hosted environments: treat the signed session JWT as provider-specific workload or session-origin input. To become HarnessAttested, add proof-of-possession or a token exchange that binds the Konclave challenge, session key, profile, capabilities, and loaded extension.
  • Codex CLI and app-server: an opaque x-oai-attestation token is insufficient without a documented verifier and caller-bound challenge. Native userVerification/verify belongs to UserPresence.
  • IDE integrations: the editor or extension host must fill and sign the actual loaded extension identity. Caller-declared clientInfo, extension names, or paths remain diagnostics.
  • Workload integrations: use WorkloadIdentity when the proof establishes an isolated workload principal rather than a harness session. Do not rename workload evidence to HarnessAttested.

Sources

GitHub Copilot

Claude Code

Codex

Content: Konclave,Apache-2.0. Revision: 8d0d3676e9fc746749a4fc04ddeb4499023c4104.