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

Sshnp not receiving Sshnpd deviceName until both atSigns activated #188

Closed
JeremyTubongbanua opened this issue Jun 12, 2023 · 3 comments · Fixed by #211
Closed

Sshnp not receiving Sshnpd deviceName until both atSigns activated #188

JeremyTubongbanua opened this issue Jun 12, 2023 · 3 comments · Fixed by #211
Assignees
Labels
bug Something isn't working

Comments

@JeremyTubongbanua
Copy link
Member

JeremyTubongbanua commented Jun 12, 2023

Describe the bug

The sshnpd tmux session continuously runs sshnpd and patiently waits for the .atKeys to be generated. If the device atSign is onboarded before the client atSign, then the deviceName is never shared with the client atSign, since the client atSign does not yet have a public:publickey@

If I am correct, the notification of the deviceName is being sent without caring if the client receives it or not. Then goes straight into monitor. Only once the client is setup, then the device's sshnpd has to be restarted

Steps to reproduce

  1. On device, run sshnpd installer
  2. On device, run ./at_activate
  3. On device, tmux session successfully started sshnpd, :)
  4. On client, run sshnp installer
  5. On client, run ./at_activate
  6. On client: Could not receive the device name from sshnpd since sshnpd tried sharing the device name before sshnp's atsign could activate first

Expected behavior

I guess it is working as intended (in that two non-onboarded atSigns are unable to communicate to one another), but if the goal of the do-while inside the tmux session was for it to start up the daemon, then it is not going as planned :(

sshnp recognize deviceName given by sshnpd

Screenshots

No response

Smartphones

No response

Were you using an atApplication when the bug was found?

No response

Additional context

2 fixes:

  1. (documentation fix): expect the person to know that both of the atSigns MUST be onboarded before running the sshnpd and sshnp binaries. maybe even avoid starting up the tmux session to let them start it themselves? tell them to specifically that client sshnp HAVE to be setup before device sshnpd

  2. (software fix): ensure that the notifications are received and that the receiving-end is indeed an onboarded atSign, by doing final NotificationResult notifResult = await notificationService.notify(...) check for notificationResult.notificationStatusEnum == NotificationStatusEnum.delivered

@XavierChanth
Copy link
Member

  • public key check as discussed in planning

@JeremyTubongbanua
Copy link
Member Author

To expand on discussion:

The issue is that the notifications are being sent to the client atSign without checking if the client atSign is even onboarded.

The solution is to check for a public key on the client (aka manager) atSign.
Wait until it exists before it does the notification of the username.

@JeremyTubongbanua
Copy link
Member Author

CC @cconstab @gkc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants