Re: [stir] Malformed PASSporTs

Chris Wendt <chris-ietf@chriswendt.net> Tue, 18 January 2022 22:06 UTC

Return-Path: <chris-ietf@chriswendt.net>
X-Original-To: stir@ietfa.amsl.com
Delivered-To: stir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9AD753A0EAA for <stir@ietfa.amsl.com>; Tue, 18 Jan 2022 14:06:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=chriswendt-net.20210112.gappssmtp.com
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 k5WJjy_XhZO2 for <stir@ietfa.amsl.com>; Tue, 18 Jan 2022 14:06:08 -0800 (PST)
Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6D72C3A0EA4 for <stir@ietf.org>; Tue, 18 Jan 2022 14:06:08 -0800 (PST)
Received: by mail-vk1-xa2a.google.com with SMTP id w206so254361vkd.10 for <stir@ietf.org>; Tue, 18 Jan 2022 14:06:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chriswendt-net.20210112.gappssmtp.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=5dAcIrDkiYllizdkfVsrbDYP7Bhfgft8+KBuAQk8tWQ=; b=K9RXSYE8YKgABQh6SlsmFEj+zOwR45yEQQKLr98qqJBkoSfF5rQEE9ji0GiTjk1Awy 9WhYgQp7jUvnDUgtMonGGG988dzvYlEDLWUDw5iWybxdVTVBNwhSVEBHMsJdgMq/p9U3 pPNn9pVUydbc/cngLmH1nknzbTS9lN4OoZpJ2CCzT0b1DNCo5xiys18WFt7h1jEzPQYE 2U1PHENKKG+0Bh5t9/sAy2BAj7bJzXoLJODofE9P1bFoXNEyTHTFyr8dn/mlmGl9o6Q2 +i8N9G32Gf7r2tSH7F6erAPHfBwCn2/zfUPV+zqweUEUl2TEkPPCGHVqmU4bhyHtYf5T ypQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=5dAcIrDkiYllizdkfVsrbDYP7Bhfgft8+KBuAQk8tWQ=; b=r/kB9IUQmnZox5GMBeDcVgHyfKlHjOIVjuBSmQh/GBgHZ3Qvn3aenzARRVCQ6sflyT C+KPuGFwzJPb1dwiP3O1582P6l7wxGMlcpbQaKB+fdzfWSlRavjMyX04bFCtE9U01iO9 uocVV3QcyFyjIMZB9K9Xhy/wLocl4Obq0/AQ3TJeKvfudvDLtoOKHyudPBRQUpTjh+b+ ZW3yEFxu1bdJlOdegirvNNMHzUokMuDurNbm9azl4wk/rxjyb+eVKhA3SZu/LWbW7bSd J+iJdg2oAjeqIZp+fWcMjuOWw5doq/mT67AcnopwLJGuIWHftqiJKtqvTL7cOVxJZ2bj 4KnQ==
X-Gm-Message-State: AOAM530L92qASUlf6yOTKfN+x0iRQv9g8He5llP18kZ2SrDG6bxRfOeF y6qB/eLBUhvsEPIeCkaaFTIvdA==
X-Google-Smtp-Source: ABdhPJwdJhU3jUlga5XzEeGc0NK9QE/FBanY5OVkN3DNV3gJ0wCxktK82HUKEkBcQLaSj37GZBtVWw==
X-Received: by 2002:a05:6122:513:: with SMTP id x19mr10913999vko.30.1642543566535; Tue, 18 Jan 2022 14:06:06 -0800 (PST)
Received: from smtpclient.apple (c-69-242-46-71.hsd1.pa.comcast.net. [69.242.46.71]) by smtp.gmail.com with ESMTPSA id c25sm4852846vsk.32.2022.01.18.14.06.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jan 2022 14:06:06 -0800 (PST)
From: Chris Wendt <chris-ietf@chriswendt.net>
Message-Id: <610AB751-41A4-44DF-BB57-1FB644A91BD7@chriswendt.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_B4850E56-6762-4AD6-9A5D-88740D3FB2A4"
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\))
Date: Tue, 18 Jan 2022 17:06:05 -0500
In-Reply-To: <BN6PR11MB39210C398144BF00AE2927AB99549@BN6PR11MB3921.namprd11.prod.outlook.com>
Cc: Jack Rickard <jack.rickard=40microsoft.com@dmarc.ietf.org>, IETF STIR Mail List <stir@ietf.org>
To: Alec Fenichel <alec.fenichel=40transnexus.com@dmarc.ietf.org>
References: <AM5PR83MB0355609D1C09E94888C034E088549@AM5PR83MB0355.EURPRD83.prod.outlook.com> <BN6PR11MB39210C398144BF00AE2927AB99549@BN6PR11MB3921.namprd11.prod.outlook.com>
X-Mailer: Apple Mail (2.3693.40.0.1.81)
Archived-At: <https://mailarchive.ietf.org/arch/msg/stir/Xk2xDvs8MVOaiwmp_G-RlTxfUSQ>
Subject: Re: [stir] Malformed PASSporTs
X-BeenThere: stir@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Secure Telephone Identity Revisited <stir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/stir>, <mailto:stir-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/stir/>
List-Post: <mailto:stir@ietf.org>
List-Help: <mailto:stir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/stir>, <mailto:stir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Jan 2022 22:06:13 -0000

Yeah i think Alec, you have captured the general intent. 

> On Jan 14, 2022, at 2:33 PM, Alec Fenichel <alec.fenichel=40transnexus.com@dmarc.ietf.org> wrote:
> 
> As an implementer, I generally prefer being permissive about unknown fields and draconian about known fields. Put another way, we are looking for specific fields. We expect these fields to follow the required format. If they don’t, we will reject the PASSporT. If there are extra fields that we aren’t explicitly looking for, they are completely ignored, so they can be invalid. Note “rcd” is a known field, it doesn’t matter what the ppt is, if you include “rcd”, it needs to be properly formatted.
>  
> Sincerely,
>  
> Alec Fenichel
> Senior Software Architect
> alec.fenichel@transnexus.com <mailto:alec.fenichel@transnexus.com>
> +1 (407) 760-0036
> TransNexus
>  
> From: stir <stir-bounces@ietf.org <mailto:stir-bounces@ietf.org>> on behalf of Jack Rickard <jack.rickard=40microsoft.com@dmarc.ietf.org <mailto:jack.rickard=40microsoft.com@dmarc.ietf.org>>
> Date: Friday, January 14, 2022 at 11:29
> To: IETF STIR Mail List <stir@ietf.org <mailto:stir@ietf.org>>
> Subject: [stir] Malformed PASSporTs
> 
> Hi all,
>  
> What’s the intended behaviour of a verification service when it encounters a PASSporT with badly formed claims, but is otherwise valid?
>  
> There’s a progression of possibilities here which range from being able to do nothing to being entirely ignorable. I’m worried there are interop or security issues I haven’t thought of with being maximally permissive.
>  
> Fundamental field totally invalid
> “orig”: [2]
> It’s impossible to validate this passport no matter how lenient you are as there’s no way to verify this against the From header.
> Fundamental field partially invalid
> “dest”: { “tn”: [“12345556789”], “uri”: 6 }
> Theoretically you could validate this passport if the INVITE was to 12345556789, however processing this would be awkward, and for the sake of the ecosystem it may be better to reject it.
> Extra field invalid
> “ppt”: ”rph”, “rph”: “invalid”
> This is not a useable RPH passport but could degrade to a base passport and provide some authority. RPH may be a bad example because I’m not sure it’s meant to attest to the caller, however if the ppt field was malformed you wouldn’t know that…
> Optional field invalid
> “ppt”: “shaken”, “rcd”: {}
> The field isn’t mandatory, nor is it the primary focus of this passport. Ignoring the “rcd” field would do very little harm, bar allowing dodgy implementations to proliferate.
> Unnecessary non-STIR field invalid
> “aud”: 6
> I doubt many STIR implementations even check if non-STIR fields exist, let alone whether they have the right type. Completely ignoring this feels like the right thing to do, however rejecting it would also be reasonable, if everyone agreed.
> Although, not checking this specific field is in violation of the JWT standard, so maybe this should be rejected?
> Completely unexpected field
> “foo”: “bar”
> AS this is JSON I’m pretty sure this should be accepted and ignored.
>  
> I haven’t been able to find much in the standards addressing this, so I’m interested to know your opinions. I’ve been unable to come to much of an opinion myself, being permissive feels sensible, but could have negative effects on the ecosystem and generally raises more questions than answers. Being draconian is probably simplest, but could cause interop problems, especially as things change.
>  
> Thanks,
> Jack Rickard 
> he/him 
> Software Engineer 
> jack.rickard@microsoft.com <mailto:jack.rickard@microsoft.com> 
> 
> <image001[37].png>
>  
>  
> _______________________________________________
> stir mailing list
> stir@ietf.org <mailto:stir@ietf.org>
> https://www.ietf.org/mailman/listinfo/stir <https://www.ietf.org/mailman/listinfo/stir>