-
Notifications
You must be signed in to change notification settings - Fork 181
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
Tighten security scope by port #873
Comments
do you mean to say "... and port if the port is not the default port for the scheme." ? |
The idea @jeisinger had for cookies/ |
@annevk you are referring to issue whatwg/html#2792 ? |
Yes! Thanks for finding that. |
What is the reason to allow viewing |
We don't want to allow |
@equalsJeffH Any chance to triage this yet ? |
@annevk wrote in #873 (comment)
Could you please explain further, I dont understand this part. thx. |
Port 443 matches 443, non-443 matches non-443. |
@annevk Does not seem to be anything we can do this release/level moving to next level |
pivoting back here, sorry for the lag... Ok, so I think I understand now what @annevk is asking for, if this clarification is correct: by this..
.. @annevk actually means:
Essentially, IIUC, it is to add a port restriction to the RP ID matching algorithm, which is summarized in the RP ID's definition's Note:, to be:
In the above I've invented a notation to denote an RP ID as a {effective domain, port} pair, which is what we would need to change RP ID to be in order to effect what @annevk is asking. @annevk in orig post:
yeah, it'd be a pretty big breaking change at this point for the spec and for implementations. I agree with moving this to Level 2 milestone. |
Do we want to include port as one of the parameters set by the RP? Another solution could be that the RP always specifies the rpId without port, and the client adds the port before sending the (host, port) tuple down to the authenticator which matches that against the stored credentials. It would also be preferable if we could do this in a backwards compatible way. I think one way to do this is if the client would append a |
That would work, however, if this isn't feasible for v1 and given all implementations have shipped already, it's not immediately clear to me if this is still worth pursuing. In whatwg/fetch#687 (comment) not everyone was convinced that such a port restriction would be meaningful either, so maybe we should just give up on that altogether? |
Yeah, given the discussion in whatwg/fetch#687, and also whatwg/html#2792 (comment), I'm thinking closing this is appropriate, espcially if whatwg/html#2792 is closed. |
I'm not convinced this would add much security in practice, but I suppose a little extra defense in depth won't hurt (other than costing a slight increase in complexity). I would support doing this, but I'm not against closing it. |
I closed the HTML issue. Closing this as well. |
@jeisinger has been looking at restricting cookies/document.domain further. Since those are relatively old features, I was wondering if we could start perhaps by tightening new features build upon the same concepts.
The idea is that instead of the scope being scheme and registrable domain, it's scheme, registrable domain, and port if the port is the default port for the scheme. So effectively add a bit to the comparison. (The scheme part isn't needed for Webauthn as it's secure context only and is ignored for cookies, for what it's worth.)
However, given how https://w3c.github.io/webauthn/#rp-id is defined it seems port isn't even stored so this may not be possible to do?
cc @mikewest
The text was updated successfully, but these errors were encountered: