Secret storage #23
No reviewers
Labels
No labels
bug
core
documentation
duplicate
enhancement
experiment
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Streigen/echelon!23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "secret-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I added the following crates:
When a user logs in, they need their access token, refresh token, and their sqlite database password stored somewhere securely. For this I used the
iota_strongholdcrate, to store a separate snapshot for each user containing this information. The password for the snapshots are currently all the same (this can be changed easily in the future for if you want the user to memorise a password etc) and is stored in the keyring.This data can be fetched later for automatically logging in the user or switching accounts etc.
@ -29,6 +29,29 @@ anyhow = "1.0.101"serde_json = "1"we do not need to use a low level api like getrandom, just use rand instead
@ -7,3 +7,3 @@use ruma::events::{AnyGlobalAccountDataEvent, GlobalAccountDataEventType, StateEventType};use crate::ClientState;use crate::{ClientState};use tauri::State;this change is not really needed
ive pushed some changes of my own, ill document better later on. still need a few iterations to make perfect. it should have android support now though, i conditionally register android keyring store now
should be all done, please review @rayyan-parkar
@ -0,0 +28,4 @@/// Generate a random 32-character alphanumeric string.pub fn random_secret() -> String {Alphanumeric.sample_string(&mut rand::rng(), 32)}This code is duplicated across secret.rs and keyring_client.rs
@ -0,0 +28,4 @@/// Generate a random 32-character alphanumeric string.pub fn random_secret() -> String {Alphanumeric.sample_string(&mut rand::rng(), 32)}resolved in f2b3b72
I grant you the highest honour, merge it to master
Thank you, kind sir