Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve password handling #550

Merged
merged 84 commits into from Jan 18, 2021
Merged

Improve password handling #550

merged 84 commits into from Jan 18, 2021

Conversation

samuel-w
Copy link
Contributor

@samuel-w samuel-w commented Jul 16, 2020

Changed branch, old PR #518

d7bb562 relates to #540, but should work without it

How should I format my code for easier translation later?

Fixes #385

Add password transparency, remove unneeded variable

Removed variable from password validation

Make confirm box have same properties as password box

Remove prints and add comment

Don't run password transparency in exisitng repo

Remove unneded variable

Seperate password errors from other errors

Use password label, move pass length validation

Undo QT 5 Designer changes

Check for no encryption for pass validation

Remove empty methods, use activated over currentIndexChanged

Lint

Update test

Update tests again

Revert "Lint"

This reverts commit c17d0d8.

Run password validation on click

Fix bad variable name

Update transparency on encryption change

Click save before testing password label

Add 'be'

Set text rather than typing

Make passwords greater than 8 in length

Validate password while typing

Update plaintext warning message

Offer alternatives to plain text password storage

Update plaintext warning message

Clarify that Linux has secret service api and macos has keychain access

Clarify where the passwords will be stored

Lint

Run password transparency in existing repo window, reduce wordiness

Old secret service API message was too long and confusing

Lint

Grammar

Seperate password validation function

For samuel-w/KeyManagement

Lint

lint again

Fix so that label updates on default keyring, break plaintext warning onto 2 lines

Cleanup message setting, add KWallet messages

Lint

Lint

Move password validation to utils
src/vorta/utils.py Outdated Show resolved Hide resolved
src/vorta/views/repo_add_dialog.py Outdated Show resolved Hide resolved
@samuel-w samuel-w marked this pull request as draft July 23, 2020 05:56
I tried to get it working, if someone
else wants to try feel free

This reverts commit 58ed4ef.
@samuel-w samuel-w marked this pull request as ready for review July 27, 2020 22:39
@m3nu m3nu self-assigned this Aug 10, 2020
Fixes password detection failure when starting without keyring program
open, opening keyring program and then running backup. Vorta goes
directly to DBKeyring, instead of going down the chain of programs.
@codecov-io
Copy link

codecov-io commented Nov 19, 2020

Codecov Report

Merging #550 (23e1a2a) into master (9af1eb5) will decrease coverage by 0.24%.
The diff coverage is 72.80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #550      +/-   ##
==========================================
- Coverage   73.52%   73.28%   -0.25%     
==========================================
  Files          53       53              
  Lines        3509     3578      +69     
==========================================
+ Hits         2580     2622      +42     
- Misses        929      956      +27     
Impacted Files Coverage Δ
src/vorta/borg/info.py 20.00% <33.33%> (-7.28%) ⬇️
src/vorta/borg/init.py 74.07% <50.00%> (-1.79%) ⬇️
src/vorta/views/repo_add_dialog.py 63.80% <57.89%> (-5.23%) ⬇️
src/vorta/borg/borg_thread.py 78.97% <84.61%> (-0.32%) ⬇️
src/vorta/utils.py 64.00% <94.11%> (+2.79%) ⬆️
src/vorta/keyring/abc.py 88.57% <95.45%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9af1eb5...23e1a2a. Read the comment docs.

@samuel-w
Copy link
Contributor Author

What's the status of this PR?

if encryption != 'none':
keyringClass = VortaKeyring.get_keyring().__class__.__name__
messages = {
'VortaDBKeyring': trans_late('utils', 'plaintext on disk.\nVorta supports {storage} for password storage'.format(storage=platform.get(sys.platform))), # noqa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding those messages to the individual Keyring classes to have it all in one?

'VortaKWallet5Keyring': trans_late('utils', 'KWallet 5'),
'VortaKWallet4Keyring': trans_late('utils', 'KWallet 4')
}
# Just in case some other keyring support is added
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this isn't needed.

src/vorta/utils.py Outdated Show resolved Hide resolved
src/vorta/utils.py Outdated Show resolved Hide resolved
src/vorta/utils.py Outdated Show resolved Hide resolved
src/vorta/utils.py Outdated Show resolved Hide resolved
src/vorta/views/repo_add_dialog.py Show resolved Hide resolved
src/vorta/views/repo_add_dialog.py Show resolved Hide resolved
@m3nu
Copy link
Contributor

m3nu commented Nov 29, 2020

I added some comments. Can be merged with minor changed, I think. Good PR really. Extra points for adding tests. 😄

@samuel-w samuel-w requested a review from m3nu December 3, 2020 07:37
@samuel-w
Copy link
Contributor Author

samuel-w commented Dec 4, 2020

I think the keyring messages cannot be changed, see my comments earlier. #550 (comment)

@samuel-w
Copy link
Contributor Author

Actually, instead of an individual message for each keyring, should it just be one message for secure keyring and one message for insecure keyring, since most people use only one password manager at a time ?

@m3nu m3nu added this to the 0.7.2 milestone Jan 18, 2021
@m3nu m3nu merged commit 7d7b7a2 into borgbase:master Jan 18, 2021
@samuel-w samuel-w deleted the Partial-385 branch January 18, 2021 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passphrase handling improvements
4 participants