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

Add way to bypass privacy mode on a per-site basis #6110

Closed
danfinlay opened this issue Feb 4, 2019 · 9 comments · Fixed by #6904
Closed

Add way to bypass privacy mode on a per-site basis #6110

danfinlay opened this issue Feb 4, 2019 · 9 comments · Fixed by #6904
Assignees
Labels
needs-design Needs design support.

Comments

@danfinlay
Copy link
Contributor

Privacy mode is a great improvement for how we expose identifiable information to sites, however if we roll it out today, we will break every site that is statically hosted or not actively maintained. This violates one of the basic principles of the web.

We should design & implement a method to force-sign-in to sites that have not implemented 1102 sign-in methods. Possibly a generic "sign in" button on the MetaMask popup.

@aakilfernandes
Copy link

One way to do this would be to use getter functions for web3.eth.defaultAccount and similar sensitive calls.

web3.eth = {
...
get defaultAccount() {
   if (!confirm('Allow this site to read your data')) {
      return
   }
}
}

@danfinlay
Copy link
Contributor Author

You'll be excited to hear we're working on a robust system for managing permissions like that, already in working proof of concept phase.

@danfinlay
Copy link
Contributor Author

The difference here is that this issue is for supporting sites that are not making any code changes.

@danfinlay
Copy link
Contributor Author

danfinlay commented Feb 4, 2019

Oh I see, we could also prompt for permission on request of restricted properties. That's not a bad idea.

@aakilfernandes
Copy link

Yup, and since dapps are expecting synchronous data, I think this may be your only option. Any custom user interface will have to be asynchronous. confirm has the benefit of being synchronous

@danfinlay
Copy link
Contributor Author

Sync actually isn't an option, because we can't hit the background process synchronously. If we allow this prompt to be called in-page, then sites could manipulate its communication method to force approval. Approval has to be from the background, and so has to be async. What we can do is allow calls to eth_accounts to trigger user approval, which is actually a very old idea by @frankiebee that I have no idea how we didn't just do.

@aakilfernandes
Copy link

Ah, that makes sense.

@aakilfernandes
Copy link

Maybe just the benefit of fresh eyes :)

@whymarrh
Copy link
Contributor

Duplicate of #6320, which is being used to track progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design Needs design support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants