Re: [Acme] Add a special token parameter in ACME registration

Andy Ligg <andy@startssl.com> Wed, 17 August 2016 02:43 UTC

Return-Path: <andy@startssl.com>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BF9A812D13B for <acme@ietfa.amsl.com>; Tue, 16 Aug 2016 19:43:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.147
X-Spam-Level:
X-Spam-Status: No, score=-8.147 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.247, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 dCwNp273W6BI for <acme@ietfa.amsl.com>; Tue, 16 Aug 2016 19:43:09 -0700 (PDT)
Received: from mx3.startssl.com (mx3.startssl.com [124.251.21.41]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8C0F912D0AA for <acme@ietf.org>; Tue, 16 Aug 2016 19:43:07 -0700 (PDT)
Received: from mx3.startssl.com ([fe80::bd1d:eeaf:a825:d540]) by mx3.startssl.com ([fe80::bd1d:eeaf:a825:d540%13]) with mapi id 14.02.0247.003; Wed, 17 Aug 2016 10:49:22 +0800
From: Andy Ligg <andy@startssl.com>
To: Richard Barnes <rlb@ipv.sx>
Thread-Topic: [Acme] Add a special token parameter in ACME registration
Thread-Index: AQHR9w4PsKlaS/7lgE65PBJcOC1dgaBJsauAgAF70QCAAA4kgIAATzuAgADq8r8=
Date: Wed, 17 Aug 2016 02:49:21 +0000
Message-ID: <6C9461C9-4F80-4CBC-BFE7-C112CB285340@startssl.com>
References: <236F64DDDC83C742A24E89E6E215CFC7E4CFB7@mx3.startssl.com> <CAObDDPAEaiWE0Apao_sWin2njhC+CjQuw1D07upTsn4=BQQZnQ@mail.gmail.com> <d729f81d-44a7-7e64-a528-a43df5e6dd69@eff.org> <010e01d1f7d0$dcd3c7a0$967b56e0$@startssl.com> <c81aa0ec-4d8b-8e9f-cba3-d6205e466e53@eff.org>, <CAL02cgTedv63cgjxDf3eNWANnVSG1zDkDDzUHrv0XVHb5ooJWg@mail.gmail.com>
In-Reply-To: <CAL02cgTedv63cgjxDf3eNWANnVSG1zDkDDzUHrv0XVHb5ooJWg@mail.gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: multipart/alternative; boundary="_000_6C9461C94F804CBCBFE7C112CB285340startsslcom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/HssNOGlBIhbVI2HKV7QpQkN79Gc>
Cc: "acme@ietf.org" <acme@ietf.org>, Jacob Hoffman-Andrews <jsha@eff.org>
Subject: Re: [Acme] Add a special token parameter in ACME registration
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Aug 2016 02:43:11 -0000

See below inline, thanks.

Regards,

Andy

On 17 Aug 2016, at 04:54, Richard Barnes <rlb@ipv.sx<mailto:rlb@ipv.sx>> wrote:

There are two clearly separable problems here:

1. Associating an ACME account key to an account in some other system
2. Determining when to issue an EV certificate (and with what contents)

Let's address them each separately.  (Note that Andy filed https://github.com/ietf-wg-acme/acme/issues/170 for (1))

=====

For (1), it seems sufficient (as Andy suggests) to add a token to the registration object.  If the client has one, it can add it either in the new-registration request or as a later update to the registration.  The server just reflects this value in its registration object.

I think we can leave the details of what this association means pretty much out of scope.  The only requirement that comes to my mind is that the CA should reflect any authorization it has granted to the client in application objects, even if it's only an OOB link to some document.

It seems worth noting that one could also address this problem in the other direction, by letting clients set an ACME account key in the other account system.  However, it seems better to create minimal dependencies on upgrades to these systems.  And in any case, it would be best to have binding in *both* directions, to avoid unknown-key-share-like risks.

=====

A: the API token is for binding this client to a StartSSL account that validated its identity since this token is generated by our system before using ACME client.
I also care about the token security that this token can't be used by wrong account. So server side will check the token with the correct email address to identify the correct account.



For (2), I can think of a few approaches:

a. Infer the certificate type from the CSR.  For example, if the Subject in the CSR has (C, O, CN), infer that the applicant wants EV.
b. Have a field in the new-application request that the client can use to indicate what type of certificate, e.g., {"certType": "ev"} to indicate EV.
c. Have a field in the new-application request that indicates which CA the applicant would like to issue the certificate, e.g., {"ca": "identifier-for-CA"}.

All of these are approaches have drawbacks.  Options (a) and (b) kind of paper over the idea that you would have one ACME service fronting for different CAs; I would prefer to be explicit about that.  (Option (a) also seems pretty brittle, since you might not always have a 1-1 mapping between patterns of Subject fields and certificate types.)  With Option (c), though, you would probably also want some way for the client to discover what CAs are available.  Option (c) also presumes that there's a 1-1 mapping between CAs and the policies they support, which seems like it should be the case, but might not be (you could combine it with (b) to address this).

Personally, I think my preference order would be c > b >> a.  We're likely to need to solve the multi-CA problem at some point soon anyway, so we might as well do it now.  Roughly, the proposal for (c) here would be as follows:

- In "meta" part of the directory, add a "CAs" entry with an dictionary of CAs that are accessible at this ACME server.
- For each CA, the dictionary key is a unique identifier, and the value has some metadata, e.g.:
  - An identifier for the policy the CA implements ("dv", "ev", etc.)
  - A link to more information about the CA
- In the new-application request, allow the client to specify which CA it would like to issue the certificate (using the unique ID from the directory/meta)

Thoughts?

--Richard



A: I think this is too complex that we can use CSR info to let the CA know the cert type.



On Tue, Aug 16, 2016 at 12:04 PM, Jacob Hoffman-Andrews <jsha@eff.org<mailto:jsha@eff.org>> wrote:
On 08/16/2016 08:14 AM, Andy Ligg wrote:
>> One possibility would to make it the client's responsibility to request
>> EV by including the desired O, OU, etc. fields in the Subject DN of the
>> CSR. It would then be the server's responsibility to accept or reject
>> the request based on whether the account has a sufficient validation
>> level (and payment).
>
> A: StartCom issued the certificate not based on CSR info, we don’t care
> about the info in the CSR, we issue the certificate based on this
> account validated level and validated identity information. This mode
> don’t work, CSR is not enough to identify the certificate type.

Keep in mind that you're gong to have to start using *some* of the info
from the requested CSR, because ACME uses the hostnames embedded in a
CSR to determine which hostnames to issue for. ACME also uses the CSR to
convey requested extensions, like Must Staple, though obviously not all
CAs will support all extensions.

Can you say more about why a CSR is not enough to identify the
certificate type?

> A: Yes, our API call is the same way as ACME registration – using client
> certificate for authentication. In my last email, we need to add a API
> Token in the ACME registration, then all are OK for paid CA.
> Sure, if the paid CA is not this way but like to use ACME, then they
> need to change the API system.

Is your proposal that `POST /acme/new-reg` would contain a token
obtained from the StartSSL website? Or that your ACME server would
generate a token and provide it as part of the response to new-reg?

_______________________________________________
Acme mailing list
Acme@ietf.org<mailto:Acme@ietf.org>
https://www.ietf.org/mailman/listinfo/acme

_______________________________________________
Acme mailing list
Acme@ietf.org<mailto:Acme@ietf.org>
https://www.ietf.org/mailman/listinfo/acme