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

Attachment support? #64

Open
TobiasDev opened this issue May 3, 2020 · 15 comments
Open

Attachment support? #64

TobiasDev opened this issue May 3, 2020 · 15 comments

Comments

@TobiasDev
Copy link

Any chance you are going too add supprt for download and adding attachments to the kdbx 4 files?

@hpoul
Copy link
Collaborator

hpoul commented May 3, 2020

Can you give a bit more details about how you are using attachments? or for what? I'm a bit hesitant to add support, because those files get added to the kdbx file, which can make them pretty huge.. which can make it 1. slow to decrypt/encrypt and 2. slow to download/upload to dropbox/google drive/webdav/...

(btw. i've already created an issue for this at #43 )

@TobiasDev
Copy link
Author

Hello!

I don't really use it that often to be honest, but what I use it for is mostly backups, or documents that I want encrypted. The problem with not supporting it (for me that is), is that I can't access those documents when I need them on my phone which is a fairly common occuerence.

I wouldn't say it is a deal-breaker for me though! Just something that would really help with my day to day life and make it a bit easier, since I would only need too use Authpass and not two different apps for this. :)

@hpoul
Copy link
Collaborator

hpoul commented May 9, 2020

@TobiasDev fyi, i have started implementing reading attachments.. shouldn't be too difficult..

out of curiosity, are you using an iphone or android device? and with kdbx 3 or 4? would you be willing to try out a beta verison once it's ready? :)

@TobiasDev
Copy link
Author

@TobiasDev fyi, i have started implementing reading attachments.. shouldn't be too difficult..

out of curiosity, are you using an iphone or android device? and with kdbx 3 or 4? would you be willing to try out a beta verison once it's ready? :)

I'm on Android (or well on LineageOS, so no Google play store), however, if you provide an APK I would definitely test the beta! Looking forward to trying it out! :)

@TobiasDev
Copy link
Author

Right. I'm on KDBX4.

@hpoul
Copy link
Collaborator

hpoul commented May 9, 2020

maybe you can give this one a try: https://github.com/authpass/authpass/actions/runs/100183892 (app-sideload-release-1112.apk) - the download is zip'ed so you'd have to unzip it before installing it..
showing the files and opening them should work.. but it's not yet possible to add additional files.. also right now when clicking on an attachment to open it, it will be saved unencrypted in a temporary directory, without immediately removing it afterwards.. so maybe don't try it with too secret attachments.. at the very least i still need to find a way to clean it up correctly.

@hpoul
Copy link
Collaborator

hpoul commented May 11, 2020

@TobiasDev fyi, I have now added support for adding binary files and removing them.. so this should be basically feature complete.. https://github.com/authpass/authpass/actions/runs/101279631 (app-sideload-release-1116.apk) would be great if you've got some time to test it.

@TobiasDev
Copy link
Author

Hello! Yep, I'm planing on testing this today! :)

@TobiasDev
Copy link
Author

I just tried opening attachment and had no issues at all! :) My only question is if it would be possible to add a "Download to device" option? Because (it's rare but it happens), that I need to actually share one of my documents and currently opening the file only doesn't add that. I know it's un-safe, but I still sadly have to do this every once in a while.

@hpoul
Copy link
Collaborator

hpoul commented May 11, 2020

@TobiasDev thanks for testing.. um.. so do you need a "save as" for attachments or a "share"? :-) i guess a share intent makes most sense then?

@TobiasDev
Copy link
Author

Hmm, good question. In my head it was always a "save as". Then I could add it to whatever I needed or print, etc. Rather than "share". :)

@hpoul
Copy link
Collaborator

hpoul commented May 11, 2020

fwiw, i have now simply added all three (open, share, save to device). I doubt so many choices makes sense in the long run, but i'll just measure what's getting used .. (at least from non-fdroid users which has no analytics 🤷‍♂️️ )

Screenshot 2020-05-12 at 01 25 16

https://github.com/authpass/authpass/actions/runs/101952124

@hpoul
Copy link
Collaborator

hpoul commented May 12, 2020

btw. i've been thinking for a (far in the future) enhancement for those attachments.. what would you think about storing attachments out-of-band ie. only storing like an encryption key + URL in the kdbx file itself, encrypting the file and storing it on some cloud storage.. this way you could basically store infinite amount of attachments without making the whole syncing (and RAM (!) usage) out of control.. right now the kdbx file is synced on every open with the file store and kept in memory for the whole time..

this way you could also attach images.. from receipts or like (offline) banking TANs or whatever.. (with each image having >1 MB, that wouldn't be very scalable in the long run storing everything in the same file..)

@TobiasDev
Copy link
Author

Interesting. Though, that would require new things for the KDBX database format right? As there isn't support for something like that at the moment.

@hpoul
Copy link
Collaborator

hpoul commented May 14, 2020

well, kdbx format provides arbitrary key/value pairs.. it wouldn't work much different than OTP.. simply use a custom key name.. so clients not supporting it, would simply display the raw data.. whatever that is..
it's also possible to use CustomData in kdbx4 .. which should be simply ignored by all other clients which do not support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants