create account

Dapp-a-day 4: Access Control via `auth` by nikolai

View this thread on: hive.blogpeakd.comecency.com
· @nikolai ·
$37.83
Dapp-a-day 4: Access Control via `auth`
![Nexus Logo](https://i.imgur.com/JoJ8cXZ.png)

**Each weekday leading up to devcon2, Nexus will highlight a dapp, library, or package (something with a `dappfile`) as a promotion of our toolchain and as case studies for other developers. [Yesterday's Post.](https://steemit.com/ethereum/@nikolai/dapp-a-day-3-eth-token-wrapper)**

`ds-auth` is an opinionated access control pattern. It is an extension of the "owner" pattern which allow switching the contract into "ACL lookup" mode.

https://github.com/nexusdev/ds-auth

The dual control modes allow making sequences of administrative changes on-chain easier to write in the form of "update" contracts.

There may be some more usability/safety upgrades (like using distinct addresses and doing additional sanity checks when switching modes during handoffs), but it will likely be a major version upgrade.

You might notice that `DSBasicAuthority is DSAuth`. It's turtles all the way down! The control hierarchy should be "rooted" in something other than one of the given Authority types.

Tomorrow we will introduce one example: A fixed multisig actor.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authornikolai
permlinkdapp-a-day-4-access-control-via-auth
categoryethereum
json_metadata{"tags":["ethereum","dapp","blockchain","cryptocurrency"],"image":["https://i.imgur.com/JoJ8cXZ.png"]}
created2016-08-11 19:24:09
last_update2016-08-11 19:24:09
depth0
children2
last_payout2016-09-11 08:59:03
cashout_time1969-12-31 23:59:59
total_payout_value34.226 HBD
curator_payout_value3.599 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,104
author_reputation9,571,877,600,096
root_title"Dapp-a-day 4: Access Control via `auth`"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id750,988
net_rshares21,630,035,277,577
author_curate_reward""
vote details (30)
@flandude ·
A dapp a day keeps centralization at bay.
👍  
properties (23)
authorflandude
permlinkre-nikolai-dapp-a-day-4-access-control-via-auth-20160812t051330468z
categoryethereum
json_metadata{"tags":["ethereum"]}
created2016-08-12 05:13:30
last_update2016-08-12 05:13:30
depth1
children0
last_payout2016-09-11 08:59:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length41
author_reputation4,559,808,635,553
root_title"Dapp-a-day 4: Access Control via `auth`"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id759,680
net_rshares0
author_curate_reward""
vote details (1)
@linkback-bot-v0 ·
<div>  <p>  This post has been linked to from another place on Steem.  </p>  <ul>        <li>      <a href="https://steemit.com/ethereum/@nexusdev/dapp-a-day-18-erc20-token-vault"> Dapp-a-day 18: ERC20 token vault </a>      by      <a href="https://steemit.com/@nexusdev">  @nexusdev </a>     </li>        <li>      <a href="https://steemit.com/ethereum/@nexusdev/dapp-a-day-16-ds-burner"> Dapp-a-day 16: DS-burner </a>      by      <a href="https://steemit.com/@nexusdev">  @nexusdev </a>     </li>        <li>      <a href="https://steemit.com/ethereum/@dbrock/dapp-a-day-16"> Dapp-a-day 16 </a>      by      <a href="https://steemit.com/@dbrock">  @dbrock </a>     </li>        <li>      <a href="https://steemit.com/ethereum/@nexusdev/dapp-a-day-13-solidity-quirks"> Dapp-a-day 13: Solidity Quirks </a>      by      <a href="https://steemit.com/@nexusdev">  @nexusdev </a>     </li>        <li>      <a href="https://steemit.com/ethereum/@nexusdev/dapp-a-day-12-ds-base"> Dapp-a-day 12: DSBase – a reasonable base class </a>      by      <a href="https://steemit.com/@nexusdev">  @nexusdev </a>     </li>        <li>      <a href="https://steemit.com/ethereum/@nexusdev/dapp-a-day-11-whitelist-boring"> Dapp-a-day 11: Whitelist (Boring!) </a>      by      <a href="https://steemit.com/@nexusdev">  @nexusdev </a>     </li>      </ul>  <p> Learn more about  <a href="https://steemit.com/steem/@ontofractal/steem-linkback-bot-v0-3-released">    linkback bot v0.3</a>   </p>   <p>Upvote if you want the bot to continue posting linkbacks for your posts. Flag if otherwise.   Built by @ontofractal</p></div>
properties (22)
authorlinkback-bot-v0
permlinkre-nikolai-dapp-a-day-4-access-control-via-auth-linkbacks
categoryethereum
json_metadata{}
created2016-09-10 19:33:27
last_update2016-09-10 19:33:27
depth1
children0
last_payout2016-09-11 08:59:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,606
author_reputation1,915,954,976,722
root_title"Dapp-a-day 4: Access Control via `auth`"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,199,805
net_rshares0