-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Signing transactions with rotating token #3691
Conversation
Conflicts: ethcore/src/account_provider/mod.rs rpc/src/v1/types/mod.rs.in
let new_token = random_string(16); | ||
let signature = if is_std_password { | ||
// Insert to transient store | ||
try!(self.sstore.copy_account(&self.transient_sstore, &account, &token, &new_token)); |
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.
what will happen here when the account is already present in the transient store?
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.
Transient store supports many entries with the same address, so it will be fine. Actually this is exactly what we want.
What's the main use case for this? Will it be exposed over RPC to enable sending TXs in rapid succession more securely? It seems that once an account is in the transient store there are actually two valid "passwords" which could be used to unlock it, doubling the attack surface. Shouldn't it be impossible to unlock an account just using its password until any valid tokens have expired? |
This PR already contains RPC methods that could be used for signing with token. |
lots of |
Conflicts: ethstore/src/ethstore.rs ethstore/src/secret_store.rs
Conflicts: rpc/src/v1/traits/signer.rs
AccountsProvider
(sign_with_token
)TODO:
set_name/set_meta
updates inEthStore
EthStore
transient_sstore
(token is valid only for some specified time; logged here: Rotating tokens timeouts #3758 )