Re: [OAUTH-WG] Cookies & headers in OAuth 2.0 Security Best Current Practice?

Dick Hardt <dick.hardt@gmail.com> Sun, 05 November 2023 19:10 UTC

Return-Path: <dick.hardt@gmail.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A22E9C18E190 for <oauth@ietfa.amsl.com>; Sun, 5 Nov 2023 11:10:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.105
X-Spam-Level:
X-Spam-Status: No, score=-7.105 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VJi3mp9Ypr6K for <oauth@ietfa.amsl.com>; Sun, 5 Nov 2023 11:10:00 -0800 (PST)
Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F2932C1519B4 for <oauth@ietf.org>; Sun, 5 Nov 2023 11:09:59 -0800 (PST)
Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-da077db5145so3658965276.0 for <oauth@ietf.org>; Sun, 05 Nov 2023 11:09:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699211399; x=1699816199; darn=ietf.org; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YKyL6DxCFojmHF2Ie9Bv5FVCbVgOi67QbM/C63SwNeM=; b=K/olEq5yK3L15uHQLVgtQa3KFt0vpEy4t7rtTvB+KzVFsH0TctYH4OaJrJn2L9tcFl Wyt7shbbZ2+MLEk0zyIj+vIqmVQaYwzylKwzRQOApz38zGC3NJfdOIOFcfUanmilgIqj MK4RGeARTQuLMUWT8L5Re/SzAXZXSvCTKKJAmFhDz67Df/CLhnO5tFjtrS7c23ebGTvn Uv4huBuQuiY7029VEiyYGH0U4mErEF8V2NI0LX/yVNeHqsgXWVzFYbMq81nOV/HjdDno uq4PRmKcvHVbEalFU3jeAvBIuy0ghOBNbkfm5SU/RtWMjKquNWbCaxZuOcoa22TAMTZD /taA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699211399; x=1699816199; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YKyL6DxCFojmHF2Ie9Bv5FVCbVgOi67QbM/C63SwNeM=; b=EoDr+SSOIOXB/qMD0bsgRdU1RBFzGCfSkiQyINgU+vhl8jrEnj+oUeVKzcdF4SKw7g PwqPW9vv670JNW2rBJ79oi7bcZFZyF6F0EQjXh+14LcXnl4c3jnsGcV87D1RC7JjxdIy XNbKL3ApCFuko5A07J/NJ+c06qfcdP0Rh8ts/HW80p/iWPEKOfshDqnoPEMyWD08litN TivsHHhxgK/UsxSRuWIPnczjNHM1C93cacP7tFoWR6Rebl+FB/E41EOU/oQ2pNukJ5ud RDs8jKrkGyGmSKeP30pZo0TO8KhYiSR1bfeDP+XuaB/24vLsByKhPPf3Vg/HdA3SsKsu SEMQ==
X-Gm-Message-State: AOJu0Yy29GHo93aQkPGxKPQUaYGFzPmVLdVCe8Wwzyr3kFGFngDJ2wOH XMUVj78R0/5Dw/crDEE5foCWgI6fEck6lb0M0k8xx7tuMqQ=
X-Google-Smtp-Source: AGHT+IEpOn8LzcPxZLH9sAdx8DFesZyg++P9DgsypDgXE7U/LkI/g4m8RT1UPXRt8X0jLk4cfKRgetkRI0qB25ohdYM=
X-Received: by 2002:a25:d0d0:0:b0:da0:2757:eb0 with SMTP id h199-20020a25d0d0000000b00da027570eb0mr26525304ybg.44.1699211398946; Sun, 05 Nov 2023 11:09:58 -0800 (PST)
MIME-Version: 1.0
References: <CAD9ie-sh0qnGzg5VwU_enq2Br9hH5zgm86z9i7vdMj_uQs=4yA@mail.gmail.com> <CAGBSGjrMDrXMd2ApKmLn_LVgMSLME-wvHqPCTpzgDxk5_+kRSA@mail.gmail.com>
In-Reply-To: <CAGBSGjrMDrXMd2ApKmLn_LVgMSLME-wvHqPCTpzgDxk5_+kRSA@mail.gmail.com>
Reply-To: Dick.Hardt@gmail.com
From: Dick Hardt <dick.hardt@gmail.com>
Date: Sun, 05 Nov 2023 11:09:23 -0800
Message-ID: <CAD9ie-sFLij4K+3zB0zk3mVqc_xMUqMb6uNO_ozL_bEAP0pE1g@mail.gmail.com>
To: Aaron Parecki <aaron@parecki.com>
Cc: oauth@ietf.org
Content-Type: multipart/alternative; boundary="000000000000d5240b06096c7b4d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/du2SJGRiGhoba7vgdBh-my3g0C0>
Subject: Re: [OAUTH-WG] Cookies & headers in OAuth 2.0 Security Best Current Practice?
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Nov 2023 19:10:00 -0000

The only rationale for incorporating cookie and header best practices in
the BCP would be if there is not a "good" reference to refer the reader to.

Aaron: Do you agree that the BCP should call out that cookie and
header best practices should be followed?

On Sun, Nov 5, 2023 at 11:03 AM Aaron Parecki <aaron@parecki.com> wrote:

> I don't think the Security BCP should incorporate cookie best practices
> directly in the document. If anything, it sounds like possibly a candidate
> for inclusion in the Browser Apps BCP.
>
> There are already some mentions of these cookie properties mentioned in
> the Browser Apps BCP, though only in reference to specific architectures,
> not as a general best practice. For example:
>
>
> https://www.ietf.org/archive/id/draft-ietf-oauth-browser-based-apps-15.html#pattern-bff-cookie-security
>
> Aaron
>
> On Sun, Nov 5, 2023 at 10:48 AM Dick Hardt <dick.hardt@gmail.com> wrote:
>
>> Hey
>>
>> I was reviewing security on some sites I managed and checked to see if
>> the recommendations were in the BCP.
>>
>> I don't see anything around cookies such as httpOnly, sameSite, secure.
>>
>> I saw some HTTP security header suggestions buried in 4.16
>> (X-Frame-Options, CSP), but not for Strict-Transport-Security,
>> Permissions-Policy, or X-Content-Type-Options, and the CSP guidance is
>> rather vague.
>>
>> I understand these are general web security best practices, and perhaps I
>> missed it, but I think it would be useful to call out that best security
>> practices around cookies and headers should also be followed in Section 2,
>> and either have the best practices included, or direct the reader where to
>> find them.
>>
>> /Dick
>>
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>>
>