Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3944907pxv; Mon, 28 Jun 2021 17:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3A/FsCYJGONgPJiq0N2VpdtUsayGnS9ot/B0cNFLJyNjwLmc1nUwJ+fj8pk8ki2Bzbf3r X-Received: by 2002:a5d:9958:: with SMTP id v24mr1666045ios.4.1624926260805; Mon, 28 Jun 2021 17:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624926260; cv=none; d=google.com; s=arc-20160816; b=LiaBhvESpQmdm+Jvt7Nu+fwdy7TEnrCRDQtNVD/WuBIt7bKW0GQT9e9eVE2C4xYB+9 L/H9vWVdaMQAK3CI+8A4KHfREwo58JcLkPN/9JNJ16d5XRmf7I3YJlp8vQopsOzt9yHG 3u8o3MWEAvCeg/uCFkDHCO0cw1t/vy7OHf1NJh+qZLO6KR8R371z7qjjWZTjFTwOdgYf huryr74wIuD9sepopKm039F5nYihaP+HyJUyBEqmURzJb9o2XMSh9eUfWeHMHVUwglXD 4Ic9YXcaAye8UzCuAExhQxkfDe4214AahDdPkh1hw3EC8c+vdbgpcDTGeF6rQXvTjRKe Qp/w== 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:cc:to:from:subject :message-id; bh=WPRfcN/lTdAXMFDrQYWQ6JbvaBUc9jE0KOS14CTvJvQ=; b=n+wIKsLXLj237cPABJgxIxvfnSCtjElz2crgo6zdGrZ3ksWbxKhIc8Ehdro464uSlI rICJznUC+jJopcuEct1rZHj75tx4fL+4G7UtOBvaXCyQQYUv8vT+ZBarXiEaC/JELBUo Xbnr1K8QXZX6LS7I3DZppHSYx4ZKzBx4DfK1ON2jZk+UsGwlTj7wwROqBSpZed8CcSPA iODEDvNZyqIl0933gXjeN8Qgi0KfwEI6NtUm59q85LFdG02G0zZys3flDVwatDnsQo6w 8+pQt8Z8wLmf7U7a+1emj1AWBMx8Y1v7xfZ7XYkQpU7umOnsLx878MI78gp2OystecBw Yx0Q== 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 k14si17016876ion.22.2021.06.28.17.23.53; Mon, 28 Jun 2021 17:24:20 -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 S237166AbhF1T6o (ORCPT + 99 others); Mon, 28 Jun 2021 15:58:44 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:36053 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237160AbhF1T6o (ORCPT ); Mon, 28 Jun 2021 15:58:44 -0400 Received: (Authenticated sender: hadess@hadess.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id E1984100002; Mon, 28 Jun 2021 19:56:16 +0000 (UTC) Message-ID: Subject: Re: [PATCH BlueZ] doc/agent-api: Add AuthenticationFailed method From: Bastien Nocera To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" Date: Mon, 28 Jun 2021 21:56:16 +0200 In-Reply-To: References: <20210623184355.3685859-1-luiz.dentz@gmail.com> <363a48e3df83590ad4f53383830ca447c71939d7.camel@hadess.net> 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 Mon, 2021-06-28 at 10:32 -0700, Luiz Augusto von Dentz wrote: > Hi Bastien, > > On Mon, Jun 28, 2021 at 7:59 AM Bastien Nocera > wrote: > > > > 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. > > I guess you are suggesting introducing a property to the device > object > e.g. AuthenticationStatus or something like that, that way one can > figure out if the device needs repairing or not. That would work pretty well, yes. > Alternatively we > could just remove the device, after a few attempts, if there is no > agent of the agent don't implement the new method. This is very much a dark pattern. I can expect to get bug reports about devices disappearing from the known devices list on the computer when it's actually the device losing its link keys for example. I wouldn't recommend doing this at all, or by default. > > > 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? > > Sure. > > > Cheers > > > > [1]: https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/issues/91 > > > >