Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3737218pxv; Mon, 28 Jun 2021 11:31:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSUfQ+ZbiB41eb/tWpK5xChR34iWWupqNYowYM9kEzctfABjfi1nUMWK77pjqRd9FpWwy+ X-Received: by 2002:a6b:7617:: with SMTP id g23mr658011iom.63.1624905098601; Mon, 28 Jun 2021 11:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624905098; cv=none; d=google.com; s=arc-20160816; b=i22yPocPNQHuIXIIcdxxFj1Z1CJT7hgr0I3pjUh2+7kTp0TlwPuoCjUAC8o9rOV+ur 93oATOuljF9dn7mMVsU7zV/jdqOaRq/2Ksqu0x95zfK9euE10dBj/ZJmZmsbZ6P1Iens TV4vMziNnukL/95vfWDgTGUs39CChNRrzfiCVuKHjY8R57ELe0nUpGOWqNb35U5oLIU4 Sootz9LQjbH6EJBET3QGKTcOAWBEAIBMOEKEo77X429tHsiJ2z06/U7jYmyl+8z+voCh 2pvugTVILxgP1ThGHsO7GY+a/Yp7YPXn8v6mCyU62yjRQ91sfO9V+kEd7fsVrfM2wBYT Ykdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=BnX7Q+dBZiIp3xHeq+j8h9daK4SyY3YdquqiWT+oC2s=; b=bnoWpzUSAVjJf4HzaRdHDni072N5fylYMRKO8p/VKDccLSWKeAUNRB+oUNOZxxHp2l krYYAerpPTSh8EHS1FlggWaONPN6bRRB7McGh9Eb83izk8/WD1iXYfuOX5SNaqEe+RO9 WOHo2ocpJ0B5eyLr1kR8mXnyFAJRZRcK0pUa95N492l8LGlM5OLrNAbXr9K6gunoIDe8 7YjdkxERlCqzFLR+QiyvUYRVVoOVNpyWhmZtrQfZAEMfSAzAdgEcFoIOWYsYyGdHepDa vnnbnigm3vKEhgi6G8K23ssXMlM2SY5Mtyh1BulFovuiuwWjDj1BTKLtzQEXJatU7NYD 18ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si20675647iov.14.2021.06.28.11.31.04; Mon, 28 Jun 2021 11:31:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234107AbhF1PDo (ORCPT + 99 others); Mon, 28 Jun 2021 11:03:44 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36083 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236344AbhF1PBm (ORCPT ); Mon, 28 Jun 2021 11:01:42 -0400 Received: (Authenticated sender: hadess@hadess.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 45B0560013; Mon, 28 Jun 2021 14:59:14 +0000 (UTC) Message-ID: <363a48e3df83590ad4f53383830ca447c71939d7.camel@hadess.net> Subject: Re: [PATCH BlueZ] doc/agent-api: Add AuthenticationFailed method From: Bastien Nocera To: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Date: Mon, 28 Jun 2021 16:59:13 +0200 In-Reply-To: <20210623184355.3685859-1-luiz.dentz@gmail.com> References: <20210623184355.3685859-1-luiz.dentz@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.2 (3.40.2-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Wed, 2021-06-23 at 11:43 -0700, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz > > This introduces AuthenticationFailed method which is used to indicate > when there was an authentication failure with a remote device which is > recommended by the core spec: > > BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1314: >  '5.2.2.3 Simple Pairing after authentication failure >  When the link key is stored, subsequent connections to the same device >  will use authentication but this may fail if the remote device has >  deleted the link key. Table 5.2 defines what shall be done depending >  on the type of the link key and whether bonding was performed or not.' > > So following Table 5.2 recommendation the AuthenticationFailed method > would be called when authentication fails with a bonded device. > --- >  doc/agent-api.txt | 5 +++++ >  1 file changed, 5 insertions(+) > > diff --git a/doc/agent-api.txt b/doc/agent-api.txt > index 0d9347cab..91d752b0a 100644 > --- a/doc/agent-api.txt > +++ b/doc/agent-api.txt > @@ -183,3 +183,8 @@ Methods             void Release() >   >                         This method gets called to indicate that the > agent >                         request failed before a reply was returned. > + > +               void AuthenticationFailed(object device, byte status) > + > +                       This method indicates that there was an > authentication > +                       failure with a remote device. Is there a way that we could have some persistent storage for when the last authentication error happened? This would allow showing a /!\ icon in the device list even though we don't have an agent running in the session, just when the settings are open, in GNOME. This would also allow the settings to get this information in the first place, otherwise we'd need to have some side-channel to funnel that information from the "desktop-wide" agent to the settings agent. I've made the upstream bug[1] public now, can you reference it in the commit message? Cheers [1]: https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/issues/91