Re: [MMUSIC] WGLC on draft-ietf-mmusic-sdp-uks-03

Magnus Westerlund <magnus.westerlund@ericsson.com> Thu, 17 January 2019 08:50 UTC

Return-Path: <magnus.westerlund@ericsson.com>
X-Original-To: mmusic@ietfa.amsl.com
Delivered-To: mmusic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9CFFF130F58 for <mmusic@ietfa.amsl.com>; Thu, 17 Jan 2019 00:50:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.854
X-Spam-Level:
X-Spam-Status: No, score=-8.854 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-4.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com header.b=f19T8RAI; dkim=pass (1024-bit key) header.d=ericsson.com header.b=NZRCajaR
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hZfpktJ7Xy-t for <mmusic@ietfa.amsl.com>; Thu, 17 Jan 2019 00:50:39 -0800 (PST)
Received: from sessmg23.ericsson.net (sessmg23.ericsson.net [193.180.251.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7E24E130F43 for <mmusic@ietf.org>; Thu, 17 Jan 2019 00:50:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/relaxed; q=dns/txt; i=@ericsson.com; t=1547715036; x=1550307036; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RXMOBYE79RMSKAlrk0BeWDF9zCpMKV0tzHkwZXWRViE=; b=f19T8RAIGhdmZp1Jrdf8pX7/FcSHy4Y4AzHMU9g94v9mpYA0DiiOpeWmvC1NyOcs 0uP5OtqmqAw4KGPT2ec4iJrQMAVaOUYQ8s2ZT6nRFbZmP5Xs433nPvyXBVQ5IsqA vzju7egXPC/yEPWK0mt1WJEr3g+nEGTDKZePdUpwzoc=;
X-AuditID: c1b4fb2d-2198b9e00000062f-48-5c4041dc6196
Received: from ESESBMB502.ericsson.se (Unknown_Domain [153.88.183.115]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id F6.F4.01583.CD1404C5; Thu, 17 Jan 2019 09:50:36 +0100 (CET)
Received: from ESESSMB503.ericsson.se (153.88.183.164) by ESESBMB502.ericsson.se (153.88.183.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 17 Jan 2019 09:50:36 +0100
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB503.ericsson.se (153.88.183.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Thu, 17 Jan 2019 09:50:35 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RXMOBYE79RMSKAlrk0BeWDF9zCpMKV0tzHkwZXWRViE=; b=NZRCajaRCJzAbk4OwKV2yPxM2kFg2I8KoJpM3NwEpGiSLziW7NCcqbqhO1P5VY2BybcORnltj/FfQLAlbqg0J9cYZFPW4c2hN0FNSdYgP6KhOHRZctlgeRhMv6H71ONxZnAbLN7DAZeQTS0joz6B2Zsi0DPneVmhbytG4ue5Cpc=
Received: from AM0PR07MB5793.eurprd07.prod.outlook.com (20.178.114.152) by AM0PR07MB5281.eurprd07.prod.outlook.com (20.178.20.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.19; Thu, 17 Jan 2019 08:50:35 +0000
Received: from AM0PR07MB5793.eurprd07.prod.outlook.com ([fe80::b0f7:34f3:9f4:81ac]) by AM0PR07MB5793.eurprd07.prod.outlook.com ([fe80::b0f7:34f3:9f4:81ac%2]) with mapi id 15.20.1537.018; Thu, 17 Jan 2019 08:50:35 +0000
From: Magnus Westerlund <magnus.westerlund@ericsson.com>
To: Martin Thomson <mt@lowentropy.net>, Flemming Andreasen <fandreas@cisco.com>, mmusic <mmusic@ietf.org>
CC: "draft-ietf-mmusic-sdp-uks@ietf.org" <draft-ietf-mmusic-sdp-uks@ietf.org>
Thread-Topic: [MMUSIC] WGLC on draft-ietf-mmusic-sdp-uks-03
Thread-Index: AQHUppKYaZxIZ8kAEU27G32JD3JWPw==
Date: Thu, 17 Jan 2019 08:50:35 +0000
Message-ID: <AM0PR07MB5793531D0F31BCDBEF95CE8695830@AM0PR07MB5793.eurprd07.prod.outlook.com>
References: <ec74675d-c576-f728-0481-c9488fb13beb@cisco.com> <DB7PR07MB4988216B696D0E69ED14D5F095820@DB7PR07MB4988.eurprd07.prod.outlook.com> <1547691891.367836.1636707376.1C1427EE@webmail.messagingengine.com>
Accept-Language: sv-SE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=magnus.westerlund@ericsson.com;
x-originating-ip: [192.176.1.91]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM0PR07MB5281; 6:jpmdjAQMaltM0jp1iwnmmJv9+uL2jSsvBF6ztIfa3TQj+Cw9b5NzoDfj4xPkU6dPxBDzXigFWH4cnoY+jcKdey2vhV6hEMMnMBfBS1gF+Bkkx7UT91Z1YvVeC0WHFtc2gxoB4TfIeoh4eWCsU7AlQiq04NElop9qrrBYU5mpD+oSCCdmF+VbKtMcQ6QfTjpdlNPZFFDfNF4fpFUwglzUlr5pNMdVBAubURD1EoqCO+6Z2CXXk/q/zJGSigPoGAGOwTQWxW2K0RCFimeArbGDzcGcL7QwJQ9Fi+NK6UZEBvyf+qgOfodUVezOYtcvqBVFffVpmrzvidaaVkLJCSqg7XCyQ90y1rdO63U016UFUH3UGq7oBEG53BYRyZZezqpVmVBLB0zHKL4nam8Es5GAXiRYnwzMcMWuJ0gAnqRikqixrRwmbrEYgK1XCBZWTvwnFZrZnLeINwKlJ278+mzzSg==; 5:uoJQzSRqfMLF3SMQjE/x5mK0wPPG+akcC/wMV4aRNZuuI82zEfC254KveK7AIxFFtqgMVfunqS/HB45BlAhZfnfcV7I/qCxfIfHkmk8hpeVxPubkovvnpgjjGo6Khxp1ctxMtNDkymg6g0SBipsGFRyBOmS5XahjBsP9e5Q9lMIPuHjSl8eeVNdMQAWDyEwhcngXqGYve5KpINEZXegsYA==; 7:ug0TA2TfJY6FZSPYPntat5q8x49sAlBDrCIKs9BBO1MKs2QV414ii9cGuwh66pxIO3TUiZn0Mz2zNtUyW2tmXBXrqMKJnmDpnGXxPFP7oSs+CX5a0PDZuiV74YKiU6Ojami276qQw4kHiJk+xn2MbQ==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: b0c34e11-52ab-43e7-46c6-08d67c58d8a9
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR07MB5281;
x-ms-traffictypediagnostic: AM0PR07MB5281:
x-microsoft-antispam-prvs: <AM0PR07MB5281314AFB3634C6EF0AC76C95830@AM0PR07MB5281.eurprd07.prod.outlook.com>
x-forefront-prvs: 0920602B08
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(396003)(346002)(39860400002)(366004)(199004)(189003)(51914003)(51444003)(52314003)(86362001)(81156014)(74316002)(8676002)(81166006)(6436002)(966005)(5660300001)(110136005)(316002)(33656002)(106356001)(476003)(105586002)(44832011)(486006)(7696005)(8936002)(76176011)(71200400001)(7736002)(71190400001)(2906002)(55016002)(5024004)(14454004)(14444005)(256004)(478600001)(305945005)(9686003)(6306002)(102836004)(99286004)(6506007)(53546011)(186003)(97736004)(66066001)(26005)(446003)(3846002)(6116002)(6246003)(229853002)(68736007)(53936002)(25786009)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR07MB5281; H:AM0PR07MB5793.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: F8hRJfKps1D0wqzL8fE1eRo8f9gKy8+4HFPxTYo1N5yiEHaGUGXx1prvdb0I6L/zhBYPKJ3gx2/HVag+iLeaT8YYQWJMIRGEpN5AmIp6sdDZFl7rgb2QristAwela2ugr0I+CZ0YeL6Avg6ExFV1LP6WLxsADHRfbb3uE3h/KEMwQlM5S/iSMDS7VHsNXhkklqx0jQulAHw/ieRgRdAAWuSaYEXRtTK72/ALyQkaojYmWtj3BoJNzTTwA2zCNpQcR3w/iRr9ME/hoo/atU3bAGlU9MQclfB5cyoqNVeqPn/W4UM7IV7At47HlND/zn4iXKO1PxLX/UdydZD4W71PmA+3kNsxmB5Xf15licJAhMiZIMxFln8q4tEjMLeri4wQZCXyeJZtJQNHoFkAMz01qz6Qp34KJMJBXfFCsc6O8Qw=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: b0c34e11-52ab-43e7-46c6-08d67c58d8a9
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2019 08:50:35.2441 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB5281
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKKsWRmVeSWpSXmKPExsUyM2J7se4dR4cYg4/bVC3efehgt3h/Qddi 6vLHLBY7z85mcmDxmPJ7I6vHkiU/mTzWvVzHHsAcxWWTkpqTWZZapG+XwJVx6kU3Y8ECu4pT e6MaGD8ZdjFyckgImEi0tM9j62Lk4hASOMIosaTtPBOE841R4mHLGxYIZwmTxNqJN5lBHBaB CcwSy7Y2s0NkJjNJTOjbygjhPGCU+DTlPjvIZDYBC4mbPxrZQGwRgWyJrsUzweLMAr4Sfe+m gNnCAlYSH5/9ZIKosZaYtWYyI4StJ3F113mwOIuAqsSlhStYQWxegRiJDZuesUIsu8oosfZ5 B1iCUUBW4v73eywQC8Qlbj2ZzwTxnoDEkj3nmSFsUYmXj/9B1SdK3Gh8ClWjIHF7+XEWCFtW 4tL8brBvJASa2CU+X7vOBpHQlfgwdSrQIA4g21dixzQHiJoLjBI3js6HataS6HpzGWpZtsT7 JSfYIWwZiSMnN7JBNHxnlTjesh1ss5BAqsTyta2MExj1ZiE5HMLWkViw+xMbhK0tsWzha+ZZ 4BAQlDg58wnLAkaWVYyixanFxbnpRsZ6qUWZycXF+Xl6eaklmxiBieXglt+6OxhXv3Y8xCjA wajEwztZxyFGiDWxrLgy9xCjBAezkghvgD1QiDclsbIqtSg/vqg0J7X4EKM0B4uSOO8fIcEY IYH0xJLU7NTUgtQimCwTB6dUA+PC2iVeEtFaR6dl/30szTmDrXbjTq678yr9V4XuiX4koevx 8HCYk3lunaR1fD27jOqjassdtekXhS8xhM5vWNGh5+H07PKyta+OXmhj/VzmtlvAw4x/56T7 N2ubK0Snc8ZP1n2Y3pJZ0jL5od2Oxw23fB4+2LdSbd2ab3ycZZ+C+w9/EJghaKzEUpyRaKjF XFScCADm+H32KAMAAA==
Archived-At: <https://mailarchive.ietf.org/arch/msg/mmusic/OhDzawpsuE7s91tvnv5Fm8TYWmM>
Subject: Re: [MMUSIC] WGLC on draft-ietf-mmusic-sdp-uks-03
X-BeenThere: mmusic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multiparty Multimedia Session Control Working Group <mmusic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mmusic>, <mailto:mmusic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mmusic/>
List-Post: <mailto:mmusic@ietf.org>
List-Help: <mailto:mmusic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 17 Jan 2019 08:50:42 -0000

Hi Martin,

Thanks for the pull request. I have detailed inline comments, but I
think the pull request do address my issues.


On 2019-01-17 03:25, Martin Thomson wrote:
> Hi Magnus, thanks for reviewing.
>
> PR for all the changes here:
> https://github.com/martinthomson/sdp-uks/pull/6
>
> And responses inline.
>
> On Wed, Jan 16, 2019, at 23:31, Magnus Westerlund wrote:
>
>> 2. Section 3.2:
>>
>> "   A WebRTC identity assertion is provided as a JSON [JSON] object that
>>    is encoded into a JSON text."
>>
>> That doesn't match what is written in Sections 7.4 and 7.4.1 of draft-
>> ietf-rtcweb-security-arch-17.
>>
>> What is provided as an JSON is the fingerprint, not the Identity 
>> assertion (see 7.4)
>>
>> What 7.4.1 says about identity assertions are:
>>
>>
>>    Once an IdP has generated an assertion, it is attached to the SDP
>>    offer/answer message.  This is done by adding a new 'identity'
>>    attribute to the SDP.  The sole contents of this value are a
>>    Base64-encoded [RFC4648] identity assertion.
>>
>> Thus, they appear to be only Base64 encoded binary blobs.
> That binary blob is a UTF-8 encoded JSON text.  That format is described in Section 7.6 of the security-arch doc.  I admit, having read your comment and gone looking for this, I would have missed this connection.  I think that the security-arch needs some editorial work.  The process is:
>
> 1. collect all fingerprint attributes
> 2. assemble into an object as described in 7.4
> 3. serialize that object into a JSON text
> 4. pass that as a string to the IdP (the IdP treats this as opaque)
> 5. get back a JSON object in the form described in 7.6
> 6. serialize that object into a UTF-8-encoded JSON text
> 7. base64 encode THAT to produce the a=identity attribute value
>
> That is what is implemented at least.
>
> This needs to be a JSON object because  the relying party needs to be able to extract the attributes described in 7.6 in order to instantiate the IdP.

Although I didn't read all the sections in 7, I do agree that security
arch appear to need some clarification so that what you write is clear.

I think the new text is at least clear on what you use as input.


>
>> 3. Section 3.2:
>>
>> "The SDP "identity" attribute includes the base64 [BASE64] encoding of
>>    the same octets that were input to the hash."
>>
>> I don't understand this sentence. What was included into which hash. 
>> Please rewrite to be descriptive of which information to retrieve or at 
>> least be explicit to reference the relevant component of the identity 
>> attribute.
> I made an attempt.  Take a look at the PR to see if that helps at all.

Yes, I think this is clear.


>> 4. Section 3.2:
>>
>>   "The "external_id_hash"
>>    extension is validated by performing base64 decoding on the value of
>>    the SDP "identity" attribute, hashing the resulting octets using SHA-
>>    256, and comparing the results with the content of the extension."
>>
>> To my understanding the binary blob that is Base64 encoded and put in 
>> the SDP Identity attribute after the IdP has taken the fingerprint and 
>> the user identity assertion is IdP specific and really a binary blob 
>> that only the IdP specific validator can check. So why is the validation 
>> of a binary blob done on the binary blob rather than the base64 
>> encoding? Risk for non canonical encoding? I don't quite see that as the 
>> IdP will produce the assertion and even the base64 encoding happens once 
>> before being provided in SDP and can thus the hash can be run on the 
>> Base64.
> The potential for disagreement about padding is what concerned me here.  Padding in base64 is somewhat erratic.  Then there is the domain transform from string (how the headers are ostensibly represented) and octet sequences.  Avoiding another need to describe that transformation (with UTF-8 involved, I would assume), seemed less hazardous.
>
> The value needs to be decoded anyway, so this seemed like the most robust approach.

I will not disagree with you about the potential for BASE64 encoders not
producing the same results if different implementations encoded the same
base material. So from that perspective I am fine. However, I think
there are a point of putting some motivation for the base64 decodings
into this section. Something like. "To avoid base64 encoders producing
different output, base64 data is decoded prior to hashing."


>
>> 5. Section 3.2:
>>    "Where a PASSPoRT is used, the compact form of the PASSPoRT MUST be
>>    expanded into the full form.  The base64 encoding used in the
>>    Identity (or 'y') header field MUST be decoded then used as input to
>>    SHA-256."
>>
>> Also here there appear to be some mismatch between what RFC 8224 defines 
>> as a full passport object. See Section 4.1 of RFC 8224:
>>
>>   After these two JSON objects, the header and the payload, have been
>>    constructed and base64-encoded, they must each be hashed and signed
>>    per [RFC8225], Section 6.  The header, payload, and signature
>>    components comprise a full PASSporT object.
> I've tried to address that in the same commit above.  The construction of the JWS is - as usual - subject to multiple base64 rounds, so the trick is in identifying the right binary bits to hash.  I think that what I have described is clearer.

I think including which syntax element from the ABNF for the SDP
attribue to hash makes this much less unclear and I don't see the any
issues any more with this one.


>
>> 6. As currently written but questioned above, if the object to hash is a 
>> JSON object, are the delimitation of the object given, such that one 
>> knows if any final CRLF are to be included or not.
> All of these protocol steps are vulnerable to whitespace changes.  PASSPorT rather naively tries to address this point with canonicalization, but this doesn't.  If whitespace is caught by the a=identity attribute or Identity: header field, then that whitespace needs to be hashed.  Do you think that needs to be said explicitly?  I didn't do that, but can if you think that helps.

I think this is probably fine as long as implementations don't try to be
smart. As long as they hash the full output of the base64 decoder it
works fine for this purpose.

>
>
>> 7. Section 3.2:
>>
>> Identity bindings in either form might be provided by only one peer.
>>    An endpoint that does not produce an identity binding MUST generate
>>    an empty "external_id_hash" extension in its ClientHello.
>>
>> What is an empty "external_id_hash" extension? Is that with 0 bytes of 
>> hash data?
> Correct.  Updated in the PR.
>

Thanks

Magnus Westerlund 

----------------------------------------------------------------------
Network Architecture & Protocols, Ericsson Research
----------------------------------------------------------------------
Ericsson AB                 | Phone  +46 10 7148287
Torshamnsgatan 23           | Mobile +46 73 0949079
SE-164 80 Stockholm, Sweden | mailto: magnus.westerlund@ericsson.com
----------------------------------------------------------------------