-
Notifications
You must be signed in to change notification settings - Fork 3
Require signature to submit challenge #48
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
base: main
Are you sure you want to change the base?
Require signature to submit challenge #48
Conversation
| nonce: { | ||
| type: Number, | ||
| default: 1, | ||
| }, |
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.
This nonce is what I am unsure about. I'd like have someway to invalidate old signatures once they've been used. Not sure if there is a more standard approach than a nonce, like maybe a timestamp?
Also wondering if there is a more standard way the message itself should be structured?
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.
Why do we need to invalidate them? They are just proving that a certain address is the one submitting a challenge. Somebody could maliciously send the same signature later but first they would have to do a man in the middle attack. What am I missing?
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.
I like a timestamp more than a nonce. That way we don't need to track nonces, we just need to look at the current time. Still not sure we need it though.
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.
Ok got it, thanks. You're not missing anything. The only reason to add a nonce or timestamp would be to prevent signatures from being leaked and reused. But that does seem like overkill for ETT.
Linked to CLI PR #130
Why
We don't currently require any authentication to submit a challenge, and it is possible for anyone to send contract submissions for anyone else.
How
/submitendpoint, requiring a message signed by the user's accountGET /message/:userAddressendpoint for the CLI to get the correct message to be signedScreencast.from.2025-08-27.14-22-11.webm