Skip to content

Retain the CreateSession server certificate for the Session's lifetime - #1955

Merged
kevinherron merged 1 commit into
integration/1.2from
fix/session-original-server-certificate
Sep 9, 2026
Merged

Retain the CreateSession server certificate for the Session's lifetime#1955
kevinherron merged 1 commit into
integration/1.2from
fix/session-original-server-certificate

Conversation

@kevinherron

Copy link
Copy Markdown
Contributor

Part 4 5.7.3.1 binds ActivateSession client signatures and encrypted token secrets to the serverCertificate returned by CreateSession. The server verified and decrypted against the endpoint's current certificate or the carrying channel's, so a Session retained across a server certificate rotation could not be reactivated with credentials on a replacement SecureChannel.

Sessions now capture the CreateSession certificate, chain, and key pair at creation and use them for client signature verification, user token decryption, X509 token signature checks, and enhanced user-token key selection. A Session created on an unsecured channel still uses the carrying channel's certificate.

This is the server half of #1949, split out because it is an independent server correctness fix that benefits any client reactivating a retained Session after rotation. #1949 will be rebased onto this branch; its rotation integration test exercises credential reactivation against a live server and depends on this change.

Part 4 5.7.3.1 binds ActivateSession client signatures and encrypted
token secrets to the serverCertificate returned by CreateSession. The
server verified and decrypted against the endpoint's current certificate
or the carrying channel's, so a Session retained across a server
certificate rotation could no longer be reactivated with credentials on
a replacement SecureChannel.

Capture the CreateSession certificate, chain, and key pair when the
Session is created and use them for signature verification, user token
decryption, X509 token signature checks, and enhanced user-token key
selection. A Session created on an unsecured channel still uses the
carrying channel's certificate.
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no actionable correctness or security defects identified in the changed behavior.

Summary

  • Adds immutable per-session access to the original server certificate context.
  • Uses retained material for ActivateSession client signatures, token-secret decryption, X.509 token signatures, and enhanced user-token key signing.
  • Preserves carrying-channel behavior for sessions created without SecureChannel certificate material.
  • Updates identity-validator tests and package-level lifecycle documentation.

Diagram

sequenceDiagram
    participant C as Client
    participant S as SessionManager
    participant SS as Session
    participant V as IdentityValidator
    C->>S: CreateSession over certificate A
    S->>SS: Capture certificate A, chain, and key pair
    S-->>C: CreateSessionResponse with certificate A
    Note over S,SS: Server rotates to certificate B
    C->>S: ActivateSession on replacement SecureChannel B
    S->>SS: Read original certificate A
    S->>S: Verify client signature using A and channel B bindings
    S->>V: Validate/decrypt user token
    V->>SS: Use retained certificate A and key pair
    V-->>S: Valid identity
    S-->>C: ActivateSessionResponse
Loading

@kevinherron
kevinherron added this pull request to stack #1956 September 8, 2026 23:54
@kevinherron
kevinherron merged commit a2cf9e0 into integration/1.2 Sep 9, 2026
4 checks passed
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.

1 participant