W3C home > Mailing lists > Public > public-webrtc@w3.org > July 2017

[webrtc-pc] The same connection.peerIdentity promise can be resolved multiple times

From: Soares Chen via GitHub <sysbot+gh@w3.org>
Date: Thu, 27 Jul 2017 07:19:28 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-245947681-1501139966-sysbot+gh@w3.org>
soareschen has just created a new issue for https://github.com/w3c/webrtc-pc:

== The same connection.peerIdentity promise can be resolved multiple times ==
In 9.4 Verifying Identity Assertions:

> 10. The RTCPeerConnection resolves the peerIdentity attribute with a new instance of RTCIdentityAssertion that includes the IdP domain and peer identity.

Identity assertion validation is performed every time `setRemoteDescription()` is called with SDP containing a=identity line. Whether the validation succeed or failed, 9.4 attempts to resolve `connection.peerIdentity` promise without considering if it has previously been resolved.

The only time the `peerIdentity` promise is replaced is when _identity validation fails and there is no a target peer identity_. So what happen in other permutations of promise fulfillment/rejection? e.g.:

```javascript
const pc = new RTCPeerConnection({ peerIdentity });
pc.setRemoteDescription(sdpWithInvalidAssertion)
.catch(() => pc.setRemoteDescription(sdpWithValidAssertion));

const pc = new RTCPeerConnection({ peerIdentity });
pc.setRemoteDescription(sdpWithValidAssertion)
.then(() => pc.setRemoteDescription(sdpWithInvalidAssertion));
```

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1513 using your GitHub account
Received on Thursday, 27 July 2017 07:19:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:35 UTC