-
Notifications
You must be signed in to change notification settings - Fork 5
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
Store File in internal storage #7
Comments
Just to make sure: At the moment KeePassDX does not support to store the database in the private storage of the app itself, right? Instead I would need to store it on my public storage, where every other app could have access to it or I could store it within the private storage of a third party app, which will provide it's "private" storage to other apps? I think it would increase the security and be more convenient, if the app could store the database within it's own private storage. Other KeePass Apps also supports it. It seems like, that this future is requested several times in the past years. It would be really nice to have this function. |
Yes, I would even say that KeePassDX does not and will not support file storage in any form because it is only an editor.
There is no problem in dedicating an application to perform an action. FileSync will be intended to manage files so it is all for this task but you can use any file manager application you want.
How? Separating the concepts allows you to avoid including bugs in a multipurpose single application that can do everything but with one small flaw can compromise an entire system. Dedicating an application to storage allows the developers who deal with this task to deal with security issues and solve them independently of the file content itself.
Apart from having two icons for two applications, I don't see what the problem is.
I know that's why I have in mind to create this FileSync application that will manage the storage and distribution of files |
Yeah, I understand your point. And having a separate App to deal with Cloud integration makes a lot of sense. I support your idea, to keep any kind of cloud integration out of your KeePass fork. And yeah, KeePass is somehow an editor for a database, that's true. But using private storage wouldn't increase the complexity of the app etc. since it is natively supported (and recommended) by android. Every app can use it's own private storage to store sensible data in it. No matter, if it is a banking app, a chat app or an "editor". So there is no reason to fear increased complexity, which may lead to (security) bugs. See: https://developer.android.com/training/data-storage/app-specific It would be the perfect use case for KeePassDX. It would be possible to store the database within the app and we wold have a closed eco system, without the need of any other third party applications and without the possibility of third party apps to access the database. And since it is natively supported by android, it wouldn't need to code this whole stuff. After all, it is your app and your decision. I (and probably a lot of other too) like this app but have a strange feeling about the fact, that the database, which literally contains all your security related data, is potentially accessible by every app installed on your device, but could be easily secured. It would be really nice if you could reconsider your decision and offer the users the possibility to store the database within the app's internal private storage. Wish you all the best! |
That's where you're wrong. It is of course recommended by Android and I recommend it too but under the right circumstances and in the right app. KeePassDX only manages URIs and does not even know how to manage a file. To store a database file in KeePassDX, we would have to revise the metadata management system to know where these files are stored and how to redistribute them, so we would have to add a new SQL table to manage these metadata in addition to the history table. But as KeePassDX only knows how to manage URIs, it is necessary to create an internal content provider to transform the file streams into generic streams. And since we shouldn't be jealous and key files are also files, we should do the same for this type of file. It is also necessary to manage imports and exports and all the related UIs. At the beginning, as KeePassDX is a fork of KeePassDroid, it managed direct file links but it made the code very complex with different stream and rights management everywhere. And with each update, the simplification for maintenance made that only URI are managed in KeePassDX. KeePass2Android kept the way of a all-in-one password manager but I created KeePassDX especially to divide the concepts, otherwise this project wouldn't even exist.
The funny thing is that that changes described earlier to make KeePassDX compatible with internal file storage would basically be the same code as a dedicated third party application (like Anemo) but would add maintenance complexity for updates. So for me, the only difference is how much you want to trust a third party application. (If I copy and paste the code of another application to put it in KeePassDX, isn't it worse than using the other application directly? ) Whether the code is directly in the application or not, mainly changes the maintenance and therefore it is easier to fix bugs and increase security on a dedicated app.
I know the documentation well, I've been doing Android applications for a long time, here it's a matter of architecture and slicing. I don't question that we can store secure files in the internal memory.
There is no security issue in having two trusted applications communicate over a secure data exchange channel, but if you're afraid of that for a trust issue, I understand. In this case, you simply have the wrong application, look at KeePass2Android Offline.
Feeling / Potentially words are not sufficient arguments for me. I base myself on the facts, a reflection of the architecture that has been done over years of code refactoring and my experience.
I can consider it for any file manager app. ;)
I wish you the best too |
I wish I could save the database internally too but I understand the idea of separation and the possible advantage to use it just as a file reader. I don't want to argue about that. :-) But I wonder how many users are aware that it's not a good practice to save the database in public space and are using an 3rd party file manager? The mentioned Anemo is the only application I'm aware of. I'm not sure how to find similar applications. Anemo seems like a very small project and is only available on f-droid. I'm still not sure about what to think about it. Don't you have to enter two passwords when using such storage? One time for Keepass and one time for Anemo? One comment about your point that copy & pasting the code is no difference compared to using a 3rd party application. It's only true for flaws in the implementation at the time or when you update it automatically as a dependency in your app without checking the changes. Another theoretical threat is the possibility that projects could get hacked and push malicious code in updates. Or are getting inactive and don't work right after an Android update? |
Nothing against the Anemo app. It may be great. But I'm looking forward to your mentioned file provider application. Your very responsive & professional behaviour here generates a lot of credibility. Thanks a lot for your work and great communication. |
We have to identify what you call "public space". Basically I already assume that a phone is personal and that the files belong to the user. If a file is accessible to downloaded applications, the user is responsible for the software he installs so he should trust the applications on his device. It is even asked explicitly if each application has the right to access the device shared files, if the user says yes it means he have full consciousness of that.
You can look at the source code, check the permission and simply try out the app. ;)
The way Anemo works is to provide a secure space accessible by password, you can open it independently from KeePassDX and less frequently, so yes. But it is up to you to define your file security strategy. I will try to make a more modular file manager application, it just take time.
In this case, it is an advantage. If there is only one entry point and the KeePassDX project makes fraudulent updates, everything is corrupted.
Thank you, it's a lot of work, I'm aware that people are impatient but believe me it will solve many of the recurring problems exposed in the issues. |
Also, I would like to remind you that here we are in the FileSync project, so basically, it is still planned to import the concepts of the Anemo application into this application and add features, such as the ability to manage the private storage space with or without a password depending on user needs. It is even its primary goal, and will allow a better management of the updates. |
Allows to store files in the application's secure space.
Will require import and export methods
Linked to : Kunzisoft/KeePassDX#133
The text was updated successfully, but these errors were encountered: