Re: [GNAP] Key Rotation

Andrii Deinega <andrii.deinega@gmail.com> Mon, 19 July 2021 21:38 UTC

Return-Path: <andrii.deinega@gmail.com>
X-Original-To: txauth@ietfa.amsl.com
Delivered-To: txauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C058F3A0B6A for <txauth@ietfa.amsl.com>; Mon, 19 Jul 2021 14:38:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 ohFf_iOWiwJa for <txauth@ietfa.amsl.com>; Mon, 19 Jul 2021 14:38:53 -0700 (PDT)
Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 A75723A0B68 for <txauth@ietf.org>; Mon, 19 Jul 2021 14:38:47 -0700 (PDT)
Received: by mail-lf1-x12e.google.com with SMTP id y42so32629821lfa.3 for <txauth@ietf.org>; Mon, 19 Jul 2021 14:38:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I4Ak98SXZJrehBq2GKyAYch23TNaEwC8ZTqy5AZK/+8=; b=gGiaKvhI0OIb/7d41f+AoOuXRbVkYxhGg+g2wk3GYsopUpmiqTYPubueKqSD+pPTen WqZG7jnEnzc4BunjHBb2WBViRWsL66WbDP8eFu+OXC4okFA/sdR+WBbg/B+qQhjmGZ/h qye8tdPoNun1IFCwvXJvG7Hpp5QrGkKCIb0DilZPGOX0vgSXeqZduzWijTcOSgKCx3h0 g5ovV4V1/B+jr/SUD/cYfsU0w6JgTsJQoYCAFTKSgk/0CugBuGRORvz7PA1d78G3b1vp FEmMrmWl2yDFrRv2Sd9nBCcJpVH3Y7xSFt/wYOcwAcwAkaYwJU80xdv5Nql05kurYHl1 4kYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I4Ak98SXZJrehBq2GKyAYch23TNaEwC8ZTqy5AZK/+8=; b=MN6HON5Kbt1HkMVk0Ft+rfHcHAaXJudqXblF7Yp4MFP51KTiV6+HIeKu5diOibuWnu j45gJOnRpKsmxaKGdH13tQi5MELzBOGRi0TT5LlXtG/eex0HeoOGQine3vu8AbPuVomg /TNlBQE9L2FeuPeNG8yaYR4lEGP75dzVs6+N+GBrx/x41AS8vXru6Hx6o/5I5MlInEwH I91Z1r2wqwfSn/H3baWlKDTWG3fdz4cJBkVQ+gRXQJTQIwF4/MdKintNavNDwMP2JZip unACPdnwCPvbRQ/qELQUy6y2JV1Z4sLyHr/EX3bzM5K6CRygVshrLrxSx8QYFJQB16H9 Ekgg==
X-Gm-Message-State: AOAM5316RaL/r+E74dCqQzLM3Z+ZureJdAOWi5MSEpwZVWegDneYgejg fgNrUqZoCZv2XrUsqOqrIhU3ln+4VvrJ/gDaVhs=
X-Google-Smtp-Source: ABdhPJxaIxUjiA2OXrHAiI6YLKSIiRh2148VCK/3FD/fuo+A5722Zs9n2afVZ9oIOjuZ/yIE5Cixmug4LQ4lXMSQBso=
X-Received: by 2002:a19:c7c4:: with SMTP id x187mr19507037lff.621.1626730725074; Mon, 19 Jul 2021 14:38:45 -0700 (PDT)
MIME-Version: 1.0
References: <B72A80C0-0579-43F8-9B83-0932C98EB314@mit.edu> <CAGBSGjpzW01d9ym+r6oeSZUd9YjZsg_vmyME+ffJNd8rPaZANw@mail.gmail.com> <CAM8feuTUDpEUkKkN9DQC6doqeqKKOpaS1KS3+PUF99R1MzGUZw@mail.gmail.com> <32D204BA-990A-4E91-B0D2-28D3A8AD8474@mit.edu> <afa1c58b9a05488a9b0e466568ca1c77@oc11expo23.exchange.mit.edu> <CAM8feuSv=pAr5benHjJm7HRO5+svFvNKWZzYK3a6ZqOHAzsZ4A@mail.gmail.com> <CANYRo8hsymxR9L64g_zyvuCjpMyb9WarRi3ptp7M5qVOv3_dEA@mail.gmail.com> <D5D1275D-757B-44C6-ACA4-439ECD66FCAF@gmail.com>
In-Reply-To: <D5D1275D-757B-44C6-ACA4-439ECD66FCAF@gmail.com>
From: Andrii Deinega <andrii.deinega@gmail.com>
Date: Mon, 19 Jul 2021 14:38:34 -0700
Message-ID: <CALkShcuxDU4tiJfYzXEMG5Wj14NOJgNkJjcuDvzAcKmsyooERQ@mail.gmail.com>
To: Yaron Sheffer <yaronf.ietf@gmail.com>
Cc: Adrian Gropper <agropper@healthurl.com>, Fabien Imbault <fabien.imbault@gmail.com>, Thomas Hardjono <hardjono@mit.edu>, Aaron Parecki <aaron@parecki.com>, GNAP Mailing List <txauth@ietf.org>, Justin Richer <jricher@mit.edu>
Content-Type: multipart/alternative; boundary="000000000000036d3905c780c3df"
Archived-At: <https://mailarchive.ietf.org/arch/msg/txauth/zXtC08OzeiJdj6-z6RjKYbiSOmU>
Subject: Re: [GNAP] Key Rotation
X-BeenThere: txauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: GNAP <txauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/txauth>, <mailto:txauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/txauth/>
List-Post: <mailto:txauth@ietf.org>
List-Help: <mailto:txauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/txauth>, <mailto:txauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Jul 2021 21:38:58 -0000

Hi WG,

I shared a couple of my thoughts/ideas on this topic in
https://github.com/ietf-wg-gnap/gnap-core-protocol/issues/105#issuecomment-806153772
and would like to bring them here again

Another option would be to introduce the client key management URI (similar
to Token Management URI) which accepts an object with similar properties to
what "DPoP proof JWT" has and where the goal of the AS is to make sure that
that the client does have key material.

Upsides

1. may work for all currently defined, as well as for future key formats
pretty much in the same fashion
2. no need to advertise the client key management URI using the Discovery
mechanism which is great and inlined with "the protocol minimizes the need
for any pre-flight discovery"
3. each client may have its own (independent) client key management URI

Basically, this approach looks similar to what was also suggested before
with "sign(k2, sign(k1, (k2))): you use the old key (k1) to sign the new
key (k2), then use the new key to sign that signature and present it"...

Regards,
Andrii


On Mon, Jul 12, 2021 at 10:51 AM Yaron Sheffer <yaronf.ietf@gmail.com>
wrote:

> We absolutely need to support key rotation, and I don’t think we should
> assume an external key management service.
>
>
>
> To me key rotation simply means a way to identify keys (a key ID) and the
> expectation that protocol parties should manage more than one key at a
> time: the current key and potentially older keys, up to some validity
> period.
>
>
>
> If access tokens are bound to long-lived keys, we might need to add an
> explicit, non-opaque, key ID to access tokens.
>
>
>
> Thanks,
>
>                 Yaron
>
>
>
> *From: *TXAuth <txauth-bounces@ietf.org> on behalf of Adrian Gropper <
> agropper@healthurl.com>
> *Date: *Wednesday, July 7, 2021 at 18:28
> *To: *Fabien Imbault <fabien.imbault@gmail.com>
> *Cc: *Justin Richer <jricher@mit.edu>, Thomas Hardjono <hardjono@mit.edu>,
> GNAP Mailing List <txauth@ietf.org>, Aaron Parecki <aaron@parecki.com>
> *Subject: *Re: [GNAP] Key Rotation
>
>
>
> Whatever we do in terms of scope, GNAP should not ignore this key rotation
> issue.
>
>
>
> Regardless of what happened in the era of TLS and IPsec, today we're
> seeing the limits of federated security architectures and everyone needs
> help in the transition to zero-trust architectures. As I understand it,
> we're seeing part of this as the difference between OAuth2 client
> credentials and GNAP.
>
>
>
> If GNAP can do or say something useful about key rotation and client
> credentials, then I hope we do.
>
>
>
> - Adrian
>
>
>
> On Wed, Jul 7, 2021 at 10:40 AM Fabien Imbault <fabien.imbault@gmail.com>
> wrote:
>
> That's a valid point (i.e. you might use whatever system you want, as long
> as you make sure your keys are managed) although one could argue we should
> at the very minimum provide practical methods to ensure sufficient
> security. Which means we could still provide a way native to GNAP, in case
> people don't have their preferred method already?
>
>
>
> Le mer. 7 juil. 2021 à 16:14, Thomas Hardjono <hardjono@mit.edu> a écrit :
>
>
> As much as I like the direction of GNAP, is key-rotation (i.e. key
> management) even part of the GNAP charter?
>
> Key-rotation is a common problem for everyone, starting from the early
> days of IPsec/IKE.
>
> Best
>
> --thomas
>
>
> ________________________________________
> From: TXAuth [txauth-bounces@ietf.org] on behalf of Justin Richer [
> jricher@mit.edu]
> Sent: Wednesday, July 7, 2021 9:57 AM
> To: Fabien Imbault
> Cc: GNAP Mailing List; Aaron Parecki
> Subject: Re: [GNAP] Key Rotation
>
> Aaron, that’s a great point about static registration. That leaves
> ephemeral or otherwise runtime keys, which might be good enough to just
> start a new request when needed?
>
> Ben had previously posited a functional approach like sign(k2, sign(k1,
> (k2))): you use the old key (k1) to sign the new key (k2), then use the new
> key to sign that signature and present it. The thing that I get hung up on
> is having a way to do the key proofing for a new key that works
> consistently for all the different key types in use. The outer signature,
> signing with the new key, is easy: that’s the GNAP key proofing mechanism.
> The trick is carrying a signed object with the key material internally
> somehow — is there a way to handle that consistently across different
> proofing types?
>
> There are a bunch of ways that it could be done with different proofing
> mechanisms and that might be the right approach. HTTP Message Signatures
> can attach multiple signatures. JWK-based-keys could use JWS to wrap the
> key content as part of the payload (so you’d get something like a nested
> JWT). MTLS is a strange one, but if you’re in certificate space you have
> other options like CA’s and OCSP to help manage your keys at a different
> level. So maybe GNAP just specifies the functional requirement at a high
> level and each proofing mechanism or deployment has to fill that somehow in
> its definition?
>
> Still, something in me says that we should be able to do this in one
> consistent pattern, and I’d love to hear more ideas on how that could be
> handled. If we can crack that, then it becomes a matter of applying that to
> a bunch of different requests: grant update, token rotation, initial
> request, etc. This piece, at least, I believe can be applied pretty
> generically.
>
>  — Justin
>
> On Jul 6, 2021, at 6:30 PM, Fabien Imbault <fabien.imbault@gmail.com
> <mailto:fabien.imbault@gmail.com>> wrote:
>
> Hi there,
>
> As far as I know, key rotation remains a cumbersome process in most cases,
> to say the least. It's quite impressive how often that breaks (usually when
> a certificate expires somewhere).
>
> The exception is caddy server, that does it really well. Works fine in
> production.
>
> And then, as a proof of concept, there's DIF Keri that embeds key rotation
> as a primary requirement.
>
> Fabien
>
>
>
>
> Le mar. 6 juil. 2021 à 23:29, Aaron Parecki <aaron@parecki.com<mailto:
> aaron@parecki.com>> a écrit :
> I do think it's important that a client instance should be able to rotate
> its keys, as this is a pretty common practice in other related specs.
>
> You mentioned pre-registered clients which I think is an interesting case.
> I would expect in those cases the client instance wouldn't actually be
> rotating its keys on its own, instead the developer/administrator would go
> into the management console to rotate the keys there, and deploy the new
> keys to the client instance, more like how typical OAuth clients work today.
>
> Coming up with the actual rotation method is definitely an interesting
> challenge, but there must be some prior art to draw from here. Wouldn't
> existing specs like Mutual TLS or even PGP have some mechanism that could
> be reused?
>
> Aaron
>
>
> On Tue, Jun 15, 2021 at 10:52 AM Justin Richer <jricher@mit.edu<mailto:
> jricher@mit.edu>> wrote:
> In the GNAP protocol, most requests are bound to a key. There are pretty
> solid mechanisms for establishing those keys as part of the request, both
> dynamically and as part of some pre-registration step.
>
> However, over time those keys could be rotated out by the parties that
> control them, and GNAP needs to be able to handle this.
>
>         • Access tokens are bound to keys
>                 • We allow rotation of the token value at client instance
> request...
>                 • Should we allow rotation of the key also?
>         • Grant transactions are also bound to keys
>                 • Specifically: the continuation access token is bound to
> a key
>                 • The key is initially the client instance’s key
>                 • Should the client be able to rotate this key separately?
>         • Some client instances have registered keys
>                 • What happens when a client’s registered key rotates?
>
>
> Secure rotation of a key would require some way for the presenter to prove
> possession of both the old and new keys simultaneously. It could be a
> matter of signing the request with the new key and include some artifact
> signed by the old key in the request, or the inverse of that. There are
> likely other methods out there, but this seems simplest.
>
> What situations are people looking at for handling key rotation?
>
>  — Justin
> --
> TXAuth mailing list
> TXAuth@ietf.org<mailto:TXAuth@ietf.org>
> https://www.ietf.org/mailman/listinfo/txauth
> --
> TXAuth mailing list
> TXAuth@ietf.org<mailto:TXAuth@ietf.org>
> https://www.ietf.org/mailman/listinfo/txauth
>
> --
> TXAuth mailing list
> TXAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/txauth
>
> -- TXAuth mailing list TXAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/txauth
> --
> TXAuth mailing list
> TXAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/txauth
>