IBX-12493: Treated CI web origins as secure contexts in browser tests - #203
Merged
Conversation
Chrome reaches the site as http://web (http://varnish on Varnish setups). Neither is a secure context, so secure-only browser APIs such as crypto.randomUUID() do not exist there and code relying on them crashes before any scenario can exercise it. Chrome's own switch --unsafely-treat-insecure-origin-as-secure marks those two origins as trustworthy without changing the docker stack. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
alongosz
added a commit
to ibexa/headless
that referenced
this pull request
Sep 9, 2026
Points browser tests at the Behat config that treats http://web and http://varnish as secure contexts, so the AI Assistant bundle runs instead of crashing on crypto.randomUUID. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
alongosz
marked this pull request as ready for review
September 10, 2026 09:26
alongosz
requested review from
KamilSznajdrowicz,
barbaragr,
juskora,
katarzynazawada,
micszo,
pawlakadrian and
tomaszszopinski
September 10, 2026 09:27
micszo
approved these changes
Sep 10, 2026
KamilSznajdrowicz
approved these changes
Sep 10, 2026
tomaszszopinski
approved these changes
Sep 10, 2026
pawlakadrian
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Related PRs:
Description:
Browser tests drive Chrome against
http://web(orhttp://varnish). Neither is a secure context, so secure-only browser APIs are simply absent there. First victim:crypto.randomUUID()used by@ibexa/ai-assistant-ui. With ibexa/headless#303 every admin page in CI logsTypeError: crypto.randomUUID is not a functionand the AI Assistant dies in its error boundary, so nothing actually tests it. See the JS console errors in job 102164857371.--unsafely-treat-insecure-origin-as-secure=http://web,http://varnishto the Chrome args inbehat_ibexa_oss.php. It's Chrome's own switch for exactly this case: comma-separated origins, exact scheme/host/port match (network_switches.cc). nginx, Varnish and Symfony keep speaking plain HTTP, only the browser treats the origin as trustworthy.Checked on a local Headless 6.0 instance served over HTTPS: the assistant renders and
crypto.randomUUID()works, so the real code path is fine. CI just never exercised it.Note
The alternative is real TLS in the docker stack (ibexa/docker, recipes,
WEB_HOST, Chrome cert flags, forwarded-proto). Much bigger change and, as far as the JS is concerned, it tests nothing more than this flag does. WDYT?For QA:
Review. After merge, ibexa/headless#303 browser tests should show no
randomUUIDconsole errors. The Taxonomy failure there is a separate issue (the AI Assistant's hidden tag-picker modal matchesTagPicker::confirm()'s XPath first).Documentation:
No documentation required.
🤖 Generated with Claude Code