Commit Graph

145 Commits (db41697dbfab2e611f92a4897a34fcf0942ebc06)

Author SHA1 Message Date
Johan Ouwerkerk db41697dbf Build libsodium as a CMake external project 2020-05-15 17:54:37 +02:00
l10n daemon script 3018d1f3b8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-05-11 06:14:09 +02:00
l10n daemon script 16f43cd941 GIT_SILENT made messages (after extraction) 2020-05-11 02:59:06 +02:00
Johan Ouwerkerk bf67a42cb1 Rework account entry list delegate QML
- Refactor code to have delegates per account-type & simplify code
 - Rework layouting in terms of anchors
 - Fix positioning of account name and token labels to be vertically
   centered
 - Make health indicator/token life timer for TOTP accounts sit flush
   with the bottom of the TOTP delegate UI itself and extend along the
   whole width. This resolves issue #11
2020-04-30 17:08:45 +02:00
Bhushan Shah 1dc35133cb Revert "ci: run re-use lint every build"
This reverts commit c2fb2dd74e.
2020-04-30 13:45:35 +05:30
Bhushan Shah c2fb2dd74e ci: run re-use lint every build 2020-04-30 13:22:20 +05:30
Bhushan Shah aa9abea39b Revert "ci: add reuse linting in gitlab CI"
This reverts commit 36e83b9dd6.

I did not mean to push it right away
2020-04-30 13:13:07 +05:30
Bhushan Shah 36e83b9dd6 ci: add reuse linting in gitlab CI 2020-04-30 13:09:50 +05:30
Johan Ouwerkerk 24de2abacf Add inline error message for account storage errors
Show an inline error message when an error occurs while loading or
otherwise manipulating the account storage.
2020-04-24 18:05:05 +02:00
Johan Ouwerkerk f83b77eee8 Add loaded/error properties to account list model
This change provides a property API on top of the low level state tracking
performed in AccountStorage.
2020-04-24 18:05:05 +02:00
Johan Ouwerkerk b70feaf620 Track loaded/error state of AccountStorage objects
Two bits of boolean state are introduces to track whether or not:

 - an error has occurred
 - accounts have been loaded from storage yet

This change paves the way for having error handling UX.
2020-04-24 18:05:05 +02:00
Johan Ouwerkerk 1d8d69768a Boyscout: prune README a bit 2020-04-24 18:01:34 +02:00
Johan Ouwerkerk 035348caa5 Implement encryption/decryption of token secrets
With this change token secrets are encrypted prior to writing them to
storage, and decrypted as and when needed to generate tokens. Additional
validation is performed to verify that token secrets can be decrypted
successfully when loading accounts from storage.

With this change issue #6 should finally be resolved.
2020-04-24 18:01:34 +02:00
Johan Ouwerkerk a90c16cf82 Extract faking SecureRandom to a reusable utility 2020-04-23 19:00:38 +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 f16eba4505 Plumbing for asking for passwords from QML
This change introduces a model to signal the UI what password "scenario" is
applicable and provides the necessary plumbing to expose it QML.
2020-04-23 18:59:17 +02:00
Johan Ouwerkerk 4d966c3926 Add support for a master key in account storage
With this change an unlock stage is introduced to loading account storage.
Key derivation parameters for a master key are recorded, and the master
password may be supplied to "unlock" the account secret(s) in storage.

This change paves the way for actually decrypting encrypted account
secrets later, and finally solving issue #6.
2020-04-23 18:59:17 +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 3a048f221f Add FindSodium cmake script from upstream libsodium
This relates to issue #6: libsodium will be used to implement secure
storage of token secrets.
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 ae03969f73 Add build* directories to .gitignore 2020-04-22 17:27:28 +02:00
Johan Ouwerkerk 5125dfa923 Do not expose Android tooling to *.license files
Apparently having *.license files among asssets triggers build failures
from the Android tooling/androiddeployqt.

Move the licensing/copyright notices to .reuse/dep5 as a work-around.
2020-04-19 20:21:46 +02:00
Johan Ouwerkerk f4bacefb10 Remove unused QtDebug header 2020-04-19 19:59:24 +02:00
Nicolas Fella 369d8f2d8b Revert unsucessful attempt 2020-04-18 16:07:51 +02:00
Nicolas Fella 9bdbfa0df4 Try to fix Android build 2020-04-18 16:01:02 +02:00
Johan Ouwerkerk f04b15340f Fix TODO items about logging for C++ code 2020-04-14 19:45:29 +02:00
Johan Ouwerkerk b4dada08d8 Add convenient macros to set up logging for Keymsith 2020-04-14 19:39:13 +02:00
Johan Ouwerkerk ecf3476faa Fix up outdated token length validation
Keysmith can generate up to 10 digit HOTP/TOTP tokens and with this change
token length validation also permits it.
2020-04-11 21:46:19 +02:00
Johan Ouwerkerk 567d9c3c97 Do not reuse QML account entry UI delegates.
Delegate recycling causes a bug when removing an account and then adding
it back: the old, stale UI for the account is reused instead of a new one.

In combination with 'alive' guard property on the UI for account entries,
this results in the account entry becoming frozen in the old stale state.
(Incorrect helath indicators, tokens that do not update and buttons that no
longer respond anymore.)
2020-04-10 14:11:12 +02:00
Johan Ouwerkerk 438e341000 Avoid operations on a possibly expired account object.
After triggering the removal of an account from storage in the UI, it may
be possible for the UI not to fully reflect this change for a while yet.
During this short time window, it is possible for an operation to occur on
an already deleted account object which is a use-after-free bug.

In particular signals from animations and timers in the QML UI might still
trigger which causes a slot to be invoked that accesses the underlying
account object.

This change introduces a guard property called 'alive' which is flipped
when the account removal operation is triggered. Slots are updated to
check for the alive status of the UI before proceeding with other logic.
2020-04-10 14:10:47 +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
Johan Ouwerkerk 41d94024c2 Add basic clipboard support for copying tokens 2020-04-04 11:35:43 +02:00
Johan Ouwerkerk 1a1c531dd3 Boyscout: fix a few compiler warnings about unused variables 2020-04-04 11:25:37 +02:00
Johan Ouwerkerk a23e5473a6 UI updates: prevent "invalid" accounts, better secret UI.
With this change the "Add" button in the "Add account" page is not enabled
until the entered account name and details are valid. Additionally, the UI
for entering the token secret now uses a password field with appropriate
hints for input methods.
2020-04-04 11:24:26 +02:00
Johan Ouwerkerk 768ccdba97 Refactor and update input validation
This change fixes input validation for the following cases:

 - Check that entered account names are still available
 - Working validation for time steps (input mask was completely broken)
 - Allow longer tokens: liboath is no longer used, Keysmith can handle it

Additionally the QML code is refactored significantly:

 - Extracted the main accounts overview page
 - Extracted the add an account page
 - Completed the internal renaming of "Oath" to "Keysmith" for QML types
2020-04-04 11:22:15 +02:00
Johan Ouwerkerk 2a9c80fff5 Add a custom validator that checks if the name is still available. 2020-04-04 10:51:39 +02:00
Johan Ouwerkerk 28454721df Do not fix up input during validation
This change is a workaround for behaviour of QML controls: when fixup is
called during input validation, the `acceptableInput` property is not
updated correctly.
2020-04-04 10:50:52 +02:00
Volker Krause 82a4fcce5f Adapt Android manifest to Qt 5.14 2020-03-05 21:02:24 +01:00
Johan Ouwerkerk 19f457960e Fixup: comment about minimum HOTP token lengths. 2020-02-18 19:53:09 +01:00
Johan Ouwerkerk 8b3fd592b7 Fix: always call endGroup()
Make sure to call endGroup() even if the account is rejected before
moving on to examine the next (possible) account.
2020-02-18 19:49:45 +01:00
Johan Ouwerkerk 6a06a2f5f0 Fixup HMAC key size sanity checking.
Key lengths should be checked against the output size of the hashing
algorithm (instead of block size, which was used previously).
2020-02-17 07:08:09 +00:00
l10n daemon script eb99b2abf6 GIT_SILENT made messages (after extraction) 2020-02-16 02:57:36 +01:00
Yuri Chornoivan 112b4bdf8b Fix minor typos 2020-02-13 20:27:57 +02:00
Nicolas Fella ce1b5e8db4 [android] bundle icons 2020-02-12 22:18:26 +01:00
Nicolas Fella bf8ae38fcf [android] Add app icon 2020-02-12 22:09:19 +01:00
Nicolas Fella 7c8f6a4ee1 Add AndroidManifest 2020-02-08 18:34:56 +01:00
Johan Ouwerkerk 0cc2fbc98e Fixup: signedness in comparison. 2020-02-08 17:10:17 +01:00
Bhushan Shah ec8838aa04 cmake: change the required cmake version to 3.10
This builds fine with cmake 3.10.X
2020-02-08 21:33:46 +05:30
Johan Ouwerkerk e5929e7dd5 Fixups for the flatpak build 2020-02-08 16:54:52 +01:00
Johan Ouwerkerk 8bd765e385 Remove the dependency on oath-toolkit.
This resolves issue #9.
2020-02-08 14:46:55 +01:00