-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Uninstall and reinstall bypasses admin password #556
Comments
Whenever app gets removed it forgets everything as it erases everything even SharedPreferences so we can't have any other option to save user data or preferences, we can do one thing we let user set his/her google account as a admin credentials so that whenever app gets reinstalled it will ask for google account and by doing that we can retrieve back our function preferences.And even if we reset data then also we will be able to use its google account for knowing the function preferences. |
@lognaturel @nribeka @yanokwa According to me, one will only use admin password when he/she doesn't want other people to interfere with the current settings. So, if the app can be uninstalled or reinstalled without asking the permission of owner, then it is a serious security issue. So what I want to propose is to prevent install/uninstall of app if the admin password is set up.
I have also tried setting up the device admin settings in the app and it works perfectly. How does this idea sound? |
Another thing that can be done is to retain the Admin password even after uninstall by saving the password in a file in sdcard instead of shared preferences. When a user uninstalls the app, the odk folder doesn't gets removed. So it can be stored there in encrypted form in a hidden file. |
We use sqlite databases to store data about the instances, forms etc. sqlite has SQL standard encrypted formats. Just a thought when reading this. |
@shobhitagarwal1612 I'm liking the device administration idea as the solution to this. Can you (or @lognaturel or @grzesiek2010) think of any downsides? |
Hey @yanokwa. Sorry for replying so late. I can't think of any downsides to this approach. Although, there is one thing that should be discussed. Now that the admin password is shared via QR code, so either we should remove the admin password from QR code or make the password visible after successful importing |
@lognaturel @yanokwa @shobhitagarwal1612 To solve this issue I decided just to use hidden file which will be created on external storage. In this file we will be storing the admin pass (md5 hash). Additionally the file should be stored on external storage (as I said) but not in odk directory as sneaky users might try to remove this folder. |
Now that we've had a few people thinking about this, I'm realizing that there are two issues here and maybe we should pull them apart. The two I see are:
|
An option I haven't seen mentioned yet is BackupAgentHelper. @yanokwa this still has some ability to be bypassed (install app then turn off internet, backup won't occur), but we could always encrypt the files on disk with a backed up private key and require the user to connect to retrieve it. That of course then risks the data on disk not being recoverable if the key somehow gets lost, but that's always the issue with security: we're always going to be trading convenience for it. Could you describe the use case a bit more here? |
Regarding point On point |
@jknightco
what do you mean by "on disk"? external or internal storage? |
Yeah, either should work, as long as we can back up the key via BackupAgentHelper. |
I'm going to close this as it really feels like a device management issue rather than something Collect should be responsible for. Actually blocking uninstalls of apps is something that can be achieved using Android Enterprise. If that's not an option then I'd suggest collecting the "Install ID" (which is regenerated on install) for devices and then using it to detect devices that have had Collect reinstalled. |
If you set an admin password, and uninstall/reininstall the application, you get access to all the functions and that were previously disabled. We should explore either ..
The text was updated successfully, but these errors were encountered: