12
votes
Accepted
Restricted Access / Authentication for a Remote Geth Node
OK I figured this out, using basic HTTP/HTTPs auth. Posting in case this helps anyone else:
AWS: disabled inbound TCP access to 8545 port (in AWS security groups)
Added auth_basic in nginx
Used ...
8
votes
Accepted
What are the best practices to allow user signup and login for a dapp?
AFAIK it's always easy and good to use the PGP key mechanism for user authentication in DAPPs built using Ethereum. It's possible to use the account address as the username and to let the user sign ...
5
votes
Accepted
How to authenticate with an Ethereum account through personalSign?
It's personal_sign now, not eth_personalSign. It has always been personal_sign, it's probably just a typo in the Metamask docs.
const message = "Hello from Ethereum Stack Exchange!";
const ...
4
votes
Accepted
Is there a way to know the REAL msg.sender?
On a real blockchain, you can't send from whatever account you want. You can only send as an address for which you know the private key.
So "the real msg.sender" is just msg.sender. It cannot be ...
4
votes
Accepted
Authentication using ethereum account
Despite Metamask seems to complicate the process to you, if you give it a try you'll find that in reality it simplifies it for both users ( until some point ) and developpers.
To introduce a bit the ...
3
votes
Accepted
How to use recovery mnemonic in metamask to import account instead of private key?
Importing a mnemonic can only be done when you are not logged in. It's best to backup any existing accounts in the current MetaMask instance before importing a mnemonic.
When logged out, you can ...
3
votes
Accepted
Authentication or Identification of smart contract
You can keep mapping (address => bool) authorizedContracts; inside contract1. And the method addAuthorizedContract should be open only to the owner of contract1.
If you want to avoid calling ...
3
votes
Accepted
RPC authentication in Ethereum?
The JSON-RPC interface will talk to anyone who is able to communicate with it over the network. The alternative, IPC, uses a UNIX socket, and will talk to anyone who can access that socket.
If you ...
3
votes
Is it possible to create an X.509 certificate from an Ethereum/Bitcoin private key?
It is possible to create certificates with secp256k1 keys using OpenSSL, for example following OpenSSL generate different types of self signed certificate.
The main problem is certificates with ...
3
votes
What are the best practices to allow user signup and login for a dapp?
Addressing #4, it's definitely possible, but you will have to make a decision between completely centralized vs decentralized approach.
MetaMask is decentralized (end users hold the private keys), ...
3
votes
Accepted
User Whitelisting on Smart Contract
Previous user's answer isn't really workable with a possible user list in the millions--you'd be spending billions of gas to add all the users, which is obviously too much. What you want is a Merkle ...
2
votes
What are the best practices to allow user signup and login for a dapp?
I know its too old thread but since I faced the very same problem I would like to answer it.
The concept of digital signature which blockchain uses, is very known tech but unfortunately it is not ...
2
votes
What are the best practices to allow user signup and login for a dapp?
You can use an Ethereum address as a unique identifier for a user account. You can then require the holder of the private key that maps to that address to sign a message which you can then check.
It ...
2
votes
Accepted
How to unlock account from another node in same blockchain network?
In the Answer to the question you referenced, the key phrase is
without adding your key files there
You can unlock any account from any node, but you have to bring the private key with you. The ...
2
votes
Accepted
How to authenticate a smart contract
I don't think your question is unclear (someone flagged it) but it's pretty far off from the way Ethereum works conceptually. Let's start with the big one.
Everything in Ethereum is deterministic, ...
2
votes
Authentication or Identification of smart contract
You could use extcodesize and extcodecopy to fetch the code for msg.sender. Then you could hash it and compare to a hash of the known good source code.
Note that this only works if the goal is to ...
2
votes
Accepted
OAuth/BearerTokens in ChainLink
You use an external adapter.
The node side has the OAuth information. So you don't add the information into the smart contract itself.
You can check out the Twitter External Adapter and see that all ...
2
votes
Accepted
Private Ethereum Platform development with Authentication System
In Ethereum there is no such thing as super nodes. You can have several differ sync types like.
Fast, Full and Full(archived). But they will all be able to donthe same.
Also doing this in mainnet ...
2
votes
HMAC-x implementation for solidity
Solidity has the primitives you would need for some HMAC functions, namely several hashing functions. As you pointed out, other hashing functions could be implemented, but hashing in the Ethereum VM ...
1
vote
How do I retrieve user data once I have incremented count?
Yes, you can create a mapping which connects each address to its id (check the comments):
mapping (uint => Users) public users;
mapping(address => bool) _isRegistered;
mapping(...
1
vote
Accepted
Wallet as authenticator with WalletConnect
is there a possibility to get a sign at connect() time, so that the user does not need to confirm twice, once for the connect, once for the sign()?
Unfortunately, the wallet interaction is limited to ...
1
vote
How chainlink guarantees the authenticity and accuracy of the data it returns to the smart contract
The basic request model would never be something you go to production with, for exactly the reason described.
This is why you want to work with a decentralized Chainlink network. The same reason that ...
1
vote
Metamask Wallet Change in Dapp
You can use the eth_accounts JSON-RPC call which returns the list of accounts owned by the client. Metamask API implements it with :
const accounts = await ethereum.request({ method: 'eth_accounts' });...
1
vote
EcRecover signed message does not match PublicAddress
// ("\x19Ethereum") != ("\x19" + "Ethereum")
var message = Encoding.UTF8.GetBytes("\x19" + "Ethereum Signed Message:\n" + terms.Length + terms);
1
vote
ERC20 Anyone can call approve if knows ABI on contract and my address?
You can execute .send({from: 'SomeAccount'}) only after unlocking SomeAccount on the node that you're communicating with via your Web3 instance.
On public nodes this is usually not even an option, ...
1
vote
How to authenticate a smart contract
Contracts cannot access someone else information on their own. They can call other contracts to acces information but only when someone else instructed them to do so.
For example a smart contract ...
1
vote
Authentication or Identification of smart contract
As you said, you can't really have secrets in the contract. Except if some data is encrypted off-the-blockchain and the result sent to the contract.
The problem with that approach is the work that ...
1
vote
Is there anything that is equivalent of Hyperledger Fabric's Membership Service Provider in Ethereum?
According to ethereum documentation-
Public blockchains:
a public blockchain is a blockchain that anyone in the world can read,
anyone in the world can send transactions to and expect to ...
1
vote
Is there anything that is equivalent of Hyperledger Fabric's Membership Service Provider in Ethereum?
Ethereum is a public and open protocol. As such, any node that follows protocol is welcome to participate.
Having said that, there are approaches to addressing this concern.
A team may form a ...
1
vote
Accepted
Is there anything that is equivalent of Hyperledger Fabric's Membership Service Provider in Ethereum?
There is none. That aspect of Networks and channels don't exist in Ethereuem since the latter is a public and not permissioned blockchain network. In these types of blockchain access is granted to all ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
authentication × 62solidity × 13
metamask × 13
web3js × 10
dapps × 8
signature × 8
go-ethereum × 6
security × 6
ethers.js × 5
dapp-development × 4
private-key × 4
blockchain × 3
proof-of-authority × 3
gnosis-safe × 3
contract-development × 2
ether × 2
wallets × 2
ethereum-wallet-dapp × 2
accounts × 2
infura × 2
nodes × 2
mapping × 2
react × 2
chainlink × 2
cryptography × 2