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

Store application tokens/access-keys on EEPROM #75

Open
zytegalaxy opened this issue Apr 28, 2024 · 3 comments
Open

Store application tokens/access-keys on EEPROM #75

zytegalaxy opened this issue Apr 28, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@zytegalaxy
Copy link
Collaborator

zytegalaxy commented Apr 28, 2024

If we store application tokens/access-keys on file system, AND the user setups a fresh system from a new image, they will have to reconnect all services. If we store/fetch that data on EEPROM, we address this shortcoming.

We can offer an option to erase everything (factory reset) if the user wants to give their device to someone else.

EEPROM does not have read/write cycle limitations (wear and tear) but write operation is a bit slow.

@zytegalaxy zytegalaxy added the enhancement New feature or request label Apr 28, 2024
@sassanh
Copy link
Collaborator

sassanh commented Apr 29, 2024

We basically need a file system abstraction implemented using fsspec, then we let the user choose different options for storing config and secrets (each in a separate menu) and EEPROM would be one of their options.
They can choose multiple options, if the app finds out there is a difference in stored data while starting up, it will ask the user which one it should choose.
If a user selects a new storage and it already has data and the data is different than the loaded data, it will again ask the user to choose.
We may later let the user to select in details which piece of data should come from which source when a conflict happens.

@zytegalaxy zytegalaxy moved this to Todo in Ubo App May 3, 2024
@zytegalaxy
Copy link
Collaborator Author

I suggest we limit number of writes to EEPROM to once a day; The data does not need to in high frequency sync since EEPROM is only going to hold app secrets which are going to be only a handful and entered infrequently.

We should probably have a factory reset option under Settings that wipes off this data from EEPROM. We could even add a manual backup option to let users to sync EEPROM content (backup secrets) manually by pressing a button.

@sassanh
Copy link
Collaborator

sassanh commented May 6, 2024

@zytegalaxy I think it's a good idea to limit the number of writes to the EEPROM, but maybe we need to be more flexible. A user may enter multiple secrets on their first day, or they could enter several secrets on a particular day while setting up a specific service.
So instead of limiting writes on a daily basis, I suggest limiting them to "only when a secret has changed," this might result in multiple writes on some days, but in the long run, it may be much more efficient.

@sassanh sassanh moved this from Todo to In Progress in Ubo App May 7, 2024
@sassanh sassanh removed the status in Ubo App May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants