-
Notifications
You must be signed in to change notification settings - Fork 3.8k
DAWN-398 ⁃ User configurable generic security delay #1022
Comments
In theory the recovery with owner could occur within hours so much shorter delays are possible and still benefit. |
➤ Brian Johnson commented: This talks about applying the delay for the permission that is linked if the permission is being updated, I'm also presuming the same delay applies for linkauth(from existing link on permission to another link) or unlinkauth for permission. |
➤ Brian Johnson commented: [~bart.wyatt] [~dan.larimer] How should happen for inline actions and deferred_transactions that have delays? I would think the answer could be more nuanced if the transaction that is currently being processed has a published time that satisfies the delay (Transaction was already boxed and delayed for required time and is now executing and now creating a follow on action). Simple requirements for inline deferred_actions would be to check if delay is already satisfied and execute or delay the rest of time. Would also like to know if the delayed status is set on the transaction_trace. |
➤ Bart Wyatt commented: Ok, talked with [~dan.larimer] and came to the following conclusion. We are not going to execute the transaction to determine implied actions because it is trivial to write a stateful contract which changes those results. So, the delay for auto-boxing will not be based on execution results. However, as a nod to these situations we want to add the concept of a semantic actions which are no different than normal actions but may carry additional meaning at the chain level. In this case mindelay@config::system_account_name. During our check for minimum permissions etc we should also scan the explicit actions on a transaction for this action and interpret the data for that action as an additional factor in the minimum delay calculation. NOTE: when executing an action, if an inline_action is sent and the implied minimum delay is non-zero for the permissions associated with that the transaction should FAIL if it has not already been delayed for an amount of time that satisfies that delay. while cludgy this gives us a few good things:
RE delayed status. Please extend transaction_receipt::status_type to include a "delayed" enumeration. The amount of the delay should be deterministic and if one producer attempts to apply a block with a deferred transaction before that transactions delay has expired it should fail the block |
… takes multiple actors for authorizing. GH EOSIO#1022
…n does not effect the context. GH EOSIO#1022
➤ Brian Johnson commented: [~dan.larimer] [~bart.wyatt] [~phil.mesnier] First peer review was merged with "#warning TODO..." for processing of delayed transactions in net_plugin_impl::handle_message, since these requirements are not clear. |
…sing so that all the processing around _apply_transaction could be performed for transactions that get delayed. GH EOSIO#1022
…-p2p-2 Moved template function into cpp file. GH #1022
If her Due to previously set up permissions, this transfer is delayed by 30 days. Meanwhile, the real Alice collaborates with her trusted 3rd parties to issue an update from This process takes a week but otherwise completes as expected. Alice now has 23 days of grace time where she has removed the attackers access and can still cancel the withdraw from savings before it takes effect. Alice publishes such a cancellation and loses no tokens in the attack. |
ATC Passes. |
Delayed Signed Transactions
As a user, I may be willing to trade immediate access to certain features for increased security in the event of an account compromise. #922 outlines the procedures by which I, as the user, will respond to such a compromise and regain secure control over my account however, there is a period of time where an attacker may be able to sign certain transactions on my behalf. Depending on my own values, it may be favorable to impose a delay on sensitive transactions on myself in order to ensure that an attacker cannot issue them without recourse.
Feature Description
Each named
permission
on an account is given a requireddelay
which defaults to "no delay".Updates to a
permission
that affect this delay must have been delayed by the existing delay.When processing a newly learned transaction AFTER completely validating all necessary
Authority
IF a
permission
which has a non-defaulteddelay
, is used on the transaction:actions[]::authorizations[]
(first mentioned).delayed
config::system_account_name
with an action name ofcanceldelay
and a payload of the transactions ID (BDJ -- assuming this should be sender_id.canceldelay
action has theactive
permission authorization of one of accounts mentioned in the original transaction's inactions[]::authorizations[]
excuted
status flag, there should be no contract-based error handling required.Example use cases
Alice has a "savings" account and wants to prevent the loss of any EOS, in the event of an account compromise assuming she notices the compromise within 30 days and is willing to delay withdraws from that account to guarantee this. She sets up the sub-account with a permission named
withdraw
authorized by her primary accountalice@active
and having a delay of 30 days requested. She useslinkauth
to set the permission for anyeosio::transfer
action towithdraw
(meaning that any transfer authorized by the savings account now has a 30 day delay). She transfers her secure funds to the sub-account.Alice suffers a breach and her
active
key is compromised. The attacker, immediately issues change to alice's active key and then aeosio::transfer
from the savings account with the new attacker-key. Due to previously set up permissions, this transfer is delayed by 30 days. Meanwhile, the real Alice collaborates with her trusted 3rd parties to issue an update fromowner
to changeactive
keys. This process takes a week but otherwise completes as expected. Alice now has 23 days of grace time where she has removed the attackers access and can still cancel the withdraw from savings before it takes effect. Alice publishes such a cancellation and loses no tokens in the attackTasks
delay
topermission_object
eosio::canceldelay
native contract endpointATC:
(See delay_tests.cpp link_delay_direct_test and for an example)
The text was updated successfully, but these errors were encountered: