2022-02-10 19:23:57

by Sonny Sasaka

[permalink] [raw]
Subject: Re: Question about Trusted property

Dear maintainers,

Friendly ping on this question. Does adding "Bonded" property to
org.bluez.Device1 make sense?

On Fri, Feb 4, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
>
> Hi Luiz/BlueZ maintainers,
>
> What is the purpose of the Trusted property on org.bluez.Device1
> interface? Does it mean whether the device is bonded? My experiment
> with BlueZ shows that sometimes a device with "Trusted" property set
> is not bonded (does not have pairing key stored) and also vice versa,
> so I am assuming that the Trusted property means something else. What
> is an example use case of the Trusted property?
>
> Eventually, what I am trying to achieve is for BlueZ clients to find
> out whether a device is Bonded or not. Using the Paired property is
> not very accurate because it is set to true during connection although
> the device is not bonded (pairing key does not persist after
> disconnection). For this purpose, I am about to propose adding
> "Bonded" property to org.bluez.Device1. Some use cases include when
> there is a temporary pairing with a peer device we don't want UI to
> show that the device is in the Bonded device list. What do you think
> about exposing the Bonded state via D-Bus? I will do the
> implementation if this idea makes sense.
>
> Thanks!


2022-02-10 22:35:38

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Question about Trusted property

Hi Sonny,

On Thu, Feb 10, 2022 at 11:23 AM Sonny Sasaka <[email protected]> wrote:
>
> Dear maintainers,
>
> Friendly ping on this question. Does adding "Bonded" property to
> org.bluez.Device1 make sense?
>
> On Fri, Feb 4, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> >
> > Hi Luiz/BlueZ maintainers,
> >
> > What is the purpose of the Trusted property on org.bluez.Device1
> > interface? Does it mean whether the device is bonded? My experiment
> > with BlueZ shows that sometimes a device with "Trusted" property set
> > is not bonded (does not have pairing key stored) and also vice versa,
> > so I am assuming that the Trusted property means something else. What
> > is an example use case of the Trusted property?
> >
> > Eventually, what I am trying to achieve is for BlueZ clients to find
> > out whether a device is Bonded or not. Using the Paired property is
> > not very accurate because it is set to true during connection although
> > the device is not bonded (pairing key does not persist after
> > disconnection). For this purpose, I am about to propose adding
> > "Bonded" property to org.bluez.Device1. Some use cases include when
> > there is a temporary pairing with a peer device we don't want UI to
> > show that the device is in the Bonded device list. What do you think
> > about exposing the Bonded state via D-Bus? I will do the
> > implementation if this idea makes sense.
> >
> > Thanks!

Trusted primary use is to bypass agent authorization, so when set the
agent will not have to authorize profile connections, and yes you can
set a device to be Trusted even without having it paired since the
bonding procedure refers to authentication rather than authorization
which is what Trusted controls.


--
Luiz Augusto von Dentz

2022-02-11 16:52:54

by Sonny Sasaka

[permalink] [raw]
Subject: Re: Question about Trusted property

Hi Luiz,

Thanks for the clarification. So my guess was right that it does not
have to do with bondedness. In that case, do you think it makes sense
to add a "Bonded" flag property to org.bluez.Device1? There are some
use case flows that pair with a peer device but do not actually bond,
and just with Paired property the UI can't know whether to show this
device as "Bonded" or not.

On Thu, Feb 10, 2022 at 1:30 PM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi Sonny,
>
> On Thu, Feb 10, 2022 at 11:23 AM Sonny Sasaka <[email protected]> wrote:
> >
> > Dear maintainers,
> >
> > Friendly ping on this question. Does adding "Bonded" property to
> > org.bluez.Device1 make sense?
> >
> > On Fri, Feb 4, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> > >
> > > Hi Luiz/BlueZ maintainers,
> > >
> > > What is the purpose of the Trusted property on org.bluez.Device1
> > > interface? Does it mean whether the device is bonded? My experiment
> > > with BlueZ shows that sometimes a device with "Trusted" property set
> > > is not bonded (does not have pairing key stored) and also vice versa,
> > > so I am assuming that the Trusted property means something else. What
> > > is an example use case of the Trusted property?
> > >
> > > Eventually, what I am trying to achieve is for BlueZ clients to find
> > > out whether a device is Bonded or not. Using the Paired property is
> > > not very accurate because it is set to true during connection although
> > > the device is not bonded (pairing key does not persist after
> > > disconnection). For this purpose, I am about to propose adding
> > > "Bonded" property to org.bluez.Device1. Some use cases include when
> > > there is a temporary pairing with a peer device we don't want UI to
> > > show that the device is in the Bonded device list. What do you think
> > > about exposing the Bonded state via D-Bus? I will do the
> > > implementation if this idea makes sense.
> > >
> > > Thanks!
>
> Trusted primary use is to bypass agent authorization, so when set the
> agent will not have to authorize profile connections, and yes you can
> set a device to be Trusted even without having it paired since the
> bonding procedure refers to authentication rather than authorization
> which is what Trusted controls.
>
>
> --
> Luiz Augusto von Dentz

2022-02-15 22:40:32

by Sonny Sasaka

[permalink] [raw]
Subject: Re: Question about Trusted property

Hi Luiz,

Friendly ping here. Could you respond to my RFC about adding "Bonded"
property? I am about to write the patch but I would like to hear
whether this makes sense from your perspective. Thanks.

On Thu, Feb 10, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
>
> Hi Luiz,
>
> Thanks for the clarification. So my guess was right that it does not
> have to do with bondedness. In that case, do you think it makes sense
> to add a "Bonded" flag property to org.bluez.Device1? There are some
> use case flows that pair with a peer device but do not actually bond,
> and just with Paired property the UI can't know whether to show this
> device as "Bonded" or not.
>
> On Thu, Feb 10, 2022 at 1:30 PM Luiz Augusto von Dentz
> <[email protected]> wrote:
> >
> > Hi Sonny,
> >
> > On Thu, Feb 10, 2022 at 11:23 AM Sonny Sasaka <[email protected]> wrote:
> > >
> > > Dear maintainers,
> > >
> > > Friendly ping on this question. Does adding "Bonded" property to
> > > org.bluez.Device1 make sense?
> > >
> > > On Fri, Feb 4, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> > > >
> > > > Hi Luiz/BlueZ maintainers,
> > > >
> > > > What is the purpose of the Trusted property on org.bluez.Device1
> > > > interface? Does it mean whether the device is bonded? My experiment
> > > > with BlueZ shows that sometimes a device with "Trusted" property set
> > > > is not bonded (does not have pairing key stored) and also vice versa,
> > > > so I am assuming that the Trusted property means something else. What
> > > > is an example use case of the Trusted property?
> > > >
> > > > Eventually, what I am trying to achieve is for BlueZ clients to find
> > > > out whether a device is Bonded or not. Using the Paired property is
> > > > not very accurate because it is set to true during connection although
> > > > the device is not bonded (pairing key does not persist after
> > > > disconnection). For this purpose, I am about to propose adding
> > > > "Bonded" property to org.bluez.Device1. Some use cases include when
> > > > there is a temporary pairing with a peer device we don't want UI to
> > > > show that the device is in the Bonded device list. What do you think
> > > > about exposing the Bonded state via D-Bus? I will do the
> > > > implementation if this idea makes sense.
> > > >
> > > > Thanks!
> >
> > Trusted primary use is to bypass agent authorization, so when set the
> > agent will not have to authorize profile connections, and yes you can
> > set a device to be Trusted even without having it paired since the
> > bonding procedure refers to authentication rather than authorization
> > which is what Trusted controls.
> >
> >
> > --
> > Luiz Augusto von Dentz

2022-02-16 07:17:01

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Question about Trusted property

Hi Sonny,

On Tue, Feb 15, 2022 at 8:50 AM Sonny Sasaka <[email protected]> wrote:
>
> Hi Luiz,
>
> Friendly ping here. Could you respond to my RFC about adding "Bonded"
> property? I am about to write the patch but I would like to hear
> whether this makes sense from your perspective. Thanks.

Yes please go ahead and introduce it, also remember to add support to
the likes of bluetoothctl as well.

> On Thu, Feb 10, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> >
> > Hi Luiz,
> >
> > Thanks for the clarification. So my guess was right that it does not
> > have to do with bondedness. In that case, do you think it makes sense
> > to add a "Bonded" flag property to org.bluez.Device1? There are some
> > use case flows that pair with a peer device but do not actually bond,
> > and just with Paired property the UI can't know whether to show this
> > device as "Bonded" or not.
> >
> > On Thu, Feb 10, 2022 at 1:30 PM Luiz Augusto von Dentz
> > <[email protected]> wrote:
> > >
> > > Hi Sonny,
> > >
> > > On Thu, Feb 10, 2022 at 11:23 AM Sonny Sasaka <[email protected]> wrote:
> > > >
> > > > Dear maintainers,
> > > >
> > > > Friendly ping on this question. Does adding "Bonded" property to
> > > > org.bluez.Device1 make sense?
> > > >
> > > > On Fri, Feb 4, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> > > > >
> > > > > Hi Luiz/BlueZ maintainers,
> > > > >
> > > > > What is the purpose of the Trusted property on org.bluez.Device1
> > > > > interface? Does it mean whether the device is bonded? My experiment
> > > > > with BlueZ shows that sometimes a device with "Trusted" property set
> > > > > is not bonded (does not have pairing key stored) and also vice versa,
> > > > > so I am assuming that the Trusted property means something else. What
> > > > > is an example use case of the Trusted property?
> > > > >
> > > > > Eventually, what I am trying to achieve is for BlueZ clients to find
> > > > > out whether a device is Bonded or not. Using the Paired property is
> > > > > not very accurate because it is set to true during connection although
> > > > > the device is not bonded (pairing key does not persist after
> > > > > disconnection). For this purpose, I am about to propose adding
> > > > > "Bonded" property to org.bluez.Device1. Some use cases include when
> > > > > there is a temporary pairing with a peer device we don't want UI to
> > > > > show that the device is in the Bonded device list. What do you think
> > > > > about exposing the Bonded state via D-Bus? I will do the
> > > > > implementation if this idea makes sense.
> > > > >
> > > > > Thanks!
> > >
> > > Trusted primary use is to bypass agent authorization, so when set the
> > > agent will not have to authorize profile connections, and yes you can
> > > set a device to be Trusted even without having it paired since the
> > > bonding procedure refers to authentication rather than authorization
> > > which is what Trusted controls.
> > >
> > >
> > > --
> > > Luiz Augusto von Dentz



--
Luiz Augusto von Dentz

2022-02-16 19:51:05

by Sonny Sasaka

[permalink] [raw]
Subject: Re: Question about Trusted property

Thanks for the confirmation, Luiz. We will send patches related to this RFC.

On Tue, Feb 15, 2022 at 5:57 PM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi Sonny,
>
> On Tue, Feb 15, 2022 at 8:50 AM Sonny Sasaka <[email protected]> wrote:
> >
> > Hi Luiz,
> >
> > Friendly ping here. Could you respond to my RFC about adding "Bonded"
> > property? I am about to write the patch but I would like to hear
> > whether this makes sense from your perspective. Thanks.
>
> Yes please go ahead and introduce it, also remember to add support to
> the likes of bluetoothctl as well.
>
> > On Thu, Feb 10, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> > >
> > > Hi Luiz,
> > >
> > > Thanks for the clarification. So my guess was right that it does not
> > > have to do with bondedness. In that case, do you think it makes sense
> > > to add a "Bonded" flag property to org.bluez.Device1? There are some
> > > use case flows that pair with a peer device but do not actually bond,
> > > and just with Paired property the UI can't know whether to show this
> > > device as "Bonded" or not.
> > >
> > > On Thu, Feb 10, 2022 at 1:30 PM Luiz Augusto von Dentz
> > > <[email protected]> wrote:
> > > >
> > > > Hi Sonny,
> > > >
> > > > On Thu, Feb 10, 2022 at 11:23 AM Sonny Sasaka <[email protected]> wrote:
> > > > >
> > > > > Dear maintainers,
> > > > >
> > > > > Friendly ping on this question. Does adding "Bonded" property to
> > > > > org.bluez.Device1 make sense?
> > > > >
> > > > > On Fri, Feb 4, 2022 at 4:02 PM Sonny Sasaka <[email protected]> wrote:
> > > > > >
> > > > > > Hi Luiz/BlueZ maintainers,
> > > > > >
> > > > > > What is the purpose of the Trusted property on org.bluez.Device1
> > > > > > interface? Does it mean whether the device is bonded? My experiment
> > > > > > with BlueZ shows that sometimes a device with "Trusted" property set
> > > > > > is not bonded (does not have pairing key stored) and also vice versa,
> > > > > > so I am assuming that the Trusted property means something else. What
> > > > > > is an example use case of the Trusted property?
> > > > > >
> > > > > > Eventually, what I am trying to achieve is for BlueZ clients to find
> > > > > > out whether a device is Bonded or not. Using the Paired property is
> > > > > > not very accurate because it is set to true during connection although
> > > > > > the device is not bonded (pairing key does not persist after
> > > > > > disconnection). For this purpose, I am about to propose adding
> > > > > > "Bonded" property to org.bluez.Device1. Some use cases include when
> > > > > > there is a temporary pairing with a peer device we don't want UI to
> > > > > > show that the device is in the Bonded device list. What do you think
> > > > > > about exposing the Bonded state via D-Bus? I will do the
> > > > > > implementation if this idea makes sense.
> > > > > >
> > > > > > Thanks!
> > > >
> > > > Trusted primary use is to bypass agent authorization, so when set the
> > > > agent will not have to authorize profile connections, and yes you can
> > > > set a device to be Trusted even without having it paired since the
> > > > bonding procedure refers to authentication rather than authorization
> > > > which is what Trusted controls.
> > > >
> > > >
> > > > --
> > > > Luiz Augusto von Dentz
>
>
>
> --
> Luiz Augusto von Dentz