-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add infrastructure for testing origin policy #21705
Conversation
This kind of change requires an RFC since it affects integrators. |
RFC made: web-platform-tests/rfcs#44 |
Thanks |
I'll rebase this in the hopes that maybe the CI will start being green... |
This adds 99 new subdomains for testing origin policy on, without interfering with other tests. It also configures `/.well-known/origin-policy` to use a Python script handler, instead of a static file handler, to allow varying responses. Closes #20773. RFC: web-platform-tests/rfcs#44
It looks like there's a meaningful failure in the unitests:
Also I think we need to regenerate the certificate so that the domains work over https. I do not at this moment remember the right way to do that, but I'll try to. |
f6464d1
to
9403b42
Compare
Oh dang, thanks, I never know when the CI actually has errors versus sporadic failures. I'm not sure how to fix that test... it seems like this legitimately causes a config to exceed a limit. I'll poke around, but ideas would also be welcome. |
186d18f has docs on how to regenerate the certs. The length limit here seems to be a windows limitation with environment variables. I guess we could do something mad, like allow the value to be spread over multiple environment variables and piece them back together. I don't know if there's a more sane suggestion. |
What's that line from BSG? "All this has happened before, and all this will happen again"? #12461 is the last time this happened. We tried to add ~300 subdomains, and hit the same environment variable problem. At the time, the fix was to just add less. We seem to dump the config as JSON in That said, https://devblogs.microsoft.com/oldnewthing/?p=15083 implies that the entire block of env variables has a shared limit, so that may not even help. Backing up a bit however, perhaps we can just drop some of the bigger bits of data when setting WD_SERVER_CONFIG? If this is only used for webdriver tests (ohhh thats what the WD stands for), does webdriver need the expanded list of subdomains? |
This is worth trying. I don't currently have any plans to use web driver stuff in origin policy tests, so hopefully it'll be OK. Thanks for the pointer to the code; that's invaluable information for trying to make this work. |
All checks have passed, woohoo!! Ready for review... I imagine my Python could probably use some critiquing. |
tools/wptserve/wptserve/config.py
Outdated
def as_dict_for_wd_env_variable(self): | ||
result = self.as_dict() | ||
|
||
for key in [("subdomains",), ("domains", "alt"), ("domains", ""), ("all_domains", "alt"), ("all_domains", ""), ("domains_set",), ("all_domains_set",)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing colon at the end of this line is causing CI failures.
Woohoo! Thanks for following through with it, Domenic! |
This CL cherry picks the core part of web-platform-tests/wpt#21705 into blinkpy. See README.chromium for more context. Bug: 1042034 Change-Id: I9045c9e2987ef4b22e722f934d23037635000874 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064783 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Robert Ma <[email protected]> Cr-Commit-Position: refs/heads/master@{#742854}
This adds 99 new subdomains for testing origin policy on, without interfering with other tests. It also configures
/.well-known/origin-policy
to use a Python script handler, instead of a static file handler, to allow varying responses. Closes #20773.RFC: web-platform-tests/rfcs#44