Skip to content

Allow explicitly declared preview query targets - #39

Merged
intel352 merged 1 commit into
mainfrom
feat/preview-query-target-20261010
Oct 10, 2026
Merged

intel352 merged 1 commit into
mainfrom
feat/preview-query-target-20261010

Conversation

@intel352

Copy link
Copy Markdown
Contributor

An explicitly approved preview link such as /contact?interest=voice-study cannot use scoped viewing because the current gate rejects every query. Add an optional finite per-tenant PreviewAccessQueryTargets ceiling, derived from validated host declarations. Only exact listed queried GET/HEAD targets can reach the existing callback; nil/default configuration continues rejecting queries.

Privately copy and validate the declarations. Reject encoded aliases, duplicate/unsorted keys, empty values, fragments, privileged paths and unbounded targets. The callback still verifies the complete target, exact tenant/origin/audience and current grant. Keep transport, bcrypt, Basic authentication, current domain ownership, credential stripping and private/no-store/noindex behavior.

Actual Gate tests cover exact GET/HEAD delivery with the original query preserved, absent/unlisted/other-tenant authority, malformed/framing/method requests, current callback revocation, immutable declarations and startup refusals. Existing strict no-query tests remain unchanged in behavior. Local verification is formatting and git diff --check; ordinary exact-head CI and independent source review are required before merge. No local Go/Docker/build, credential/grant/schema or hosted action occurred.

This follow-up is based on the actual CMS38 merged main b49dba3f5b8617cc71f8cc6a5c510d49a4e7de18. It grants no access by itself and needs matched Auth/current-grant and host target binding. Include the reviewed passing follow-up in the next stable CMS release before host adoption.

@intel352
intel352 marked this pull request as ready for review October 10, 2026 21:13
@intel352
intel352 merged commit 2d60611 into main Oct 10, 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