StoreAuth

Git Source

Title: StoreAuth

Decides which protocol components may act on a user's store.

Registry membership is not authority. DotnsProtocolRegistry is an address book kept so consumers can discover the protocol, and isRegisteredAddress answers true for every address under every key, including entries that exist only to be found. Using it as the gate hands store authority to whatever is registered next, and although

Authority is instead the registrar, the registry, and whatever the registrar currently accepts as a controller. Controllers are read from

A writer is admitted for every store rather than scoped to the names it issues, which rests on the controller set being trusted: a controller can mint any name outright, so letting it write that name's label is no wider than the authority it already holds.

Notes:

  • function: IDotnsProtocolRegistry.remove can now clear a key, a deployment already carrying one keeps it until governance acts. A registered call forwarder is the sharpest case: it makes the call anyone asks it to, and the store sees the forwarder as its caller.

  • function: IDotnsRegistrar.controllers rather than from a registry key so that a controller added through addController can write the labels it mints, without a second registration step or a beacon upgrade of every deployed store.

  • security-contact: admin@parity.io

Functions

isStoreWriter

Whether caller is a protocol component allowed to act on a user's store.

Ordered by how often each one writes: the registrar on every mint and transfer, a controller on a registration or a gateway name, and the registry on a subname.

function isStoreWriter(
    address protocolRegistry,
    address caller
)
    internal
    view
    returns (bool authorised);

Parameters

NameTypeDescription
protocolRegistryaddressThe canonical DotNS protocol registry.
calleraddressThe address being checked, normally msg.sender.

Returns

NameTypeDescription
authorisedboolTrue if caller is the registrar, an authorised controller, or the registry.