Re: [OAUTH-WG] Reuse of "state" across different AS in draft-bradley-oauth-jwt-encoded-state-08

John Bradley <> Sat, 19 May 2018 13:12 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C7E5612D876 for <>; Sat, 19 May 2018 06:12:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id j8-_zQkNiJqh for <>; Sat, 19 May 2018 06:12:24 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:400c:c0c::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id CF95312778E for <>; Sat, 19 May 2018 06:12:23 -0700 (PDT)
Received: by with SMTP id x9-v6so8891832wrl.13 for <>; Sat, 19 May 2018 06:12:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jfsKUygfs03AisnWTI1ErclJk7T9LO42xE02eSit6qY=; b=wENxj4Y+70loaoh7b1uIa8QpL/1YfQ2OefKMk2hyQdynBEds4c5SP6PeL6eQttrdwq rjonTsdmtggIL8Tk5JpW7k1Ss5/ZmNIUUBT1vnaBMLTZb1KAesoruJsYzWgqQ/MMNmW7 kj7RJ+ylDPnyh83IbBX1gMhmfLHgqhYxq0zpKys7E/aKo5FtEE+Ba9SK5y2rVeNcPO0F KL0FY28b/VWJWf45NH/6naXdqWSY1aYqJiTerwsPWrrKX0goOfmzu/qcQwV6fnHDZwEG YQfakz+7JQuLN/Vb9JCQwTdVRxrzfrSsKhwZ+IKZNUvOKDgxjaqP7UMl7Sn7fNEd9H3E 2mGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jfsKUygfs03AisnWTI1ErclJk7T9LO42xE02eSit6qY=; b=k4VPtDWx5LHvK3fPh/TSel8iDT7hIoFyoDTOm7HWaqeVSM0p3yBHb+GnXBqGKBqS4u jrav4SUVhBfa2DDCDjsTquuRh4mJiogKX040d5g7U2HB6N/xi2jOp+0ZvO0ehFJt2HVk LgnXxlR9AqHDilGKsAS1m9eJ7krrmMhYJw5+ADFrlLzb2V21h1iXK6ADbmax/zrCeKgj 0/4ZnnPt15PLE3jC3kP6QwgKWSJ9Po+5tRrU7mTmRbDQQ0FXlkrcoANFiZYZDguopFx6 y7Qx70HgEU/PziUYlNJssAWEQOoS1/rnHzcy6tL8K8DkJAvOykjfnxi8BcDAVmU1y9Y/ 8w9Q==
X-Gm-Message-State: ALKqPwf0D+zJDuOSriYvP1+RZujHcTaHnMkrDbAsRMB8UtX0NukAHUKj 8//ySFRRfJM57M+ZMh5bK4VYBRkCoiaV0N1NRs5VhQ==
X-Google-Smtp-Source: AB8JxZqVE6rNj2RDmws8ncrEDds/0FH45t8w6RZA3EfaybF/u34SUErb07xqRIk5lNubBx2VzKqj9eRMJ6l8sTxQWq8=
X-Received: by 2002:adf:9a8e:: with SMTP id a14-v6mr11465307wrc.50.1526735541834; Sat, 19 May 2018 06:12:21 -0700 (PDT)
MIME-Version: 1.0
References: <> <> <>
In-Reply-To: <>
From: John Bradley <>
Date: Sat, 19 May 2018 15:12:10 +0200
Message-ID: <>
To: Daniel Fett <>
Cc: IETF oauth WG <>
Content-Type: multipart/alternative; boundary="000000000000a32929056c8ed1f9"
Archived-At: <>
Subject: Re: [OAUTH-WG] Reuse of "state" across different AS in draft-bradley-oauth-jwt-encoded-state-08
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 19 May 2018 13:12:27 -0000


On Sat, May 19, 2018, 3:09 PM Daniel Fett <>

> Am 18.05.2018 um 18:20 schrieb John Bradley:
> I am not against having "as" as REQUIRED.
> While we are at it should we recommend that rfp be single use?
> If the state JWT is *not* signed and the client has no other means to
> check the integrity of the JWT (e.g., by storing a copy in the browser's
> session), rfp MUST be single use, where single use means that once a new
> authorization request has been sent, all old "rfp" values (for that browser
> session) become invalid.
> (Rationale: The state reuse attack across AS would still be possible,
> since an attacker could just replace the "as" value in an unsigned JWT.)
> If the state JWT is signed and "as" is contained in the JWT, rfp does not
> need to be single use in this sense.
> To prevent defense-in-depth against the usage of leaked of state values,
> in both cases, a state value that has once been accepted at the redirection
> endpoint SHOULD be invalidated for future uses. In the the case of an
> unsigned JWT, this means that a specific rfp value SHOULD only be accepted
> once. If the JWT is signed, it would be sufficient to memorize the hashes
> of used JWTs or their jti values, and decline JWTs with the same hash/jti.
> (SHOULD since this is impossible for stateless clients.)
> (Overall, it seems like not signing state JWTs is not a good idea.)
> This draft hangs around as a ID and probably is not read by most people.
> We may also want to mention it in security topics if we haven't.
> I will check the status there.
> I need to update this in the next couple of weeks to keep it from expiring
> anyway.
> I took a cursory look at the draft and I see two more issues:
> (1)
> > The "as" claim if present MUST correspond to the URI endpoint registered
> as the "redirect_uri" for that AS.
> This wording is not sufficient:
> - The AS must be the expected AS (if there are means to check that, for
> example the browser session).
> - The redirection URI on which the authorization response was actually
> received matches the "as" value.
> (2)
> > The client parses it as a JWT.  It then verifies the signature of the
> JWT (if signed)
> The client should check the signature if it expects the JWT to be signed,
> not only if the received JWT is signed. I may be nitpicking here, but
> developers should not be lead to believe that "if signed(received_jwt):
> check_sig(received_jwt)" would be a good implementation choice.
> - Daniel
> --
> SEC - Institute of Information Security
> University of Stuttgart
> Phone +49 711 685 88468
> Universitätsstraße 38 - 70569 Stuttgart - Room 2.434