You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Přemysl Vyhnal <pr...@vyhnal.net> on 2021/03/28 00:47:29 UTC

KeyringProvider for new versions of Gnome [NETBEANS-4150]

Hi,
I looked a bit into why keyring is not used on new versions of Gnome
(see the email below), there is also Jira for it: NETBEANS-4150

- On Gnome 'gnome-keyring' library was used which is no longer present
in new versions and is replaced by "libsecret".
- libsecret calls the "Secret Service" API using D-Bus.
- Secret Service should be supported by both gnome and kde desktops.

Now we could
1) add a new KeyringProvider that would use libsecret using JNA - same
like GnomeProvider currently uses gnome-keyring.
2) Or we could call the Secret Service D-Bus using dbus-send
application (that should be installed on gnome desktops) -
KWalletProvider is currently done that way using qdbus application
3) or we could call D-Bus "directly" from java probably using dbus-java [1]

What would be the preferred way to do this? 3) looks the best to me
but what are the rules about adding new dependencies?
dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.

Thanks
Regards
Premek


[1] https://github.com/hypfvieh/dbus-java


---------- Forwarded message ---------
From: Laszlo Kishalmi <la...@gmail.com>
Date: Tue, Mar 23, 2021 at 10:04 PM
Subject: Re: master password
To: <us...@netbeans.apache.org>


Well, if it is Gnome. Our JNA support Gnome 2 API only which is no
longer available in recent Ubuntu (and probably other) distributions.
There was an option to install that library 18.04, but that is no
longer available.

On 3/23/21 2:00 PM, Eric Bresie wrote:

Sounded like somethings were reinstalled ..but did some of it not get
reinstalled fully or is missing?


FINE [org.netbeans.modules.keyring.gnome.GnomeProvider]
java.lang.UnsatisfiedLinkError: Unable to load library 'gnome-keyring':
libgnome-keyring.so: cannot open shared object file: No such file or directory
libgnome-keyring.so: cannot open shared object file: No such file or directory
Native library (linux-x86-64/libgnome-keyring.so) not found in
resource path (/mnt/common/netbeans-12.3/netbeans/platform/lib/boot.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-modules.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-util.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-util-lookup.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-util-ui.jar)


FINE [org.netbeans.modules.keyring.win32.Win32Protect]: not running on Windows
FINE [org.netbeans.modules.keyring.utils.Utils]: chmod go-r
/home/cenbe/.netbeans/12.3/config/Preferences/org/netbeans/modules/keyring.properties
WARNING [org.netbeans.modules.keyring.fallback.MasterPasswordEncryption]:
Falling back to master password encryption; add
-J-Dorg.netbeans.modules.keyring.level=0 to netbeans.conf to see why
native keyrings could not be loaded
FINE [org.netbeans.modules.keyring.utils.Utils]: no such file to
chmod: /home/cenbe/.netbeans/12.3/config/Preferences/org/netbeans/modules/keyring/general.properties

Eric Bresie
Ebresie@gmail.com

On March 22, 2021 at 2:18:03 PM CDT, Glenn Holmer
<ce...@kolabnow.com.invalid> wrote:
On 3/22/21 12:45 PM, Neil C Smith wrote:

On Mon, 22 Mar 2021 at 17:05, Boris Heithecker <bo...@gmx.net> wrote:

Unfortunately, no one (including myself) has yet found time to
implement a simple switch, or system property to switch off either
implementation on Linux.


There is -J-Dnetbeans.keyring.no.native=true ? Still at least shows
the non-native one though? UI to disable entirely would be on my own
papercuts list.


Added that to netbeans.conf, restarted, did a git fetch, and got the
master password dialog :) Checked the log file and saw this:

WARNING
[org.netbeans.modules.keyring.fallback.MasterPasswordEncryption]:
Falling back to master password encryption; add
-J-Dorg.netbeans.modules.keyring.level=0 to netbeans.conf to see why
native keyrings could not be loaded

Added that, got the dialog again, and saw this in the log:

https://www.lyonlabs.org/temp/master-password-log.txt

So it looks like there's something to the idea that he's looking for
some KDE stuff and can't find it (see my other message: no kwallet
installed, running a fresh install of Debian Buster w/MATE).

I remember that this used to get a lot of complaints years ago, but it's
been quite a while since I last saw that dialog.

--
Glenn Holmer (Linux registered user #16682)
"After the vintage season came the aftermath -- and Cenbe."
cenbe.vcf7 bytes
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[...]



On Mon, Mar 22, 2021 at 5:03 PM Glenn Holmer <ce...@kolabnow.com.invalid> wrote:
>
> I recently switched from KDE to MATE (on Linux) and now I'm frequently
> seeing the "enter master password" dialog. Mr Google has offered various
> exotic manual methods to make it go away, but is there a way from within
> NetBeans?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Jaroslav Tulach <ja...@gmail.com>.
Hello Přemek.

> Hi,
> I looked a bit into why keyring is not used on new versions of Gnome
> (see the email below), there is also Jira for it: NETBEANS-4150
> 
> - On Gnome 'gnome-keyring' library was used which is no longer present
> in new versions and is replaced by "libsecret".
> - libsecret calls the "Secret Service" API using D-Bus.
> - Secret Service should be supported by both gnome and kde desktops.
> 
> Now we could
> 1) add a new KeyringProvider that would use libsecret using JNA - same
> like GnomeProvider currently uses gnome-keyring.
> 2) Or we could call the Secret Service D-Bus using dbus-send
> application (that should be installed on gnome desktops) -
> KWalletProvider is currently done that way using qdbus application
> 3) or we could call D-Bus "directly" from java probably using dbus-java [1]
> 
> What would be the preferred way to do this? 3) looks the best to me
> but what are the rules about adding new dependencies?
> dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.
> 
> 
> [1] https://github.com/hypfvieh/dbus-java

Wow, it even supports OSGi: https://github.com/hypfvieh/dbus-java/issues/32 - 
e.g. it should be possible to include that artifact into NetBeans Runtime 
Container just like [Mylyn bundles](https://github.com/apache/netbeans/tree/
25d228fa47e950c777e4115c092ba51f594ca39d/ide/o.eclipse.mylyn.commons.core).

Licenses seem fine. It would be great to just a single code that would work on 
Gnome and KDE. Approach #3 seems fine, if you can get it working.

-jt

We already have some Unix Socket library:
https://github.com/apache/netbeans/tree/
3c3f8dffec27689949a32bcbe8edca84127e42c9/ide/libs.c.kohlschutter.junixsocket - 
it would be good to use just a single library for accessing Unix sockets. 

> 
> 
> ---------- Forwarded message ---------
> From: Laszlo Kishalmi <la...@gmail.com>
> Date: Tue, Mar 23, 2021 at 10:04 PM
> Subject: Re: master password
> To: <us...@netbeans.apache.org>
> 
> 
> Well, if it is Gnome. Our JNA support Gnome 2 API only which is no
> longer available in recent Ubuntu (and probably other) distributions.
> There was an option to install that library 18.04, but that is no
> longer available.
> 
> On 3/23/21 2:00 PM, Eric Bresie wrote:
> 
> Sounded like somethings were reinstalled ..but did some of it not get
> reinstalled fully or is missing?
> 
> 
> FINE [org.netbeans.modules.keyring.gnome.GnomeProvider]
> java.lang.UnsatisfiedLinkError: Unable to load library 'gnome-keyring':
> libgnome-keyring.so: cannot open shared object file: No such file or
> directory libgnome-keyring.so: cannot open shared object file: No such file
> or directory Native library (linux-x86-64/libgnome-keyring.so) not found in
> resource path
> (/mnt/common/netbeans-12.3/netbeans/platform/lib/boot.jar:/mnt/common/netbe
> ans-12.3/netbeans/platform/lib/org-openide-modules.jar:/mnt/common/netbeans-
> 12.3/netbeans/platform/lib/org-openide-util.jar:/mnt/common/netbeans-12.3/ne
> tbeans/platform/lib/org-openide-util-lookup.jar:/mnt/common/netbeans-12.3/ne
> tbeans/platform/lib/org-openide-util-ui.jar)
> 
> 
> FINE [org.netbeans.modules.keyring.win32.Win32Protect]: not running on
> Windows FINE [org.netbeans.modules.keyring.utils.Utils]: chmod go-r
> /home/cenbe/.netbeans/12.3/config/Preferences/org/netbeans/modules/keyring.p
> roperties WARNING
> [org.netbeans.modules.keyring.fallback.MasterPasswordEncryption]: Falling
> back to master password encryption; add
> -J-Dorg.netbeans.modules.keyring.level=0 to netbeans.conf to see why
> native keyrings could not be loaded
> FINE [org.netbeans.modules.keyring.utils.Utils]: no such file to
> chmod:
> /home/cenbe/.netbeans/12.3/config/Preferences/org/netbeans/modules/keyring/
> general.properties
> 
> Eric Bresie
> Ebresie@gmail.com
> 
> On March 22, 2021 at 2:18:03 PM CDT, Glenn Holmer
> <ce...@kolabnow.com.invalid> wrote:
> On 3/22/21 12:45 PM, Neil C Smith wrote:
> 
> On Mon, 22 Mar 2021 at 17:05, Boris Heithecker <bo...@gmx.net>
> wrote:
> 
> Unfortunately, no one (including myself) has yet found time to
> implement a simple switch, or system property to switch off either
> implementation on Linux.
> 
> 
> There is -J-Dnetbeans.keyring.no.native=true ? Still at least shows
> the non-native one though? UI to disable entirely would be on my own
> papercuts list.
> 
> 
> Added that to netbeans.conf, restarted, did a git fetch, and got the
> master password dialog :) Checked the log file and saw this:
> 
> WARNING
> [org.netbeans.modules.keyring.fallback.MasterPasswordEncryption]:
> Falling back to master password encryption; add
> -J-Dorg.netbeans.modules.keyring.level=0 to netbeans.conf to see why
> native keyrings could not be loaded
> 
> Added that, got the dialog again, and saw this in the log:
> 
> https://www.lyonlabs.org/temp/master-password-log.txt
> 
> So it looks like there's something to the idea that he's looking for
> some KDE stuff and can't find it (see my other message: no kwallet
> installed, running a fresh install of Debian Buster w/MATE).
> 
> I remember that this used to get a lot of complaints years ago, but it's
> been quite a while since I last saw that dialog.
> 
> --
> Glenn Holmer (Linux registered user #16682)
> "After the vintage season came the aftermath -- and Cenbe."
> cenbe.vcf7 bytes
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> [...]
> 
> On Mon, Mar 22, 2021 at 5:03 PM Glenn Holmer <ce...@kolabnow.com.invalid> 
wrote:
> > I recently switched from KDE to MATE (on Linux) and now I'm frequently
> > seeing the "enter master password" dialog. Mr Google has offered various
> > exotic manual methods to make it go away, but is there a way from within
> > NetBeans?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Laszlo Kishalmi <la...@gmail.com>.
You need the library be copied in place by a project.properties entry, 
also need an entry on the available packages to be exported in the 
project.xml

you might check the extide/libs.gradle for reference.

On 4/4/21 1:05 AM, Přemysl Vyhnal wrote:
> Thank you,
> so now the binaries-list is fine, the JAR I needed got downloaded to

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Přemysl Vyhnal <pr...@vyhnal.net>.
Thank you,
so now the binaries-list is fine, the JAR I needed got downloaded to
platform/keyring.impl/external/dbus-java-3.3.0.jar and `ant
verify-libs-and-licenses` finishes successfully.
But what else do I need to do to be able to use the dependency in java
code? When I try to compile it still does not see it (error: package
xxx does not exist).
I'm trying to set <class-path-extension> in project.xml and
release.external/xxx.jar in project.properties based on other
dependencies but it doesn't seem to do anything for me or I cannot get
it right.
Is there anything else I need to set?
Thank you!

On Sat, Apr 3, 2021 at 7:17 PM Laszlo Kishalmi
<la...@gmail.com> wrote:
>
> Afaik they are the sha1sum-s of the binary file in question. We prefer
> to have them available from Maven Central repo, in that case you shall
> use the G:A:V notation. otherwise we are looking for the library on our
> external binaries site at Oregon State University Library OSUL
>
> On 4/3/21 8:35 AM, Přemysl Vyhnal wrote:
> > Hi, thanks Jaroslav and Matthias for your replies.
> > Because I'm not that familiar with JNA I wanted to experiment with the
> > dbus-java library to see if it will be easier for me to implement the
> > KeyringProvider using that instead of JNA.
> > But then I hit another big obstacle for me - looks like I'm also not
> > familiar with ant and netbeans build (normally I use mvn or gradle)
> > and I'm struggling with adding the external library.
> >
> > Is there anything written about this somewhere or could someone maybe
> > point me to a commit or a module/library where something similar was
> > added?
> >
> > I found the binaries-list file but I'm not sure where is that checksum
> > (?) from and where are the dependencies being downloaded from?
> > Some dependencies are "wrapped" like org.netbeans.libs.junit4 for
> > example. Is this how to add any dependency?
> >
> > Thanks a lot for any help
> >
> > Regards
> > Premek
> >
> >
> >
> > On Mon, Mar 29, 2021 at 8:01 AM Bläsing, Matthias
> > <mb...@doppel-helix.eu> wrote:
> >> [Resend to mailinglist]
> >>
> >> Hi,
> >>
> >> Am 28.03.2021 um 01:47 schrieb Přemysl Vyhnal:
> >>> I looked a bit into why keyring is not used on new versions of Gnome
> >>> (see the email below), there is also Jira for it: NETBEANS-4150
> >>>
> >>> - On Gnome 'gnome-keyring' library was used which is no longer present
> >>> in new versions and is replaced by "libsecret".
> >>> - libsecret calls the "Secret Service" API using D-Bus.
> >>> - Secret Service should be supported by both gnome and kde desktops.
> >>>
> >>> Now we could
> >>> 1) add a new KeyringProvider that would use libsecret using JNA - same
> >>> like GnomeProvider currently uses gnome-keyring.
> >>> 2) Or we could call the Secret Service D-Bus using dbus-send
> >>> application (that should be installed on gnome desktops) -
> >>> KWalletProvider is currently done that way using qdbus application
> >>> 3) or we could call D-Bus "directly" from java probably using dbus-java [1]
> >>>
> >>> What would be the preferred way to do this? 3) looks the best to me
> >>> but what are the rules about adding new dependencies?
> >>> dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.
> >> I only had a quick look at libsecret and its simple API. If that API is
> >> enough for our usecase, It looks doable to bind it with JNA. We already
> >> ship JNA with the platform, so it would not introduce another dependency.
> >>
> >> I admit, that I'm biased though, as I'm one of the JNA maintainers.
> >>
> >> Greetings
> >>
> >> Matthias
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> >> For additional commands, e-mail: dev-help@netbeans.apache.org
> >>
> >> For further information about the NetBeans mailing lists, visit:
> >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>
> >>
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Laszlo Kishalmi <la...@gmail.com>.
Afaik they are the sha1sum-s of the binary file in question. We prefer 
to have them available from Maven Central repo, in that case you shall 
use the G:A:V notation. otherwise we are looking for the library on our 
external binaries site at Oregon State University Library OSUL

On 4/3/21 8:35 AM, Přemysl Vyhnal wrote:
> Hi, thanks Jaroslav and Matthias for your replies.
> Because I'm not that familiar with JNA I wanted to experiment with the
> dbus-java library to see if it will be easier for me to implement the
> KeyringProvider using that instead of JNA.
> But then I hit another big obstacle for me - looks like I'm also not
> familiar with ant and netbeans build (normally I use mvn or gradle)
> and I'm struggling with adding the external library.
>
> Is there anything written about this somewhere or could someone maybe
> point me to a commit or a module/library where something similar was
> added?
>
> I found the binaries-list file but I'm not sure where is that checksum
> (?) from and where are the dependencies being downloaded from?
> Some dependencies are "wrapped" like org.netbeans.libs.junit4 for
> example. Is this how to add any dependency?
>
> Thanks a lot for any help
>
> Regards
> Premek
>
>
>
> On Mon, Mar 29, 2021 at 8:01 AM Bläsing, Matthias
> <mb...@doppel-helix.eu> wrote:
>> [Resend to mailinglist]
>>
>> Hi,
>>
>> Am 28.03.2021 um 01:47 schrieb Přemysl Vyhnal:
>>> I looked a bit into why keyring is not used on new versions of Gnome
>>> (see the email below), there is also Jira for it: NETBEANS-4150
>>>
>>> - On Gnome 'gnome-keyring' library was used which is no longer present
>>> in new versions and is replaced by "libsecret".
>>> - libsecret calls the "Secret Service" API using D-Bus.
>>> - Secret Service should be supported by both gnome and kde desktops.
>>>
>>> Now we could
>>> 1) add a new KeyringProvider that would use libsecret using JNA - same
>>> like GnomeProvider currently uses gnome-keyring.
>>> 2) Or we could call the Secret Service D-Bus using dbus-send
>>> application (that should be installed on gnome desktops) -
>>> KWalletProvider is currently done that way using qdbus application
>>> 3) or we could call D-Bus "directly" from java probably using dbus-java [1]
>>>
>>> What would be the preferred way to do this? 3) looks the best to me
>>> but what are the rules about adding new dependencies?
>>> dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.
>> I only had a quick look at libsecret and its simple API. If that API is
>> enough for our usecase, It looks doable to bind it with JNA. We already
>> ship JNA with the platform, so it would not introduce another dependency.
>>
>> I admit, that I'm biased though, as I'm one of the JNA maintainers.
>>
>> Greetings
>>
>> Matthias
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: dev-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Přemysl Vyhnal <pr...@vyhnal.net>.
Hi, thanks Jaroslav and Matthias for your replies.
Because I'm not that familiar with JNA I wanted to experiment with the
dbus-java library to see if it will be easier for me to implement the
KeyringProvider using that instead of JNA.
But then I hit another big obstacle for me - looks like I'm also not
familiar with ant and netbeans build (normally I use mvn or gradle)
and I'm struggling with adding the external library.

Is there anything written about this somewhere or could someone maybe
point me to a commit or a module/library where something similar was
added?

I found the binaries-list file but I'm not sure where is that checksum
(?) from and where are the dependencies being downloaded from?
Some dependencies are "wrapped" like org.netbeans.libs.junit4 for
example. Is this how to add any dependency?

Thanks a lot for any help

Regards
Premek



On Mon, Mar 29, 2021 at 8:01 AM Bläsing, Matthias
<mb...@doppel-helix.eu> wrote:
>
> [Resend to mailinglist]
>
> Hi,
>
> Am 28.03.2021 um 01:47 schrieb Přemysl Vyhnal:
> > I looked a bit into why keyring is not used on new versions of Gnome
> > (see the email below), there is also Jira for it: NETBEANS-4150
> >
> > - On Gnome 'gnome-keyring' library was used which is no longer present
> > in new versions and is replaced by "libsecret".
> > - libsecret calls the "Secret Service" API using D-Bus.
> > - Secret Service should be supported by both gnome and kde desktops.
> >
> > Now we could
> > 1) add a new KeyringProvider that would use libsecret using JNA - same
> > like GnomeProvider currently uses gnome-keyring.
> > 2) Or we could call the Secret Service D-Bus using dbus-send
> > application (that should be installed on gnome desktops) -
> > KWalletProvider is currently done that way using qdbus application
> > 3) or we could call D-Bus "directly" from java probably using dbus-java [1]
> >
> > What would be the preferred way to do this? 3) looks the best to me
> > but what are the rules about adding new dependencies?
> > dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.
>
> I only had a quick look at libsecret and its simple API. If that API is
> enough for our usecase, It looks doable to bind it with JNA. We already
> ship JNA with the platform, so it would not introduce another dependency.
>
> I admit, that I'm biased though, as I'm one of the JNA maintainers.
>
> Greetings
>
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Bläsing, Matthias <mb...@doppel-helix.eu>.
[Resend to mailinglist]

Hi,

Am 28.03.2021 um 01:47 schrieb Přemysl Vyhnal:
> I looked a bit into why keyring is not used on new versions of Gnome
> (see the email below), there is also Jira for it: NETBEANS-4150
>
> - On Gnome 'gnome-keyring' library was used which is no longer present
> in new versions and is replaced by "libsecret".
> - libsecret calls the "Secret Service" API using D-Bus.
> - Secret Service should be supported by both gnome and kde desktops.
>
> Now we could
> 1) add a new KeyringProvider that would use libsecret using JNA - same
> like GnomeProvider currently uses gnome-keyring.
> 2) Or we could call the Secret Service D-Bus using dbus-send
> application (that should be installed on gnome desktops) -
> KWalletProvider is currently done that way using qdbus application
> 3) or we could call D-Bus "directly" from java probably using dbus-java [1]
>
> What would be the preferred way to do this? 3) looks the best to me
> but what are the rules about adding new dependencies?
> dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.

I only had a quick look at libsecret and its simple API. If that API is 
enough for our usecase, It looks doable to bind it with JNA. We already 
ship JNA with the platform, so it would not introduce another dependency.

I admit, that I'm biased though, as I'm one of the JNA maintainers.

Greetings

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Přemysl Vyhnal <pr...@vyhnal.net>.
Hi Matthias and all,

Initially it seemed to me that using dbus to implement KeyringProvider for
new versions of Gnome would be easier for me but it turned out that the
library I wanted to use had many dependencies, some of them using native
libraries and I had some issues adding them to the project.
I'm not very familiar with JNA but now when Matthias did the main work it
was easy putting it all together even for someone like me :) I hope I
didn't mess up. I put some comments in the PR. I'm not sure what else to
test or what is the process now.
Here is the PR: https://github.com/apache/netbeans/pull/2906

Thanks again Matthias and Laszlo and Jaroslav for help with this.

Regards
Premek



On Sat, Apr 10, 2021 at 11:13 PM Matthias Bläsing <mb...@doppel-helix.eu>
wrote:

> Hi,
>
> Am Sonntag, den 28.03.2021, 01:47 +0100 schrieb Přemysl Vyhnal:
> > I looked a bit into why keyring is not used on new versions of Gnome
> > (see the email below), there is also Jira for it: NETBEANS-4150
> >
> > - On Gnome 'gnome-keyring' library was used which is no longer present
> > in new versions and is replaced by "libsecret".
> > - libsecret calls the "Secret Service" API using D-Bus.
> > - Secret Service should be supported by both gnome and kde desktops.
> >
> > Now we could
> > 1) add a new KeyringProvider that would use libsecret using JNA - same
> > like GnomeProvider currently uses gnome-keyring.
> > 2) Or we could call the Secret Service D-Bus using dbus-send
> > application (that should be installed on gnome desktops) -
> > KWalletProvider is currently done that way using qdbus application
> > 3) or we could call D-Bus "directly" from java probably using dbus-java
> [1]
> >
> > What would be the preferred way to do this? 3) looks the best to me
> > but what are the rules about adding new dependencies?
> > dbus-java is MIT and it depends on jnr-unixsocket which is Apache
> license.
> >
>
> if there is still interest, I did an MVP for binding libsecret. I don't
> know if the synchronous API is enough for the keyring API, but that is
> what is bound here:
>
> https://github.com/matthiasblaesing/JNA-Demos/tree/master/LibSecret
>
> Greetings
>
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: KeyringProvider for new versions of Gnome [NETBEANS-4150]

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hi,

Am Sonntag, den 28.03.2021, 01:47 +0100 schrieb Přemysl Vyhnal:
> I looked a bit into why keyring is not used on new versions of Gnome
> (see the email below), there is also Jira for it: NETBEANS-4150
> 
> - On Gnome 'gnome-keyring' library was used which is no longer present
> in new versions and is replaced by "libsecret".
> - libsecret calls the "Secret Service" API using D-Bus.
> - Secret Service should be supported by both gnome and kde desktops.
> 
> Now we could
> 1) add a new KeyringProvider that would use libsecret using JNA - same
> like GnomeProvider currently uses gnome-keyring.
> 2) Or we could call the Secret Service D-Bus using dbus-send
> application (that should be installed on gnome desktops) -
> KWalletProvider is currently done that way using qdbus application
> 3) or we could call D-Bus "directly" from java probably using dbus-java [1]
> 
> What would be the preferred way to do this? 3) looks the best to me
> but what are the rules about adding new dependencies?
> dbus-java is MIT and it depends on jnr-unixsocket which is Apache license.
> 

if there is still interest, I did an MVP for binding libsecret. I don't
know if the synchronous API is enough for the keyring API, but that is
what is bound here:

https://github.com/matthiasblaesing/JNA-Demos/tree/master/LibSecret

Greetings

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists