[TLS] A proposal for a new field in delegated credentials

Paul Yang <kaishen.yy@alipay.com> Tue, 03 March 2020 07:10 UTC

Return-Path: <kaishen.yy@alipay.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 32C973A1A34 for <tls@ietfa.amsl.com>; Mon, 2 Mar 2020 23:10:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=alipay.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 oIJkPAd5seC2 for <tls@ietfa.amsl.com>; Mon, 2 Mar 2020 23:10:33 -0800 (PST)
Received: from out0-135.mail.aliyun.com (out0-135.mail.aliyun.com [140.205.0.135]) (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 A5A3F3A1A20 for <tls@ietf.org>; Mon, 2 Mar 2020 23:10:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alipay.com; s=default; t=1583219428; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; bh=cJDZiixUHryFZkDh/bBLbO3EsnBDPFg3/3UGgyUEW7E=; b=P2EzLmGMX0y6PazfdP8zz4OfkuBtctHoMyiU3b6k2fMioVIGpjUkNarccXXufnwPzzm0w7lehogJ4KVFFTg3PG3+hwRpxP2myzkI1MO0wKJDquG9j7qAoob1r0569Xo14cch8eZsRko+BlmgR2ha6b0P+QJvJbyejEJtgEwdyEE=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R221e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03302; MF=kaishen.yy@alipay.com; NM=1; PH=DS; RN=1; SR=0; TI=SMTPD_---.GvRyaRX_1583219426;
Received: from 30.32.116.119(mailfrom:kaishen.yy@alipay.com fp:SMTPD_---.GvRyaRX_1583219426) by smtp.aliyun-inc.com(127.0.0.1); Tue, 03 Mar 2020 15:10:26 +0800
From: Paul Yang <kaishen.yy@alipay.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\))
Message-Id: <5526E310-3D66-4A3E-94C8-CD07BB5D5B37@alipay.com>
Date: Tue, 03 Mar 2020 15:10:25 +0800
To: TLS List <tls@ietf.org>
X-Mailer: Apple Mail (2.3608.40.2.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/h-uCbHQz8zD-yPOu4PZZDzKabYs>
Subject: [TLS] A proposal for a new field in delegated credentials
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Mar 2020 07:10:43 -0000

Hi there,

As mentioned in "Delegated Credentials for TLS" draft, we found this feature is mainly designed for application-to-service scenario - for instance, to replace the so-called 'keyless' solution. By applying delegated credential, external CA could be less depended so that one can issue credentials more easily without losing the security.

We found this feature is also very useful in other scenarios like service-to-service communication. Currently cloud-native is a very popluar topic, which introduces a new solution called service mesh for Internet business to manage their services more efficiently. In a service mesh architecture, all services are containerized and the communication among the services are authenticated and encrypted via mutual authenticated TLS (mTLS). The oridinary practice of this mTLS usage is to utilize X.509 certificate as how mTLS is originally designed. For security considerations, it also requires a short-term credential instead of a long-term one. So the problem comes up, we need to find a way to issue very short-term X.509 certificates within the traditional CA architecture, which leads to the same issue the application-to-service scenario faces.

In such a case, it's possible to utilize delegated credentials to subsititue X.509 certificate in the 'inner' service mesh communication, but we found something is missing in current structure of the definition of the 'Credential'. In service mesh case, all the services share one same domain name, but with different sub-identifiers, for instance, one would like to issue a credential for 'inner-service-A-at-a.com' and 'inner-service-B-at-a.com' by using the X.509 certificate with CommonName 'a.com'. So we'd like to propose to add an extra field in the 'Credential' sturcture to resolve this issue as follows:

Current design in the draft:

    struct {
            uint32 valid_time;
            SignatureScheme expected_cert_verify_algorithm;
            opaque ASN1_subjectPublicKeyInfo<1..2^24-1>;
    } Credential;

What we propose:

    struct {
            uint32 valid_time;
            SignatureScheme expected_cert_verify_algorithm;
            opaque SubName<1..2^11-1>;
            opaque ASN1_subjectPublicKeyInfo<1..2^24-1>;
    } Credential;

A new extra field is added as:

    opaque SubName<1..2^11-1>;

SubName is derived from the signer X.509 certificate’s CommonName field and MUST NOT use arbitrary value. The SubName MAY conform to what SPIFFE requires (https://spiffe.io) and other identity specifications.

The SubName field doesn't aim to change the original identity, it's additional information to the CommonName.

For instance, we have CN=alipay.com in the singer’s X.509 certificate then we could use that certificate to sign a DC with the following SubName:
	• spiffe://alipay.com/billing/payments

Other explanation:
	• SubName’s max length is 2048 bytes defining in SPIFFE spec, hence we limit this field in TLS DC to a range of <1..2^11-1>





Regards,

Paul Yang