Commit Graph

29 Commits (master)

Author SHA1 Message Date
Tobias Fella db6d4742e3 feat: do not use QtWidgets on android and set platform style 2021-06-08 10:43:24 +05:30
Johan Ouwerkerk 287cbcd480 feat!: register Keysmith with D-Bus
This change provides the most basic D-Bus support in Keysmith.
At start up, Keysmith will now register itself and abort if another
instance is already running. Full support for the xdg D-Bus activation
specification (such as URI opening) is not yet implemented.

By default this feature is disabled on Android, but enabled on 'all'
other platforms. Explicit control may be exercised by running CMake
with -DBUILD_DBUS_INTERFACE=<ON|OFF>.

Issues: #18
2021-05-03 04:03:24 +00:00
Devin Lin dcfa16025e Improve password form look 2021-02-28 18:38:02 +00:00
Johan Ouwerkerk d7c8eb4be4 feat: support Qt application version attribute
Automatically pick up on the CMake project version and forward it to the applicationVersion attribute of Qt.
2020-11-04 16:54:29 +01:00
Johan Ouwerkerk 72cfaee9bf feat: introduce a generic "error page" component
This new component can be used to inject an interstitial page, letting the user know something went wrong and allowing them to decide whether to continue or to quit Keysmith.
This is especially useful when Keysmith was launched automatically from some other context (i.e. another app) without the user necessarily being fully aware of it.

Issues: #7, #14
2020-10-27 18:59:03 +01:00
Johan Ouwerkerk 937a48bed7 chore: prune a few CMakeLists.txt files 2020-10-27 18:08:31 +01:00
Johan Ouwerkerk db51ce9e3f feat: add basic support for otpauth:// URI parsing
This change provides a bare minimum implementation to parse an otpauth:// type URI into its component parts.
Parsing is quite lax, and focused on what Keysmith can support or recover from in the intended UI/UX for adding accounts via QR codes.

See-Also: https://github.com/google/google-authenticator/wiki/Key-Uri-Format
Issues: #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 9cad36441e refactor: simplify linking of the Keysmith application 2020-08-14 20:02:43 +02:00
Johan Ouwerkerk d048adf921 UI/UX to ask for the accounts password on start up
With this change Keysmith now prompts the user to either:

 - setup a new password
 - supply an existing password (if detected)

Additionally the organisation/structure of the QML is cleaned up a bit.
All QML pages are dedicated QML files and a few signals are introduced
to provide slightly better encapsulation/decouple interdependencies.
2020-04-23 19:00:36 +02:00
Johan Ouwerkerk a9ed1507b2 Add support for encrypting/decrypting token secrets
Introduce a secrets library which implements the necessary crypto using
libsodium. This change provides the basic building blocks for resolving
issue #6.
2020-04-23 18:59:17 +02:00
Johan Ouwerkerk dca55eee4b Ask for confirmation before removing accounts
This change provides a modal dialog to prompt for confirmation when the
user clicks the delete button.
2020-04-23 18:55:13 +02:00
Johan Ouwerkerk b451bd2556 Fix up licensing for REUSE compliance.
This adds licensing and copyright information where missing and normalises
existing licensing/copyright statements to SPDX metadata tags.
2020-04-10 13:34:31 +02:00
Nicolas Fella ce1b5e8db4 [android] bundle icons 2020-02-12 22:18:26 +01:00
Johan Ouwerkerk 8bd765e385 Remove the dependency on oath-toolkit.
This resolves issue #9.
2020-02-08 14:46:55 +01:00
Johan Ouwerkerk 8729b92b8b Provide a custom HOTP/TOTP primitives.
Provides a building block for re-implementing the HOTP/TOTP algorithms
without using oath-toolkit: see issue #9.
2020-02-08 14:46:55 +01:00
Johan Ouwerkerk 2fe3eb8083 Provide a custom HMAC implementation
Provide a building block towards re-implementing the HOTP/TOTP
algorithms without using oath-toolkit: see issue #9.

The hmac::compute function trades simplicity (having to pre-allocate
a scratch buffer) for avoding accidental leaks of key material
(security).

This particular trade-off will help with resolving issue #6.
2020-02-08 14:21:45 +01:00
Johan Ouwerkerk a0caf83da2 Use the new Account models.
Drop the AccountDetailsPage instead of trying to update it: see issue #7

With this change issue #2 should be fixed
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk 1f15fb6e08 Introduce an 'application context' (sub)module for Keysmtih.
This module is meant to simplify consumption of various Keysmith objects in QML by not having to expose/manage all C++ dependencies.
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk a813810dfe Rewrite Account model(s) as a separate (sub)module within Keysmith, layered on top of the new Account (storage) module.
This fixes the model part in issue #2
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk 0d5b792637 Rewrite Account (storage) management as a separate (sub)module within Keysmtih
This provides the ground work to finally fix issue #2
2020-01-28 06:49:06 +00:00
Bhushan Shah 78240a9efb
Rename binary to keysmith
org.kde prefix is definitely unusual so get rid of it.
2019-12-31 20:04:35 +05:30
Bhushan Shah f4264b9c8c app: add i18n support 2019-12-31 19:34:33 +05:30
Johan Ouwerkerk a5794e02da Refactor: turn the base32 wrapper into a static library
This library is meant for private use by Keysmith, to simplify linking to the base32 functionality in CMake files.
2019-12-28 06:40:31 +00:00
Friedrich W. H. Kossebau 7daddb524c Cleanup CMakeLists.txt a bit
* do cmake_minimum_required as first thing, as recommended
* bump KF to 5.37, first release with Kirigami (Qt 5.7 matching min dep)
* use KF5_MIN_VERSION also with ECM
* include KDE CMake settings as first
* remove unused cmake includes
* remove duplicated enable_testing()
* use correct KDEInstallDirs variables
2019-12-18 17:29:13 +01:00
Johan Ouwerkerk e6a53b6f3b Rebrand otpclient as Keysmith 2019-10-21 19:16:51 +02:00
Johan Ouwerkerk b791bbad45 Add QML bindings for custom validators
- Add convenience function to set up QML bindings under the Oath.Validators namespace
 - Wire up the validator library in the otpclient application
2019-09-29 12:53:49 +02:00
Johan Ouwerkerk eeeac7511c Introduce a custom base32 secret validator to perform input validation.
- Add a new static library "validator_lib" covering the "validators" namespace in C++
 - Introduce the Base32Validator to perform input field validation with fixup support
2019-09-29 12:48:25 +02:00
Johan Ouwerkerk 71180195e6 Add dedicated base32 helper utilities in its own namespace. 2019-09-11 09:40:44 +02:00
Bhushan Shah 8819d205f9 Initial code for OTP client
It uses the oath-toolkit[1] provided library liboath to generate the 2FA
codes, both TOTP and HOTP based. Currently it is largely untested. From
initial rough testing it seems that auto-refreshing of code is not
working. Also button to refresh token for HOTP is also dummy at moment.

Some todo items include,

- Verify the generated oath code is correct
- Make refreshing token work
- QR code scanning
- Backup and Restore of accounts
- Clipboard support to automatically copy code.
- Encrypted storage of the secret token

This code is largely based on the authenticator-ng[2] application by the
Rodney Dawes and Michael Zanetti for the Ubuntu Touch.

[1] https://www.nongnu.org/oath-toolkit/
[2] https://github.com/dobey/authenticator-ng
2019-03-25 02:58:56 +05:30