LeFroid / Viper-Browser

A lightweight Qt5 web browser using QtWebEngine
GNU General Public License v3.0
217 stars 21 forks source link

0.9.2 Release #4

Open LeFroid opened 5 years ago

LeFroid commented 5 years ago

0.9.2 Tasks (subset of requirements before v1.0 is ready)

ghost commented 4 years ago

@LeFroid Do you need help with this project? I was looking for an alternative browser and this looks the closest to what I was looking for. I just think it could use a bit of work to get it to where I would want it to be for use as a daily driver.

LeFroid commented 4 years ago

@braewoods Thank you, I would certainly appreciate the help! There are a great many things that could be added, improved, or made more user-friendly, and I would like to hear your thoughts on the project.

ghost commented 4 years ago

@LeFroid My first observation is that it may be best to replace KWallet and the planned gnome-keyring support with libsecret integration instead since this can be used with KDE and GNOME with a single implementation. Each has their own implementation of it and there's also some third party ones like keepassxc.

ghost commented 4 years ago

@LeFroid Upon further investigation it appears kwallet does not have a libsecret backend so KDE does not support it either. But it appears your current implementation only supports one backend per build. Could we work around this problem by making the provider use plugins instead so it can be loaded dynamically at runtime?

ghost commented 4 years ago

I'll see if I can make the existing static build able to support multiple compile time options. This would give more flexibility I believe.

LeFroid commented 4 years ago

@braewoods The current interface should be flexible enough to use a dynamic plugin system. Qt has some existing interfaces we can use. I'll do some additional research on this.

LeFroid commented 4 years ago

@braewoods I've created a working POC using dynamic plugins to load the credential provider. Needs some refinement, but the code should be ready to push in the next two days.

ghost commented 4 years ago

@LeFroid Ok. The next question is how to select the one to use. We could have an automatic selection and a manual override.

For Linux I would think we would want to use KWallet when running under KDE and a libsecret based system for everything else.

LeFroid commented 4 years ago

@braewoods Good question. If we can assume that some environment variable is set at runtime by KDE, the application can look for that to determine the implementation. I'm not sure what other applications do, however, to check for this sort of thing.

I've moved the KWallet implementation to a plugin in the last commit; if you want to work on a libsecret plugin based on the current design, then by all means go ahead.

ghost commented 4 years ago

@LeFroid We could use XDG_CURRENT_DESKTOP environment variable to guess the running Desktop environment. It should be viable for any X11 or Wayland environment, Linux or otherwise. Here's what it's set to under KDE: XDG_CURRENT_DESKTOP=KDE

LeFroid commented 4 years ago

Looks good to me @braewoods . I'll add the check momentarily. The AutoFill class will look for a plugin with QObject name "CredentialStoreKWallet" if the KDE condition is met, otherwise it will look for "CredentialStoreSecret" (placeholder).

ghost commented 4 years ago

@LeFroid I started work on the secret port. But I cannot find the class definition for WebCredentials. Where can I find its documentation? I'm guessing it is located somewhere in the QT documentation but I don't know where to look.

Edit: Nevermind, found it.

ghost commented 3 years ago

@LeFroid I've been looking at this again and I realized something about the KWallet implementation. It stores credentials in a memory cache. I was wondering if you want the same for Secret. This may have performance benefits but it comes at the expense of secrecy as it may allow passwords to be leaked from memory if an exploit is found. We've seen several such as spectre and heartbleed over the years where memory could be read by malicious scripts or programs that it wasn't supposed to be able to. By querying the credential provider directly for each operation we can limit this risk but I don't know how much performance would suffer as a result.