Re: [OAUTH-WG] OAuth 2.1: Missing token?

Warren Parad <wparad@rhosys.ch> Fri, 04 February 2022 09:55 UTC

Return-Path: <wparad@rhosys.ch>
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 A6F013A136A for <oauth@ietfa.amsl.com>; Fri, 4 Feb 2022 01:55:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.088
X-Spam-Level:
X-Spam-Status: No, score=-2.088 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, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rhosys.ch
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 uZP-iF0R1aqV for <oauth@ietfa.amsl.com>; Fri, 4 Feb 2022 01:55:18 -0800 (PST)
Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (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 8B93B3A1367 for <oauth@ietf.org>; Fri, 4 Feb 2022 01:55:18 -0800 (PST)
Received: by mail-yb1-xb2f.google.com with SMTP id v186so17167880ybg.1 for <oauth@ietf.org>; Fri, 04 Feb 2022 01:55:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rhosys.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y/Gm71TeqtMvnm6xBGpzF0IoVacFnQzkXWRie9TQ9Sc=; b=XlAAd7QyF5ntOgDMxUeA8kB6nEpyu/5vdtaq5OkpktJI/sOF/IVzFBKmnq/T7am/IO RVFsWwODy67NH94NcsHavVRylBleV7vmtaMYeHrAbSCcoMCr/e/62l9B27czBTP0PHUf GCJLpqxnJHz85DahVFVigsU+AdHbgwXU+74GQjpC24U+2UKWfhAa0/PAGvYUo0btzblp GulZ2qvqsA32t9pTf+njRvRbIAZ+lW5z4rdrEYX7CIuJIgdZf0BlywDTqqgQjRfYP+0c 2NmazkYYcoLt5Pb35LfpADAvDMYIvdqNYQmOlTRBlE33OYaJLnR/LETce3s7EBQvnpdC dZ5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y/Gm71TeqtMvnm6xBGpzF0IoVacFnQzkXWRie9TQ9Sc=; b=CDVLf/61QF6w+5y/JSkhLwvBSUZtx8KSWvnZIyn1FfnJMF9TXnvCpymTIwEGndNXKq au/BvY1BfYjRItrb4hwjcmnHmWvAjHvqlei3g6DvXE9N6u+72mbwtrcPa+MNpHxiZez1 wZ9uGsqA062Njrzyd+ubQNF+BMEP1hYE1s+LYJLo0ymvJmrEJOOM0ru1QAALD0oPcUTj JMe+loEUONZPF4L6EiyNee4GzAE6YnZbkPAudOLWTxeJSe+MnBzE+fKjQdAKDbUi62tq 4B799WlA3shdfXtCj/LSAf2Q/n1CYxWlin9/n+Xeu7ZRGctzUUKWeu4O3NnW/sHs59+Y jsuQ==
X-Gm-Message-State: AOAM533XoeEnb+xfYX/GR8YrHNnI9o89oKpo/72h5TOfktvGJwbrkYwE HBUPzKBLiLwcO6ST6lCSe4lzgJZPrncBt98cFjmLr8IWvxqQ
X-Google-Smtp-Source: ABdhPJyeHze+Ww37dFKgu35yg78ASCxBif9zHnRt6sEw1x6y7KmbByC3FjFLb9vAbsDrkbrYoBcoMt5of3mtqqNT5hc=
X-Received: by 2002:a25:3cc6:: with SMTP id j189mr1794227yba.660.1643968516601; Fri, 04 Feb 2022 01:55:16 -0800 (PST)
MIME-Version: 1.0
References: <CAGRquTpc0Un5igAdx_ftcMQvpGCEwxBNOjNL+dyk3D0EK9T3Jg@mail.gmail.com>
In-Reply-To: <CAGRquTpc0Un5igAdx_ftcMQvpGCEwxBNOjNL+dyk3D0EK9T3Jg@mail.gmail.com>
From: Warren Parad <wparad@rhosys.ch>
Date: Fri, 04 Feb 2022 10:55:06 +0100
Message-ID: <CAJot-L3mh=jZUoMjNdy=9qm9Tsh6YOTZdV=78wuAvQJX=kZNcw@mail.gmail.com>
To: Johannes Koch <johannes.koch=40avenga.com@dmarc.ietf.org>
Cc: oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000744d2305d72e3fe4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/RMWS_uHMbUP2JuoQfUJnN8pKsBk>
Subject: Re: [OAUTH-WG] OAuth 2.1: Missing token?
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 04 Feb 2022 09:55:24 -0000

It may help to specifically clarify which interaction with the AS are we
talking about here.

Warren Parad

Founder, CTO
Secure your user data with IAM authorization as a service. Implement
Authress <https://authress.io/>.


On Fri, Feb 4, 2022 at 10:16 AM Johannes Koch <johannes.koch=
40avenga.com@dmarc.ietf.org> wrote:

> Hi there,
>
> a question about
> https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-04
>
> 5.2.3.  Error Codes
>
>    "invalid_request":  The request is missing a required parameter,
>       includes an unsupported parameter or parameter value, repeats the
>       same parameter, uses more than one method for including an access
>       token, or is otherwise malformed.  The resource server SHOULD
>       respond with the HTTP 400 (Bad Request) status code.
>
>    "invalid_token":  The access token provided is expired, revoked,
>       malformed, or invalid for other reasons.  The resource SHOULD
>       respond with the HTTP 401 (Unauthorized) status code.  The client
>       MAY request a new access token and retry the protected resource
>       request.
>
> Now, what is the intended error code for the situation where no access
> token is provided? The description for invalid_token seems to imply that
> one token was provided.
> As the token may be seen as a required parameter, invalid_request may be
> appropriate. However, a missing token smells more like HTTP 401
> (Unauthorized).
>
> Should this be an additional error code (missing_token)? Or should this
> case be added to invalid_token?
>
> --
> Johannes Koch
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>