2

I read the documentation on active vs owner type accounts:

Authorization and Permissions

Permissions are arbitrary names used to define the requirements for a transaction sent on behalf of that permission. Permissions can be assigned for authority over specific contract actions by "linking authorization" or linkauth.

Every account has two native named permissions

owner authority symbolizes ownership of an account. There are only a few transactions that require this authority, but most notably, are actions that make any kind of change to the owner authority. Generally, it is suggested that owner is kept in cold storage and not shared with anyone. owner can be used to recover another permission that may have been compromised.

active authority is used for transferring funds, voting for producers and making other high-level account changes. Every permission name has a "parent." Parents possess the authority to change any of the permissions settings for any and all of their children.

In addition to the native permissions, an account can possess custom named permissions that are available to further extend account management. Custom permissions are incredibly flexible and address numerous possible use cases when implemented. Much of this is up to the developer community in how they are employed, and what conventions if any, are adopted.

Custom permissions are arbitrary and impotent until they have been linked to an action.

Permission for any given authority can be assigned to one or multiple public keys or a valid account name.

I still do not understand what its saying. What is a good example of when one should own an active account or a owner type account? Do I need both or do they both come together when I create a public private key pair? Or are they totally separate different private keys?

2 Answers 2

0

The separation of owner and active is for security purposes.

For instance, in EOSIO, you can stake your coins, locking them for 3 days. If the keys that manage the active permission are compromised, the attacker cannot move your funds for three days. During this period, assuming you have the key(s) associated with the owner permission, you can change the key(s) for the active permission and lock the attacker out before the three days window expires.

On the other hand, if the owner key(s) are compromised, the attacker can change all key(s) associated with the account and transfer all the funds.

Do I need both or do they both come together when I create a public private key pair? Or are they totally separate different private keys?

It's up to you whether you use same key pair for owner and active. You can simply create 2 key pairs: one that you use for the active permission for regular usage, and one that you use for the owner permission for cold storage. Losing the active key is less damaging, as you can just change the key from the owner permission.

Alternatively, one may simply use the same key pair both for owner and for active if they don't believe the separation would help them, but this is not encouraged.

2
  • active and owner permissions are associated to the same account name right? Oct 10, 2018 at 19:47
  • yup that's right
    – confused00
    Oct 10, 2018 at 19:48
0

When you create an account, for instance using cleos, you need to provide two keys: active and owner. The syntax is the following:

cleos create account [OPTIONS] creator name OwnerKey [ActiveKey]

Positionals:
  creator TEXT                The name of the account creating the new account (required)
  name TEXT                   The name of the new account (required)
  OwnerKey TEXT               The owner public key for the new account (required)
  ActiveKey TEXT              The active public key for the new account

Usually, ActiveKey and OwnerKey should be different. In a local environment you can set the owner key equal to the active key but you should not do this in the mainnet for instance. Once you create the account you can check the keys related to the account using cleos get account <account_name>. The output is something like this:

permissions:
     owner     1:    1 EOS6SS...
        active     1:    1 EOSrmQ...

Here you can see that owner and active have an hierarchical structure: the active key can do everything that the owner key does, except change the active key. So the owner key usage is mainly to change the active key. Moreover you can define other permissions using cleos set account permission. Suppose you want to create another permission, you can use: cleos set account permission <account_name> <permssion_name> <key> <parent>. Suppose you create a permission named vote, child of active. If you run cleos get account you get:

permissions:
     owner     1:    1 EOS6SSHcCaBrmQLPUgUthQ3mD13NktVzPerkJEDSLRDbn8N7jNNG9
        active     1:    1 EOS6SSHcCaBrmQLPUgUthQ3mD13NktVzPerkJEDSLRDbn8N7jNNG9
           vote     1:    1 EOS6SSHcCaBrmQLPUgUthQ3mD13NktVzPerkJEDSLRDbn8N7jNNG9

The discussion can go on because you can assign a specific smart contract action to a permission...

1
  • Shouldn't it state: "the active key can do everything that the owner key does, except change the owner key." .. I code reference would be good, I think it is somewhere in this block: github.com/EOSIO/eos/blob/…
    – slim2k
    Oct 17, 2019 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.