Re: [apps-discuss] The authentication server id, was rfc5451bis

Alessandro Vesely <vesely@tana.it> Wed, 27 March 2013 18:41 UTC

Return-Path: <vesely@tana.it>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0BB0721F88BD for <apps-discuss@ietfa.amsl.com>; Wed, 27 Mar 2013 11:41:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.719
X-Spam-Level:
X-Spam-Status: No, score=-4.719 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, HELO_EQ_IT=0.635, HOST_EQ_IT=1.245, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rNexQlae-Fd8 for <apps-discuss@ietfa.amsl.com>; Wed, 27 Mar 2013 11:41:06 -0700 (PDT)
Received: from wmail.tana.it (wmail.tana.it [62.94.243.226]) by ietfa.amsl.com (Postfix) with ESMTP id A59C621F85BD for <apps-discuss@ietf.org>; Wed, 27 Mar 2013 11:41:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tana.it; s=beta; t=1364409661; bh=CkSFxQRdapm7ATsHJNNLqJlRFLoaFtdFXy88kATWXu4=; l=5855; h=Date:From:To:References:In-Reply-To; b=sMEezbGFO8oCQNoh2jfl7IXYP4m8xUetwdqpfdkCMtY/FK852Nv48DF4fUJKromPE gpQRFnfSYZR9zL/9DRRxQDdzC+Xy8/x421155N0nmxLT25JhYBEvags1wZs8kJuGRA PhD4x1FWIAeZD+PSTkXAwQTrFswwO4Fp8dACFOjk=
Received: from [172.25.197.158] (pcale.tana [172.25.197.158]) (AUTH: CRAM-MD5 uXDGrn@SYT0/k) by wmail.tana.it with ESMTPA; Wed, 27 Mar 2013 19:41:01 +0100 id 00000000005DC02B.0000000051533D3D.00007E59
Message-ID: <51533D3D.20702@tana.it>
Date: Wed, 27 Mar 2013 19:41:01 +0100
From: Alessandro Vesely <vesely@tana.it>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
MIME-Version: 1.0
To: apps-discuss@ietf.org
References: <CAL0qLwbgjnt8Msofok3ExKBmChtQPfMEFgrrZBimEzU5CYgSjA@mail.gmail.com> <CAKHUCzxfBtLTt3p3moGgEQx+p5kr=-e2Mn58xaqNvWFGiW=Lpw@mail.gmail.com> <514432BC.1010805@tana.it> <51443483.9030805@tana.it> <CAKHUCzwBrEPSVc4VtJMKZLm+5it3h7dLiW+YZ=_xO2OwP_rLoA@mail.gmail.com> <51458A59.8040206@tana.it> <CAL0qLwYEe9Wmvr-+eZL_yqChRf+a+11zRXCmW2Md9PGvH9PK-g@mail.gmail.com> <514DFAC8.7040406@tana.it> <CAL0qLwbqNUbPOYbXQEzM6X4=RLiqCQG2TbsO9A8PaE+a3Z3oNQ@mail.gmail.com> <514EEBB7.40205@tana.it> <CAL0qLwZZ3iB1BwtfK6TxooEzbTwSxm-KZYgcMMdPUp3OyMpMag@mail.gmail.com> <515040D2.1080409@tana.it> <CAL0qLwa4+na-bAauXN1cySyxLxrKWETONcVLc-Ncf5tdyhY+4w@mail.gmail.com> <51519767.4060808@tana.it> <CAL0qLwYU4CwN4=xFpb5wzSfjmsegxncy95KBP7M2irNf1gR1hg@mail.gmail.com> <5151F698.60309@tana.it> <CAL0qLwZKJ1mGPcXDhYFNA_ZM7jByEP3WWHMmHEx-pTVtGNT9jQ@mail.gmail.com> <5152E2DB.4030807@tana.it> <CAL0qLwZ5-GAJDAS1Wd4y9cFaOk5zfM2UDNdzUh82v+Y=0wRvkA@mail.gmail.com>
In-Reply-To: <CAL0qLwZ5-GAJDAS1Wd4y9cFaOk5zfM2UDNdzUh82v+Y=0wRvkA@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: Re: [apps-discuss] The authentication server id, was rfc5451bis
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Mar 2013 18:41:07 -0000

On Wed 27/Mar/2013 13:56:28 +0100 Murray S. Kucherawy wrote:
> On Wed, Mar 27, 2013 at 1:15 PM, Alessandro Vesely <vesely@tana.it> wrote:
> 
>>> So why doesn't making authserv-id a "value" accommodate that case?
>>
>> It would overkill, considering that we'd tend to discourage
>> complicated stuff.  A "dot-atom" can have a slash, but perhaps we can
>> live with that.  Otherwise, a "token" can be fit.
> 
> A quoted string is complicated?  They've been used in email header fields
> for quite a long time now.

Yes, sorry for picking the wrong adjective.  The "complication" is
just the annoyance to modify the parser.  It is not that much of a
burden, but asking developers to do so only for accommodating a hack
that we'd discourage anyway is what I'd call overkill.

And, yes, at this point it is bikeshedding...

Another reason to review implementations is the version requirement of
Section 2.4.  Don't you need to say explicitly that the field version
being specified is "1"?

>>>> It is quite complicated to let trusted domain's A-R pass through.
>>>
>>> Why is it quite complicated?  Trusted authserv-ids is merely a set of
>>> strings.  If you're looking at an A-R header field whose authserv-id is in
>>> that list, you've decided explicitly that its content can be trusted.
>>> Anything else should either be ignored or removed (depending on which agent
>>> is looking at it).
>>
>> IMHO, the first paragraph of Section 5 is too mild.  It could be
>> hardened like so:
>>
>> OLD
>>  For security reasons, any MTA conforming to this specification MUST
>>  delete any discovered instance of this header field that claims, by
>>  virtue of its authentication service identifier, to have been added
>>  within its trust boundary and that did not come directly from another
>>  trusted MTA.
>>
>> NEW
>>  For security reasons, any MTA conforming to this specification MUST
>>  remove or rename any instance of this header field that was not added
>>  within its trust boundary.  The authentication service identifier
>>  (authserv-id) is used to identify the agent which added the header
>>  field, with the limits described in Section 7.1.
>>
>> If an MTA kills only the A-Rs that it can clearly identify as
>> forgeries, it would let thru any A-R field bearing some unknown
>> identifier.  Those identifiers may be forged.  If they match a trusted
>> id at the next ADMD (MTA or MUA), then if the latter trusts the
>> former, it has no obvious reason to suspect.  It gets complicated if
>> one tries to derive trustworthiness from routing considerations.
> 
> If consumers are already looking only for A-Rs that use an expected
> authserv-id, and ignoring others, what's the harm in letting the other ones
> through?

It disables transitive extensions of trust.  The assumption that the
producer has the same list of trusted identities as the consumer
imposes restrictions on the trust boundary.  Substantially, it
requires the trust boundary to be a single ADMD, or a set of ADMDs
where the transitive closure of the trust relationship can be actually
computed.

For example, if you have Gmail and Yahoo accounts, you cannot
configure your MUA to simply trust the corresponding identities unless
both ADMDs vet A-R fields.  Otherwise, someone can send a message
containing a forged trust-me.yahoo.com to your Gmail account, which
would get through.  In a non-transitive trust scenario, your MUA can
trust Yahoo IDs only when they come from Yahoo directly.  For
transitive trust, if Gmail trusts Yahoo and you instruct Yahoo to
forward your mail to Gmail, you may expect to find pristine Yahoo A-Rs
in there, and have your MUA trust them when they come from any
compliant ADMD.

In this case, I think "complicated" is the right adjective.  Do you
have an idea of what percentage of opendkim users configure those
regexps complicatedly?

> The document already goes as far as saying one can also remove all of them
> if it chooses, just to be safe.  Renaming them is probably also fine, but
> I'm skeptical about adding that here since you're renaming within a
> registered namespace.

Hm... I don't know if registering the renamed header would make sense.

>> Renaming rather than removing solves some issues with debugging and
>> signature verification, so I'd consider it anyway.
> 
> True, but the agent removing suspect header fields could also log or
> otherwise record them as it does so.

That needs to be done cleverly to avoid losing the field's position,
and is unpractical for signature verification.  Another possibility is
to comment out the field content.  Like logging, that allows
additional explanations with it.  If the header was signed with the
relaxed algorithm there's no need to worry about added whitespace.

Perhaps the spec can mention the three possibilities, delete, rename,
and comment-out, and then pretend that the term "remove" means any of
such dismissals, when used for the A-R header field in the rest of the
document.  However, five times the I-D uses the term "delete" instead.

>> Here's the alternative text I promised above:
>>
>>                                               Consistently with the
>>  scope limit outlined in Section 1.2, the grammar does not constrain
>>  the authentication identifier to be a domain name.  Improper use
>>  could thus consider appending a delimiter such as "#" and following
>>  it with useful transport tracing data such as the [SMTP] queue ID or
>>  a timestamp.
> 
> Isn't that materially the same as what's already in Section 2.3?

Materially, yes, but it took me multiple messages to finally grasp the
intended meaning.  Again, maybe it's me, but the discussion starting
at the next paragraph doesn't seem to characterize the stuffing of a
queue id as improper use, and the somewhat relaxed grammar can
complete the misunderstanding.