-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Ensure signTypedData is restricted to a domain #10576
Comments
But since we haven’t added this behavior yet, this could break existing Ðapps. Proposal: We add a metrics event for that method, which just records when a domain requests a signature from a domain that does not match itself, and record those two values. If after a sprint this is an acceptable number of reports, we can roll out this security improvement. |
Another way to avoid breaking as badly: make this an optional param. Contracts can then require it if they like. This allows contracts to only work with some sites, which damages interoperability and permissionless innovation but can provide a type of security in an opt in way. |
The EIP-712 spec includes a There has been much discussion on including an There is a
|
Some good literature on Self Authenticated Domains:
(referenced by @holantonela, btw) |
Should we implement this metric event and get a sense of how frequently this mismatch occurs and what Since as @Gudahtt points out there is currently no full "origin" field on the domain object, do we feel ok matching the |
We may be able to reuse domain binding check coming with SIWE implementation. Ref: https://github.com/spruceid/metamask-extension-siwe/tree/feat/siwe-update |
my impression is that it is very rare to find a 712 signature bound to a website domain. Usually the domain separator is just used to specify the verifying contract and chain ID, a version, and the name of the contract. Might be interesting to even have a metric for if people ever use domain binding. |
I agree, especially when login front-ends are dissociated from the main domain. We will quickly learn about dapp implementations when this gets released. We can even be more flexible by doing something like wildcards for subdomains. While discussing this enforcement with stakeholders, most people in the room agreed that this is a great way to mitigate phishing attacks. Also, if we warn users about this mismatch, there is not available recovery flow. More details here #16295
Yes. We have metrics in place to learn about SIWE usage. |
EIP712 has a
domain
field that is meant to be used as a security measure, to restrict the range of possible signatures.We do not currently enforce
domain
in any way that could prove to a contract that a signature was suggested to the wallet from a given web app.This has been requested by an L2 team using
signTypedData
.The text was updated successfully, but these errors were encountered: