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

KeeShare Issues when Using a view Clients #11070

Closed
elRicharde opened this issue Jul 16, 2024 · 9 comments
Closed

KeeShare Issues when Using a view Clients #11070

elRicharde opened this issue Jul 16, 2024 · 9 comments

Comments

@elRicharde
Copy link

elRicharde commented Jul 16, 2024

Overview

When using KeeShare with a few devices I get Dataloss.

Steps to Reproduce

I create a Database with Groups like this

| Locale DB shared thru KeeShare
  |- my PCs only  
  |- Mobile
     |- Family

Keeshare is still not active.
I Copy this Database 2 times.
In one of the Copys I delete all which s not a Member of Family.

I have now

  • Full DB PC a
  • Full DB PC b
  • Family DB PC c

I open DB a in PC a, DB b in Pc b and db c in Pc c. All are Local on Harddrive c.
I start Creating Keeshare on PC a for whole db in Snych.
Use that Synchfile in a Cloud to synch with pc b.

so far so good.
Now i enable Keeshare in the Subgroup Family of PC a, Synch Mode, i call the File "SynchFileFamily"
I do the same with PC b in Synch Mode.

So far, everything is fine.

I open the small DB C in pc c and enable KeeShare in Synch with the SynchFile "SynchFileFamily" in the Cloud.

Now most of my DB in PC a and B is gone.

in this scenario i used only KeePassXC and only with Local Files which are synched thru a Synchfiles mentioned in KeeShare.

Expected Behavior

I expect that nothing get´s deleted in pc a and b.

The difficulty is to keep the Structure in the pc´s to make them the "Master" - they need to be identical and also share subgroups to the other devices, that´s why Groups are needed here. It of course helps also for a better overview in clients.

Context

I have a KeePass Database and I want to share it with others in Synch Mode.

I Use oneDrive and gDrive for it.

I have Groups that i need to share like this and i thought KeeShare gives me the ability for that.

1.       Whole DB [Shared with gdrive] ( PC a & PC b )
1.1      somthing only in Whole db ( PC a & PC b )
1.2      Mobile [shared with gDrive] ( PC a & PC b & Mobile )
1.2.1    something only on phone ( PC a & PC b & Mobile )
1.2.2    Family [shared with gDrive] ( PC a & PC b & Mobile & PC C)
1.2.2.1  some subgroup for family  ( PC a & PC b & Mobile & PC C)
1.2.3    ngo admin [share with one drive]  ( PC a & PC b & Mobile & PC D)
1.2.3.1  something only for ngo admin ( PC a & PC b & Mobile & PC D)
1.2.3.2  ngo subgroup  [share with one drive] ( PC a & PC b & Mobile & PC D & PC E)

Operating System: Windows 10 & 11

@elRicharde elRicharde added the bug label Jul 16, 2024
@droidmonkey
Copy link
Member

droidmonkey commented Jul 16, 2024

I Copy this Database 2 times.
In one of the Copys I delete all which s not a Member of Family.

Don't do this

#6477

@elRicharde
Copy link
Author

Thanks for your quick reply, I wasn´t aware of that and i think this is not very obvious, maybee this should be declared in the manual.

I have a total of 35 Groups and arround 1000 Entries and i want to share to a total of 10 Devices.
To start with a blank DB in all Shared Devices will cost a lot of work.

Is there any Suggestions, Workarrounds to my scenario that could help me out here.
I know this is not a normal usecase but hope to find a solution here anyways. Thanks for your support.

Best regards
Richard

@elRicharde
Copy link
Author

elRicharde commented Jul 17, 2024

I Copy this Database 2 times.
In one of the Copys I delete all which s not a Member of Family.

Don't do this

#6477

I tried a test with a new db and saw imported / "imported on synched" entries get the same UUID in all Databases.
In the Code i see it reads deleted UUID from the database to see which entries need to be deleted in all synched DBs.

So I did my thing another time for testing.
This time I cleared all recycle bins in all DBs and switched them off before i started.
But still, in the "BEFORE-reduced DB", it´s still stored somewhere which UUIDs got deleted at any time in Life (other I can´t explain how it deletes everything Outside of the smaler Group "Family" in my MasterDB.
Maybe that could be a quick a approach.
It shouldn´t delete things deleted BEFORE setting up KeeShare. That "if-Statement" might be easy to implement @droidmonkey ?
(I´m not a big cpp developer, did some arduino stuff long time ago, but can´t figure all out here myself with my knowledge)

Thanks for your support, best regards Richarde

@elRicharde
Copy link
Author

Edit: The Method with 2 identical DBs shared in 2 pcs synched thru a third file should work.
They are identical in the beginning and need to be identical for all times. UUIDs are the same, as they are copys.
The Structure is kept this way.

For SubGroups this doesn´t work, se postings above.

@droidmonkey
Copy link
Member

droidmonkey commented Jul 17, 2024

It's quite simple, just don't create database C before hand. Simply start keeshare sync from the family folder and don't use an existing database from the file picker.

What you did before was not defining the initial source of truth, which is database A. Just set that all up and then share out specific folders to new databases.

@elRicharde
Copy link
Author

elRicharde commented Jul 17, 2024

Thanks again for your reply.
I just checked with my poor knowledge and chat gpt, i see in the db all deleted entries are saved for all time (at least i don´t see a remove Function for the List of deleted items) -> that explains that you can´t use a grouped DB which is a reduced copy of the master db for KeeShare because all the deleted entries are still saved, no matter if you use Recycle bin or not.

But i think it could be easy to change the function

QList<DeletedObject> Database::deletedObjects()

{
    return m_deletedObjects;
}

to give it an optional parameter for timestamp and use this parameter when getting the extract in KeeShare.

In KeeShare you still need the timestamp for last modifying the settings of KeeShare Tab in the Group and would use this timestamp when calling

Database::deletedObjects( Timestamp_from )

So at least for Devices which all use KeePassXC the structure of a database could be kept when doing as described above.

If you think I'm missing a detail here please let me know.
Thanks for your time and your support.

P.S.: as a private power User I will donate some money for the project.

PPS: I also have a Workarround, I could tagg each entry in each folder of the Master like the Folder Name and in the synched DBs created from scratch recreate the Structure... but with so many Folders, each having individual Symbols and Cascades and the need to do this on a few devices, I hope not needing to do it.

@droidmonkey
Copy link
Member

Yes manipulating the time frame for considering deleted objects is a solution. I have considered this in the past. What I have settled on is a formal sharing wizard that walks you through the setup process in a controlled manner and can ask you whether you want to reset a share or whatever.

@elRicharde
Copy link
Author

elRicharde commented Jul 19, 2024

What I have settled on is a formal sharing wizard that walks you through the setup process in a controlled manner and can ask you whether you want to reset a share or whatever.

Is this on the Roadmap?
I'm considering creating a PR for my proposal after my vacation if I find the time.
Would you concern to Merge that if everything is made right?

Is there also a way to update the manual?
I could complete some information I found in the manual in KeeShare.

Richard

@droidmonkey
Copy link
Member

Yes please do commit an easy interim solution if it prevents this issue.

You can update documentation in this file: https://github.com/keepassxreboot/keepassxc/blob/develop/docs/topics/KeeShare.adoc

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