Skip to content

docs(spaces): document space-path cookie scoping and __Host- restriction - #1288

Open
maartenba wants to merge 5 commits into
mainfrom
mb/gaps/spaces-cookies
Open

maartenba wants to merge 5 commits into
mainfrom
mb/gaps/spaces-cookies

Conversation

@maartenba

Copy link
Copy Markdown
Member

No description provided.

@maartenba maartenba added this to the 2026-Q4 milestone Oct 26, 2026
@maartenba
maartenba requested review from Erwinvandervalk and StuFrankish and a balanced review from Copilot October 26, 2026 09:13
@maartenba maartenba self-assigned this Oct 26, 2026
@maartenba maartenba added the documentation Improvements or additions to documentation label Oct 26, 2026

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.

🟡 Changes recommended

The origin-only path guidance needs correction because it can lead to cookie configurations that throw under non-root hosting paths.

1 open issue
What changed in this PR

This PR documents how IdentityServer Spaces scopes cookies and how path-based hosting affects cookie-prefix compatibility.

Changes:

  • Explains space-path cookie scoping and which cookies are affected.
  • Documents the __Host- restriction and recommends __Secure- for non-root paths.
  • Clarifies middleware ordering requirements and updates the page date.
File Description
astro/​src/​content/​docs/​identityserver/​spaces/​index.mdx Adds cookie-scoping guidance, prefix restrictions, and middleware-ordering requirements.

Review effort: Balanced

maartenba and others added 2 commits October 26, 2026 10:24
Clarify how IdentityServer handles cookies for spaces matched by origin.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 12:21

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.

🟡 Changes recommended

The rollout guidance incorrectly implies that cookie path scoping forces reauthentication, even though existing Path=/ cookies continue to be sent to every space path.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 2, 2026 12:25

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.

🔵 Needs a closer look

Human assessment is needed because the cookie-path exception appears inconsistent with the documented behavior for origin-only spaces hosted under a nonempty PathBase.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 2, 2026 12:31
@maartenba

Copy link
Copy Markdown
Member Author

Re the __Host- / PathBase inconsistency: confirmed against IdentityServerCookieBuilder at tag is-8.1.0-preview.6. ValidateHostPrefixCompatibility throws whenever the resolved cookie path is not exactly /, so a non-empty PathBase triggers it too, including for origin-only spaces and apps without Spaces. Fixed in 9e81531:

  • The caution title now says "with a non-root cookie path" instead of "with path-based spaces".
  • It explicitly lists origin-only spaces and apps without Spaces under a non-empty PathBase.
  • The quoted exception text is now introduced as "The message starts with", because the real message continues with remediation text.

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.

🟢 Approval recommended

There are no active review issues for the documentation changes covering space-scoped cookies and deployment considerations.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants