[core] Story for "How do I get my HTTP authentication token in?"

Christian Amsüss <christian@amsuess.com> Mon, 13 September 2021 12:25 UTC

Return-Path: <christian@amsuess.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 377333A0A40 for <core@ietfa.amsl.com>; Mon, 13 Sep 2021 05:25:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 HUNKq1lT0rF1 for <core@ietfa.amsl.com>; Mon, 13 Sep 2021 05:25:37 -0700 (PDT)
Received: from prometheus.amsuess.com (alt.prometheus.amsuess.com [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 74A673A0A3D for <core@ietf.org>; Mon, 13 Sep 2021 05:25:35 -0700 (PDT)
Received: from poseidon-mailhub.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bd]) by prometheus.amsuess.com (Postfix) with ESMTPS id A973341687 for <core@ietf.org>; Mon, 13 Sep 2021 14:25:31 +0200 (CEST)
Received: from poseidon-mailbox.amsuess.com (poseidon-mailbox.amsuess.com [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bf]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 4B542D7 for <core@ietf.org>; Mon, 13 Sep 2021 14:25:30 +0200 (CEST)
Received: from hephaistos.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:8c44:e3df:d5ca:1614]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id E2EDC245 for <core@ietf.org>; Mon, 13 Sep 2021 14:25:29 +0200 (CEST)
Received: (nullmailer pid 2343715 invoked by uid 1000); Mon, 13 Sep 2021 12:25:29 -0000
Date: Mon, 13 Sep 2021 14:25:29 +0200
From: Christian Amsüss <christian@amsuess.com>
To: core@ietf.org
Message-ID: <YT9DOR4C32YXHYnv@hephaistos.amsuess.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="6ATHClaA6UB9XB/K"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/C1lU_JEviSjxWRPWf51-K6Wf5ew>
Subject: [core] Story for "How do I get my HTTP authentication token in?"
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Sep 2021 12:25:42 -0000

Hello CoRE,

being the 3rd time[1][2][3] that someone (publicly) wants to put a
bearer token into a CoAP option, I think it's time for a FAQ entry, but
I don't know what precisely to put there.

The standard answer is "don't use bearer tokens, and set up your
connection PoP'ing your token", but at least the folks at [3] can't do
that as long as one of their deployments[4] has a trusted gateway that
passes on the token.

So, what's the best we can recommend them to do?

* If the transport is OSCORE, they can probably use EDHOC and stuff it
  into a custom ID_CRED_I in the style of an UCCS, limiting the bearer
  to the initiator role. (If of course they had a CWT it'd be really
  straightforward).

  (Nice benefit over the frequent "pass it as an option" approach is
  that it's now in the payload and can thus be blockwised.)

* Is there any point in DTLS where a equivalent information could be fed
  in? (There's TLS-CWT[5], could that too do UCCS?)

(I think we should provide some guidance, for otherwise things will just
be deployed anyway, and CoAP blamed when they fail.)

BR
c

[1]: http://mailarchive.ietf.org/arch/msg/core/Wnr3G_2sTpErDP4XoQ0o0HPmk5c
[2]: https://stackoverflow.com/questions/58374333/how-to-send-token-in-coap-requests
[3]: https://github.com/matrix-org/matrix-doc/pull/3079#issuecomment-917708454
[4]: https://gitlab.com/comatrix/comatrix/-/tree/master
[5]: https://datatracker.ietf.org/doc/html/draft-tschofenig-tls-cwt-02

-- 
We are dreamers, shapers, singers, and makers.
  -- Elric