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

rejects client messages if client not in session #8

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Oct 24, 2024

Summary

updates the multisig broker server to reject data submissions from clients that haven't joined the session

does not return session status if client not in session

sends an error message for 'NON_SESSION_CLIENT'

consolidates session validation logic to reduce repeated code

Closes IFL-3087

Testing plan

  1. Apply the diff below to prevent the server from adding the client who starts the session to the session:
diff --git a/src/server.ts b/src/server.ts
index d5fdb00..17d9180 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -480,7 +480,7 @@ export class MultisigServer {
     this.logger.debug(`Client ${client.id} started dkg session ${message.sessionId}`)
 
     client.identity = body.result.identity
-    this.addClientToSession(client, sessionId)
+    // this.addClientToSession(client, sessionId)
 
     this.send(client.socket, 'joined_session', message.sessionId, {
       challenge: session.challenge,
  1. run yarn build
  2. start a dev server using yarn start
  3. start a dkg session using ironfish wallet:multisig:dkg:start --server --no-tls --hostname localhost -v
  4. observe error messages as the client tries to retrieve status without joining the session

updates the multisig broker server to reject data submissions from clients that
haven't joined the session

does not return session status if client not in session

sends an error message for 'NON_SESSION_CLIENT'

consolidates session validation logic to reduce repeated code
@hughy hughy merged commit f90e22c into main Oct 24, 2024
1 check passed
@hughy hughy deleted the feat/hughy/reject-msgs-session branch October 24, 2024 21:22
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

Successfully merging this pull request may close these issues.

2 participants