This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256606 - Use Kwallet5 for passwords
Summary: Use Kwallet5 for passwords
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Keyring (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-15 13:31 UTC by guoyunhebrave
Modified: 2016-09-02 05:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Implement KWallet5Provider (4.58 KB, patch)
2016-08-19 14:41 UTC, hlavki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description guoyunhebrave 2015-11-15 13:31:21 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Linux version 4.1.12-1-default running on amd64
Java; VM; Vendor = 1.8.0_60
Runtime = OpenJDK 64-Bit Server VM 25.60-b23

再现性: 每次都发生

In KDE 5, here is a new version Kwallet 5, but the old Kwallet4 remains in system since some dependency problem. NetBeans uses the old kwallet4. I think it should check if kwallet 5 is available. If so, use kwallet 5; otherwise, try kwallet 4
Comment 1 hlavki 2016-08-19 14:41:15 UTC
Created attachment 161716 [details]
Implement KWallet5Provider

I've created simple patch for this issue
Comment 2 Tomas Mysik 2016-08-30 13:32:11 UTC
Based on [1], the current state is:- KDE 5 has a new version of KWallet due to QT incompatible change
Comment 3 Tomas Mysik 2016-08-30 13:33:07 UTC
(In reply to Tomas Mysik from comment #2)
> Based on [1], the current state is:- KDE 5 has a new version of KWallet due
> to QT incompatible change

Ignore this comment, BZ session timeout occured :/
Comment 4 Tomas Mysik 2016-08-30 13:38:05 UTC
Based on [1], the current state is:

- KDE 5 has a new version of KWallet due to QT incompatible change;
- KDE 4 KWallet works on systems that has been upgraded to KDE 5 (KWallet data are migrated);
- KDE 4 KWallet does not work on clean installations of KDE 5 systems.

I will fix this issue by using KDE 5 KWallet with a fallback to KDE 4 one. Also, I will provide a way to easily specify a different KWallet "version" (e.g. "version" 6, via system property) so possible future changes in this area can be easily solved even in the stable versions of NetBeans.

Thanks for reporting.
[1] https://barlog.rusu.info/valentin/blog/?p=300
Comment 5 hlavki 2016-08-30 13:40:37 UTC
> I will fix this issue by using KDE 5 KWallet with a fallback to KDE 4 one.

Attached patch do the same.
Comment 6 Tomas Mysik 2016-08-30 13:55:15 UTC
(In reply to hlavki from comment #5)
> > I will fix this issue by using KDE 5 KWallet with a fallback to KDE 4 one.
> 
> Attached patch do the same.

No, it does not. But thanks for it, of course.
Comment 7 hlavki 2016-08-30 14:02:34 UTC
Tomas, if your idea is to search for password in kwallet5 and if entry will not be found, than fallback to kwallet4, then I think it's bad idea. Please, be more specific.
Comment 8 Tomas Mysik 2016-08-30 14:37:29 UTC
(In reply to hlavki from comment #7)
> Tomas, if your idea is to search for password in kwallet5 and if entry will
> not be found, than fallback to kwallet4

No, it is not. Please, wait for the fix and then feel free to review it. Will do it on Thursday, need to verify it on KDE 4 first.

Thanks.
Comment 9 hlavki 2016-08-30 14:44:25 UTC
Anyway attached patch only adds new class Kwallet5Provider. Diff view in bugzilla is not correct. KwalletProvider for KDE 4 is still there!
Comment 10 Tomas Mysik 2016-09-01 07:10:26 UTC
Should be fixed now. Prefer KDE 5 with fallback to KDE 4. Also provide a way to specify custom KWallet versions (via system property).

Thanks.

http://hg.netbeans.org/web-main/rev/d5f1f8b1aae0
Comment 11 hlavki 2016-09-01 10:12:54 UTC
Same idea, different implementation, but looks good ;)
Comment 12 Tomas Mysik 2016-09-01 10:23:21 UTC
Would be great if you/anyone could verify it.

Thanks!
Comment 13 hlavki 2016-09-01 18:41:17 UTC
I can confirm that KWallet5 integration works. I'll try v4 later.
Comment 14 Quality Engineering 2016-09-02 01:57:44 UTC
Integrated into 'main-silver', will be available in build *201609020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d5f1f8b1aae0
User: Tomas Mysik <tmysik@netbeans.org>
Log: #256606 - Use Kwallet5 for passwords

Prefer KDE 5 with fallback to KDE 4. Also provide a way to specify custom
KWallet versions (via system property).
Comment 15 Tomas Mysik 2016-09-02 05:35:10 UTC
Great to hear, thank you.