Closed Bug 1534692 Opened 5 years ago Closed 5 years ago

mock-idp.js does not seem to be working in the webrtc wpt

Categories

(Core :: WebRTC: Signaling, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bwc, Assigned: bwc)

Details

Attachments

(8 files, 1 obsolete file)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

This breaks most of the stuff in the webrtc-identity wpt.

Rank: 19
Priority: -- → P2
Assignee: nobody → docfaraday

We seem to be hitting this error:

https://searchfox.org/mozilla-central/rev/f1c7ba91fad60bfea184006f3728dd6ac48c8e56/dom/media/IdpSandbox.jsm#72

The status code is 2153394151. I cannot find this or 805A2FE7 (hex encoding) in searchfox.

Verified that this is indeed passed as an nsresult, but is not present in the nsresult enum. It has the same prefix (805A) as other errors related to CSP, SRI, and CMS:

https://searchfox.org/mozilla-central/source/__GENERATED__/xpcom/base/ErrorList.h#356-379

I'm going to guess that the way this mock idp is set up is violating security policy in some way.

@ckerschb, have any pointers here?

Flags: needinfo?(ckerschb)

(In reply to Byron Campen [:bwc] from comment #2)

@ckerschb, have any pointers here?

Puh, not really to be honest. I suppose you have checked the web (and or browser) console? For all sorts of CSP, SRI, etc. security policy violations we usually do a good job in logging to the console.

Flags: needinfo?(ckerschb)

Nothing about sec policy violations in the console, sadly. I do see stderr logging like this though:

0:14.19 INFO STDERR: 127.0.0.1 - - [20/Mar/2019 12:33:37] code 400, message Bad request version ('\xa6\xe0\xe2\xbd\xba\xf5s\xd0W\xa0\x1d\x96b\xe9\xb2\xbd\xdfx<Q\xe2>S\xaae\xb7#"\xf52(\x00$\x13\x01\x13\x03\x13\x02\xc0+\xc0/\xcc\xa9\xcc\xa8\xc0,\xc00\xc0')
0:14.19 INFO STDERR: 127.0.0.1 - - [20/Mar/2019 12:33:37] "^V^C^A^B^@^A^@^Aü^C^CL:^BÛý;~]<87>I}yÌ<87>É^K"<99>Ä^U<91>^UW<80>;RlÿÓ=ö ¦à⽺õsÐW ^]<96>bé²½ßx<Qâ>Sª
e·#"õ2(^@$^S^A^S^C^S^BÀ+À/̨̩À,À0À" 400 -

Looking at the request log, I see the GETs for the mock-idp.js going to https, whereas the test itself is loaded over http...

Any ideas here?

Flags: needinfo?(jib)

Looked, and we've already fixed the problem mentioned in comment 6 quite some time ago.

Changing the name of RTCPeerConnection-peerIdentity.html to RTCPeerConnection-peerIdentity.https.html seems to allow us to get further; now I see "self is not defined 2 mock-idp.js:59:16" in the console, which is another issue that was mentioned in comment 6.

Removing all of the "self" stuff from mock-idp.js gets to some more legitimate looking errors. I'll keep digging.

This line looks wrong:

https://searchfox.org/mozilla-central/rev/4eaf7c637a303e0f7adcf1ae45064b2d4bef9eb0/testing/web-platform/tests/.well-known/idp-proxy/mock-idp.js#144

mock-idp.js doesn't define a "param" property on the identity assertion it generates, but is assuming its presence when validating, which is throwing. It does define an "args" property that contains two of the properties ("contents" and "options") that it wants in the "param" property. Maybe this is just a typo?

(I should note that, for whatever reason, when these functions in mock-idp.js throw, no useful information about the error is making it back to the caller, and this is making it hard to debug)

The more I look at this, the more I am convinced that these webrtc-identity tests are completely broken, and have never worked on any browser.

Attachment #9052993 - Attachment is obsolete: true
Attachment #9053398 - Attachment description: Bug 1534692 - Part 1: Fix bugs in mock-idp.js r?jib → Bug 1534692 - Part 1: Stop using |global|, and fix a typo ('param' should have been 'args') in mock-idp.js r?jib

Part 6 should be fixed now.

Flags: needinfo?(jib)
Pushed by bcampen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6adc2a2a4988
Part 1: Stop using |global|, and fix a typo ('param' should have been 'args') in mock-idp.js r=jib
https://hg.mozilla.org/integration/autoland/rev/b631b7d78674
Part 2: Make RTCPeerConnection-peerIdentity use https, and fix bugs in test. r=jib
https://hg.mozilla.org/integration/autoland/rev/bf904e78fbe4
Part 3: Fix bug where PeerConnectionImpl::GetPeerIdentity would always return the empty string. r=mjf
https://hg.mozilla.org/integration/autoland/rev/6b8b0c103a4f
Part 4: Stop closing the pc when identity validation fails, because that's not what the spec says to do. r=jib
https://hg.mozilla.org/integration/autoland/rev/5d233f551bad
Part 5: Teach PeerConnectionIdp to cope with SDP with no media sections. r=jib
https://hg.mozilla.org/integration/autoland/rev/f8c25b34cef3
Part 6: Simplify this identity verification code. Fixes a bug where sRD would not wait for the verification to complete when the target peer identity was set. r=jib
https://hg.mozilla.org/integration/autoland/rev/fc24b3375510
Part 7: Make RTCPeerConnection-getIdentityAssertion.sub use https, and fix bugs in the test. r=jib
https://hg.mozilla.org/integration/autoland/rev/c8cfeb029349
Part 8: In setIdentityProvider, fall back to the target peer identity if a peerIdentity is not passed. r=jib
Flags: needinfo?(jib)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16524 for changes under testing/web-platform/tests
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: