Skip to content

feat(odsp-driver): support per-session request headers - #28140

Open
wilki-microsoft wants to merge 6 commits into
microsoft:mainfrom
wilki-microsoft:odsp-per-session-request-headers
Open

feat(odsp-driver): support per-session request headers#28140
wilki-microsoft wants to merge 6 commits into
microsoft:mainfrom
wilki-microsoft:odsp-per-session-request-headers

Conversation

@wilki-microsoft

@wilki-microsoft wilki-microsoft commented Sep 1, 2026

Copy link
Copy Markdown

Adds optional immutable HostStoragePolicy.requestHeaders and applies the values to ODSP HTTP requests and Node Socket.IO handshakes. Existing request headers win case-insensitive collisions, so hosts cannot replace driver-owned authorization or protocol headers. Header-bearing sockets are isolated per factory while reconnects from the same factory retain socket reuse.

Status: 309 CommonJS and 309 ESM tests pass. Driver and definitions builds, API reports, export checks, ESLint, Biome, and git diff --check pass. A separate final review found no significant issues.

This is a draft for ODSP-driver API and coverage review. Office Web Host and the consuming Whiteboard SDK still need to populate the policy in separate changes.

The current consumer is pinned to Fluid 2.30.x; if the API is accepted on main, it also needs an owner-approved 2.x backport or a validated consumer upgrade before activation.

wilki added 2 commits September 1, 2026 12:32
Apply immutable host attribution headers across ODSP HTTP and Node Socket.IO paths while preserving driver-owned header precedence and socket isolation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad526467-2d6a-4e98-baa3-39f92b8ee53c
Use a stable per-factory socket cache prefix when request headers are configured, retaining reconnect reuse while isolating factories.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad526467-2d6a-4e98-baa3-39f92b8ee53c
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added area: tools area: driver Driver related issues area: repo Repo related work area: website area: odsp-driver public api change Changes to a public API base: main PRs targeted against main branch labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (471 lines, 24 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

@wilki-microsoft

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

@wilki-microsoft
wilki-microsoft marked this pull request as ready for review September 1, 2026 20:00
@wilki-microsoft
wilki-microsoft requested a review from a team as a code owner September 1, 2026 20:00
Copilot AI lite review requested due to automatic review settings September 1, 2026 20:00
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@wilki-microsoft
wilki-microsoft marked this pull request as draft September 1, 2026 20:36
@wilki-microsoft
wilki-microsoft marked this pull request as ready for review September 1, 2026 20:37
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Comment thread packages/drivers/odsp-driver/src/requestHeaders.ts
wilki and others added 3 commits September 2, 2026 16:32
Document how host headers are sanitized, frozen, merged into ODSP fetches, and applied to Node Socket.IO handshakes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 15cbf0d1-2be0-4972-b4ed-e49bd805f37a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: driver Driver related issues area: odsp-driver area: repo Repo related work area: tools area: website base: main PRs targeted against main branch public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants