Skip to content

How to test origin-wide impacts of things like HSTS? #4880

Open

Description

@mikewest

I'd like to write some tests that verify the ordering of HSTS vs Mixed Content checks. To do so, I'd need to set a Strict-Transport-Security header on an origin, then try to load a resource from that origin to see what happens. In itself, trivial!

However, setting that header would effect every other file loaded from the origin (and would probably break things entirely due to the fact that we're not running on default ports).

Perhaps we could add a subdomain on which I could set this kind of policy? @jgraham, WDYT?

Activity

  1. foolip commented on Oct 4, 2017

    @foolip
    Member

    @mikewest is this blocking upstreaming of any tests? How is it tested in Chromium? Calling it backlog, but depending on impact and effort to implement could bump priority.

  2. mikewest commented on Oct 4, 2017

    @mikewest
    MemberAuthor

    We have some tests, yes, but upstreaming them isn't exactly on my priority list. Happy to backlog this.

  3. domenic commented on Dec 13, 2019

    @domenic
    Member

    Allowing tests to generate an origin used only for that test would help with #20773 which is relatively high impact and priority.

  4. foolip commented on Jan 16, 2020

    @foolip
    Member

    @stephenmcgruer can you retriage for priority?

  5. Hexcles commented on Mar 9, 2020

    @Hexcles
    Member

    I believe the introduction of the 100 subdomains (#21705, although intended for origin policy) alleviates the problem to some extent, so I'm downgrading this to backlog. Feel free to disagree.

    To be clear, adding 100 subdomains isn't a real "fix" for the problem, as we can imagine interactions between tests etc. that make 100 subdomains still insufficient, and adding a magnitude more of subdomains probably isn't a good idea, either.

  6. domenic commented on Mar 9, 2020

    @domenic
    Member

    If people start reusing the origin policy subdomains for other things, they might run those tests with an origin policy applied, which could skew the results. (E.g. disallowing inline scripts via CSP!)

  7. Hexcles commented on Mar 9, 2020

    @Hexcles
    Member

    That's a very good point... Thanks, @domenic !

    So no, if anyone happens to read this issue to look for solutions, don't reuse op*, and instead leave a comment to let us know your use case!

    Since "#20773 ... is relatively high impact and priority." but has been worked around and "upstreaming them [HSTS tests] isn't exactly on my priority list", I'm going to leave this as backlog for now.

  8. JannisBush commented on Apr 15, 2024

    @JannisBush
    Contributor

    There still seem to be 0 tests related to HSTS.

    Would it be possible to run some tests with their own test runner instance such that interactions with other tests would not matter?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions