Subject: Re: [stir] [Technical Errata Reported] RFC8224 (6499)

From: Christer Holmberg <[email-masked]>
Date: Thu, 1 Apr 2021 07:00:11 +0000

Hi,

>Uh, I’m not sure. I’m not up to speed on this enough and certainly defer to the people that know more than me.
>
>I agree the passport is bas64url encoded, but are the strings we are talking about here done the same way? It looks like 4474 has them as base64 encoded.
>
>My read was the passport string was base64url encoded, then that string was used with combined and encoded a second time with base64 encode to go in the identity header.

There is no "encoded second time" procedure defined, afaik.

Note that while RFC 8224 defines usage of BASE64 (as indicated in the errata), the examples in Section 4.1.1 of 8224 actually use BASE64URL encoding.

   Identity: eyJhbGciOiJFUzI1NiIsInR5cCI6InBhc3Nwb3J0IiwieDV1I \
   joiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUub3JnL3Bhc3Nwb3J0LmNlciJ9.eyJ \
   kZXN0Ijp7InVyaSI6WyJzaXA6YWxpY2VAZXhhbXBsZS5jb20iXX0sImlhdC \
   I6IjE0NDMyMDgzNDUiLCJvcmlnIjp7InRuIjoiMTIxNTU1NTEyMTIifX0.r \
   q3pjT1hoRwakEGjHCnWSwUnshd0-zJ6F1VOgFWSjHBr8Qjpjlk-cpFYpFYs \
   ojNCpTzO3QfPOlckGaS6hEck7w;info=<https://biloxi.example.org \
   /biloxi.cert>

   Identity: ..rq3pjT1hoRwakEGjHCnWSwUnshd0-zJ6F1VOgFWSjHBr8Qj \
   pjlk-cpFYpFYsojNCpTzO3QfPOlckGaS6hEck7w;                    \
   info=<https://biloxi.example.org/biloxi.cert>

Note the "-" (dash) character in the signature values. Dash is used in BASE64URL, but not in BASE64.

The same goes for the examples in Section 5.1.

>Anyways, I have no idea what should happen here but the more I looked at it, the less obvious it was to me.
>
> I’d love to hear from Chris ?
>
> Anyways … as a practical point, If you move the Identity header from using base64 in 4474, to base64url in 8224, it seems likely that lots of SBC will reject them.
> That will be particularly frustrating to debug given it will not reject all of them where the different characters in the alphabet don’t occur.

In general I agree that it would be an issue.

However, note that even without the change in the errata the 8224 syntax is not 100% backwards compatible with 4474 - and that is explicitly indicated in 8224, so it is not a mistake.

And, as mentioned above, the examples in 8224 are using BASE64URL encoding.

Regards,

Christer

> On Mar 28, 2021, at 10:48 AM, Russ Housley <[email-masked]> wrote:
>
> I think this errata should be approved.
>
> Russ
>
>> On Mar 27, 2021, at 4:48 PM, RFC Errata System <[email-masked]> wrote:
>>
>> The following errata report has been submitted for RFC8224,
>> "Authenticated Identity Management in the Session Initiation Protocol (SIP)".
>>
>> --------------------------------------
>> You may review the report below and at:
>> https://protect2.fireeye.com/v1/url?k=190c118c-4697288e-190c5117-869a
>> 14f4b08c-ac8e6db5f0d29493&q=1&e=4efdaf80-a661-41c1-8b98-b6dad7d3e0b7&
>> u=https%3A%2F%2Fwww.rfc-editor.org%2Ferrata%2Feid6499
>>
>> --------------------------------------
>> Type: Technical
>> Reported by: Marc Petit-Huguenin <[email-masked]>
>>
>> Section: 4
>>
>> Original Text
>> -------------
>> Identity = "Identity" HCOLON signed-identity-digest SEMI
>>         ident-info *( SEMI ident-info-params ) signed-identity-digest
>> = 1*(base64-char / ".") ident-info = "info" EQUAL ident-info-uri
>> ident-info-uri = LAQUOT absoluteURI RAQUOT ident-info-params =
>> ident-info-alg / ident-type /
>>   ident-info-extension
>> ident-info-alg = "alg" EQUAL token
>> ident-type = "ppt" EQUAL token
>> ident-info-extension = generic-param
>>
>> base64-char = ALPHA / DIGIT / "/" / "+"
>>
>>
>> Corrected Text
>> --------------
>> Identity = "Identity" HCOLON signed-identity-digest SEMI
>>         ident-info *( SEMI ident-info-params ) signed-identity-digest
>> = 1*(base64url-char / ".") ident-info = "info" EQUAL ident-info-uri
>> ident-info-uri = LAQUOT absoluteURI RAQUOT ident-info-params =
>> ident-info-alg / ident-type /
>>   ident-info-extension
>> ident-info-alg = "alg" EQUAL token
>> ident-type = "ppt" EQUAL token
>> ident-info-extension = generic-param
>>
>> base64url-char = ALPHA / DIGIT / "-" / "_"
>>
>>
>> Notes
>> -----
>> RFC 8225 makes it clear that the encoding is BASE4URL, not the standard BASE64 encoding.
>>
>> Instructions:
>> -------------
>> This erratum is currently posted as "Reported". If necessary, please
>> use "Reply All" to discuss whether it should be verified or rejected.
>> When a decision is reached, the verifying party can log in to change
>> the status and edit the report, if necessary.
>>
>> --------------------------------------
>> RFC8224 (draft-ietf-stir-rfc4474bis-16)
>> --------------------------------------
>> Title               : Authenticated Identity Management in the Session Initiation Protocol (SIP)
>> Publication Date    : February 2018
>> Author(s)           : J. Peterson, C. Jennings, E. Rescorla, C. Wendt
>> Category            : PROPOSED STANDARD
>> Source              : Secure Telephone Identity Revisited
>> Area                : Applications and Real-Time
>> Stream              : IETF
>> Verifying Party     : IESG
>>
>> _______________________________________________
>> stir mailing list
>> [email-masked]
>> https://www.ietf.org/mailman/listinfo/stir
>

_______________________________________________
stir mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/stir

---

From: Cullen Jennings <[email-masked]>
Date: Thu, 1 Apr 2021 08:30:03 -0600

FWIW … AIB is used in some private SIP networks thought I realize it is not used in carrier networks. I have zero idea if they will upgrade to 8224 or not. It is pretty common for the firewalls and border SBC to check that the SIP messages headers match their idea of what the allowed ABNF is and also impose random size limits on stuff. Always very frustrating to run into one of these. They typically do check the allowed characters match the ABNF. 

I don’t know any of that is a big deal because those network will be configured to stay on 4474 until they upgrade to 8824. 

I’ve got no strong opinion on what is best resolution to this but glad people found it and are sorting it out one way or the other. 

> On Mar 28, 2021, at 6:45 PM, Chris Wendt <[email-masked]> wrote:
> 
> Yes, so just to explain, we inherited base64url from RFC7519 JWT, so i think the errata is correct, but I believe no-one, i’m aware of at least, actually followed base64 vs base64url for implementing 8224 simply because JWT implementation and interop is so widely accepted at this point (although i didn’t do the homework to see what the potential breakage would be).  To be clear this is only for the PASSporT/JWT value in the identity header not any of the parameters that come afterword.
> 
> To Cullen’s point, i think because from 4474 to 8224 the switch as i recall was just a signature to a JWT/PASSporT, this probably is different enough that any implementation of 4474 identity would not be compatible to begin with, if the SBC would even touch the contents of the header values. But again, we have a lot of 8224 identity headers passing in SP networks and i have not heard of any interop issues, from everything i’ve heard most networks have been turning on identity headers passing through SBCs for the first time.  And i believe most SBCs do not evaluate the identity header, only until you get to the point where the verification service is the value parsed, as far as i’m aware.
> 
> -Chris
> 
>> On Mar 28, 2021, at 6:42 PM, Marc Petit-Huguenin <[email-masked] <mailto:[email-masked]>> wrote:
>> 
>> See the examples in section 4.1.1 of RFC 8224.
>> 
>> On 3/28/21 2:56 PM, Cullen Jennings wrote:
>>> @Chris ….
>>> My read was the passport string was base64url encoded, then that string was used with combined and encdoed a second time with base64 encode to go in the identity header.
>>> Anyways … as a practical point, If you move the Identity header from using base64 in 4474, to base64url in 8224, it seems likely that lots of SBC will reject them. That will be particularly frustrating to debug given it will not reject all of them where the different characters in the alphabet don’t occur.
>>>> On Mar 28, 2021, at 10:48 AM, Russ Housley <[email-masked] <mailto:[email-masked]>> wrote:
>>>> 
>>>>> On Mar 27, 2021, at 4:48 PM, RFC Errata System <[email-masked] <mailto:[email-masked]>> wrote:
>>>>> 
>>>>> https://www.rfc-editor.org/errata/eid6499 <https://www.rfc-editor.org/errata/eid6499>
>>>>> 
>>>>>         ident-info *( SEMI ident-info-params )
>>>>> signed-identity-digest = 1*(base64-char / ".")
>>>>> ident-info = "info" EQUAL ident-info-uri
>>>>> ident-info-uri = LAQUOT absoluteURI RAQUOT
>>>>> ident-info-params = ident-info-alg / ident-type /
>>>>>   ident-info-extension
>>>>>         ident-info *( SEMI ident-info-params )
>>>>> signed-identity-digest = 1*(base64url-char / ".")
>>>>> ident-info = "info" EQUAL ident-info-uri
>>>>> ident-info-uri = LAQUOT absoluteURI RAQUOT
>>>>> ident-info-params = ident-info-alg / ident-type /
>>>>>   ident-info-extension
>>>>> use "Reply All" to discuss whether it should be verified or
>>>>> rejected. When a decision is reached, the verifying party
>>>>> can log in to change the status and edit the report, if necessary.
>>>>> 
>> -- 
>> Marc Petit-Huguenin
>> Email: [email-masked] <mailto:[email-masked]>
>> Blog: https://marc.petit-huguenin.org <https://marc.petit-huguenin.org/>
>> Profile: https://www.linkedin.com/in/petithug <https://www.linkedin.com/in/petithug>