-
Notifications
You must be signed in to change notification settings - Fork 24
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
LLT-5866: Remove app_user_uid from the config. #1023
base: main
Are you sure you want to change the base?
Conversation
deb220f
to
488ab7e
Compare
clis/teliod/src/nc.rs
Outdated
let callbacks = Arc::new(Mutex::new(vec![])); | ||
|
||
let nc_config = NCConfig { | ||
authentication_token: config.authentication_token.clone(), | ||
app_user_uid: config.app_user_uid, | ||
app_user_uid: *hw_identifier, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe rename NCConfig
's app_user_uid
to hw_id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From MQTT API point of view this field is still called app_user_uid
. I could change the NCConfig
but TokenHttpRequest
would still have to remain app_user_uid
otherwise it would break the HTTP request.
I would rather change the new()
signature for more consistency.
+1 |
488ab7e
to
6f0f702
Compare
6f0f702
to
1c79a2d
Compare
What is the difference between |
1c79a2d
to
8c3f6ca
Compare
8c3f6ca
to
0b5a266
Compare
@Hasan6979 One is used to identify the device on meshnet, and the other to identify the device for MQTT subscriptions.
|
0b5a266
to
30fd1fe
Compare
let mut identity_path = dirs::data_local_dir().ok_or(Error::NoDataLocalDir)?; | ||
identity_path.push("teliod"); | ||
if !identity_path.exists() { | ||
let _ = create_dir_all(&identity_path); | ||
} | ||
identity_path.push(&format!("{interface_name}.json")); | ||
identity_path.push("data.json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason behind this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based from the discussions on slack, we want to destroy the old config if we switch users.
Currently, if you change the interface name in the config file, it will create a new identity file leaving the old one behind.
Problem
Currently
app_user_id
used for notification center is part of the user provided config for teliod. It shouldn’t be user configurable, we can reuse the the meshnethardware_id
for it instead which should be generated when the device is registered.Solution
Remove
app_user_uid
from the user config.Use a randomly generated UUID instead of the public key for
hw_identifier
.Use the
hw_identifier
asapp_user_uid
in notification center.☑️ Definition of Done checklist