Skip to content

Setting Root Agent #38

Closed
Closed
@joepio

Description

@joepio

Any change to data needs to be signed by some Agent. As Agents themselves are just resources, they need to be created by some other Agent. I'll call the very first Agent the Root Agent. The Root Agent is a user that has the highest of rights - e.g. create admins, destroy everything. So how should a Root Agent be created? Some options:

  1. Create a root agent when instantiating a new server with a new database. Pass the private key and the URL to STDOUT, and let the user copy it somewhere safe. Seems a bit ugly (unclear, unsafe), but simple to implement.
  2. Provide a CLI command in atomic-server for creating Agents, e.g. atomic-server agent new. A bit more of a hassle, but I'm very likely to need more CLI tooling in server at some point anyhow.
  3. Read a secret seed from .env which generates the root Agent.
  4. Have some setup endpoint used for generating the first Agent. Seems user friendly for most, but hard to control by machine.
  5. Check the default config folder ~/.config/atomic, and check for a config file. If it does not exist, create one with some defaults and a newly created author.

I think multiple of these should be possible.

Relates to client server interaction #6 and authentication #13. Also to atomic-data authorization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions