Commit Graph

321 Commits (master)

Author SHA1 Message Date
Johan Ouwerkerk d7f850a146 chore: bump Keysmith version to 0.2.1
The 0.2.0 release tag is not reflected and versioning fields are not updated anywhere anyway.
This commit rectifies at least the latter problem: application versions are now updated where they appear in code/manifests.
2020-11-04 16:54:29 +01:00
Johan Ouwerkerk 4dc11df193 fix!: upgrade to Qt 5.14
The basic QR parsing accidentally introduced a dependency on Qt 5.14 minimum.
2020-11-03 18:57:48 +01:00
Johan Ouwerkerk bc91de7e5b feat: support receiving a new account via otpauth:// URI from the commandline in the UI
This change implements necessary control flow to pick up on accounts being passed to Keysmith via commandline options.

This change covers UX only for the happy flow case in which the received account is a valid otpauth:// URI.
If such an URI is passed to Keysmith, then the Add Account form is automatically pushed on the page stack and pre-populated with data received from the commandline.
With this UX, if the account is valid the user may either accept it immediately or tweak settings (most likely account name/issuer) to make it valid.

Issues: #7, #14
2020-10-30 13:27:32 +01:00
Johan Ouwerkerk b0bc89810e feat: add actions to dismiss/cancel the add account form
Users may now cancel adding an account and dismiss the page.
This change is particularly relevant in the context of an account that is being added via URI passed on the commandline: the user may now explicitly reject it.

Additionally quitting Keysmith from the add account form is now also supported, hidden behding a boolean flag.
This will be useful for the initial page when receiving an account via URI from the commandline: the user may reject the account and quit Keysmith via a single action.

Issues: #7, #14
2020-10-30 13:25:33 +01:00
Johan Ouwerkerk 92e92557fa feat: add a page to recover when an account turns out to be already used while adding it
This page is a bit of a bodge for the fact that the current Accounts model must be 'unlocked' before it can be used.
In turn, this means that it is not straightforward to check that an account is still 'available' when presenting the user with the option to add an account received via URI from the commandline.
The solution implemented here is to check and let the user recover after unlocking, if necessary.

Issues: #7, #14
2020-10-30 13:24:39 +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 30e66ef978 refactor: support validating account names without checking account availability
With this change AccountNameValidator can now be used without having a functional Accounts model.
This allows the existing AddAccount page to be re-used for context without a valid Accounts model, e.g. when receiving accounts via URI from the commandline.

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 9288f041c8 refactor: add support for ValidatedAccountInput being passed in from outside of the add account forms.
With this change top-level QML code may pass a (populated) ValidatedAccountInput object to pre-populate fields in the add account forms.

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk d33d2c777d feat: allow QML UI to reset a model::AccountInput object
Being able to reset an account input model to the default state allows for QML UI to safely reuse an account input.
This lets it delegate populating to other code and then finally forward it to other QML code when control returns to the UI.

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk cb9032d1c3 feat: pick up on commandline options passed to Keysmith during start up.
This change provides minimal plumbing to pick up on commandline options, it does not yet provide the UI to take appropriate action(s).

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 4425795211 feat: add basic support for accepting otpauth:// URIs from the commandline
This change is a building block towards receiving decoded QR codes from other applications and adding corresponding accounts in Keysmith.

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 937a48bed7 chore: prune a few CMakeLists.txt files 2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 420198c49a feat: add basic support for otpauth:// URI parameter model
Add support converting an otpauth:// URI into a model object.
Validation is quite lax and focused on what Keysmith can recover from within the scope of 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 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 98f73c57a5 chore: implement fixes suggested by static analysis
These are potentially blocking the basic QR parsing and versioning features from landing.

See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/57
See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/58
2020-10-26 18:02:20 +01:00
Johan Ouwerkerk dadd9d3973 chore: implement fixes suggested by static analysis
These are potentially blocking the basic QR parsing feature from landing.

See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/57
2020-10-24 18:57:13 +02:00
Johan Ouwerkerk 17cac143fa refactor: use CONSTANT properties instead of a dummy signal 2020-10-22 03:10:27 +00:00
Johan Ouwerkerk 089597dda7 feat: enable static source code analysis in CI 2020-09-23 17:17:13 +02:00
l10n daemon script 52a3533bf3 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-09-23 06:39:55 +02:00
l10n daemon script 7527281caf GIT_SILENT made messages (after extraction) 2020-09-23 02:38:33 +02:00
Johan Ouwerkerk eabc34f968 fix: minor grammar error in README.md 2020-09-21 17:13:09 +02:00
l10n daemon script e8e4b916a2 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-09-19 06:20:22 +02:00
Johan Ouwerkerk f1dbd0c4b7 feat: reduce apparent latency when re-computing tokens by computing the 'next' token in advance.
One downside of offloading the token computation to a worker thread and having to do token decryption is an increase in latency.
For the case with a few accounts this latency does not matter, but in case of many accounts it can induce a significant delay when refreshing tokens in the UI.

To hide this latency, when computing an OTP token for the current state of the account the logical 'next' token is also computed as well and cached in the Account object.
When the next (re)computation of the OTP token is requested, the cached 'next' value is reused if still valid before the next pair of tokens is being computed.
This way the apparent latency of a token update is reduced to an near immediate property update in the UI, hiding the actual latency of the computation itself.

This 'optimisation' is implemented in the dumbest possible fashion that can still work.
This means that the code complexity of the change is quite limited, at the cost of rougly doubling the actual work being performed in the worker thread.
2020-09-16 04:54:15 +00:00
Johan Ouwerkerk 779eb11cc6 chore: update to run full builds in Gitlab-CI not just on build.kde.org (Jenkins)
Issues: #4
2020-09-15 20:43:26 +02:00
Johan Ouwerkerk 2fcb0938d0 fix: disable visually hidden "add account" action on the accounts overview page
Previously a user could accidentally trigger an additional 'add account' action even when the action (button) was not visible in the UI.
This oversight is now fixed.
2020-09-15 20:41:07 +02:00
l10n daemon script 90c9dfbc04 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-08-30 06:16:18 +02:00
l10n daemon script 13a51bf7ec GIT_SILENT made messages (after extraction) 2020-08-30 02:31:12 +02:00
l10n daemon script 53b6799795 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-08-27 06:11:17 +02:00
l10n daemon script 69b826f899 GIT_SILENT made messages (after extraction) 2020-08-27 02:34:21 +02:00
Johan Ouwerkerk 1736d6c935 fix: reduce memory consumption by re-using AccountView objects. 2020-08-19 17:25:16 +02:00
Johan Ouwerkerk 46da8be7b3 feat: add support for QML debugging/profiling 2020-08-14 20:02:43 +02:00
Johan Ouwerkerk 9cad36441e refactor: simplify linking of the Keysmith application 2020-08-14 20:02:43 +02:00
Johan Ouwerkerk 035bc8be5c refactor: add a way to set raw counter values on validated input model
This change prepares for applying token details from a otpauth URI (QR code)
2020-08-14 20:02:43 +02:00
Johan Ouwerkerk 4f35d2129e fix: const-correctness when setting secret strings on validated input model 2020-08-14 20:02:43 +02:00
Johan Ouwerkerk e782840847 refactor: extract signal spying to a top-level autotest utility. 2020-08-14 20:02:43 +02:00
Johan Ouwerkerk fa4f6f651e feat: support configuring remaining TOTP token details
With this change both epoch and hash algoritm may now be configured for TOTP tokens.

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk e539f2cf22 feat: support configuring remaining HOTP token details
With this change both checksum and custom truncation may now be enabled for HOTP tokens.

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 28211b7791 feat: rework token details UX in add account form
- Hide token details by default
 - Only show relevant token details depending on token type

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk b3984dd054 refactor: prepare code for reworking account details when adding new accounts
- Introduce re-usable account name + issuer form. This will help to support overriding account name/issuer when adding accounts via OTP token URI/QR code
 - Move common settings out of TokenDetailsForm into AddAccount.qml

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 668a969d4f refactor: rename unsigned integer parsing function
Make the name for unsigned integer parsing (counter validator) fit better with the new custom datetime validator.
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 63033b568d refactor: introduce model class to collate validated input from add account forms (flow)
This change prepares the UI for supporting alternative and more complex flows for adding accounts.
All parameters are now collated into a single "validated input" object which is more convenient to pass around between views
This makes it possible to support back- and forth navigation between "basic" and "advanced/details" forms for adding accounts.

Additionally it provides a fundamental building block for adding alternative ways to add accounts (e.g. via OTP token URI/QR code).

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 170d7f1811 refactor: introduce custom datetime validator
This change is a preparation for allowing the user to configure custom epochs for TOTP tokens

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk f632b5ecf3 refactor: extract common fixup() logic for name/issuer validators 2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 3ccafda3a1 refactor: adjust validator test macro to be able to inject arbitrary constructor parameters. 2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 09df98d3a4 refactor: prepare AccountStorage for more complex tokens
With this the AccountStorage module now fully supports some HOTP/TOTP parameters which are uncommon (but still part of HOTP/TOTP specifications).

 - Better types for offset, tokenLength. Make this consistent throughout
 - Finish support for offset, checksum parameters for HOTP tokens in AccountStorage
 - Finish support for hashing algorithm, epoch parameters for TOTP tokens in AccountStorage
 - Better API for creating oath::Algorithm instances
 - Code formatting (break up long lines)

Issues: #7
2020-08-08 09:17:55 +02:00
l10n daemon script 3c7aa2010c GIT_SILENT made messages (after extraction) 2020-08-06 02:31:04 +02:00
Johan Ouwerkerk 456cd658e5 fix: make sure to actually return a null-valued QVariant() if the role is wrong
Improve the code flow a little while at it.
2020-07-23 18:24:13 +02:00
Johan Ouwerkerk d358d8abcc feat: Support configuring the issuer when adding a new account in Keysmith.
With this change, issuers are now fully supported.

Resolves: #13
2020-07-23 18:24:13 +02:00
Johan Ouwerkerk 0d40912360 feat: Add basic support for account 'issuer' in Keysmith.
With this change account storage and model work with accounts for which an issuer is recorded.
This is a prerequisite for fully supporting otpauth:// URIs (necessary for QR code support) in Keysmith.

Issues: #7, #13
See-Also: https://github.com/google/google-authenticator/wiki/Key-Uri-Format
2020-07-23 18:24:13 +02:00
Bhushan Shah 090166387b reuse: add licenses for po files in dep5
situation is not super nice, but in general several problems exist,

- some files do not include any license, assumption is unless specified
  explicitly they follow same license as the source package
  (GPL-3.0-or-later).
- most files do not include the proper copyright statement, I have
  specified KDE Localization team as copyright contact.
- license files do not follow SPDX headers, so we need to add them in
  dep5.

I will start a thread in kde-core-devel / kde-i18n-doc mailing list
about licensing situation once 0.2 release is out.
2020-06-29 02:55:36 +05:30