In this chapter we will explain the bootstrap process initiated in [bootstrap].
Before we can start to create and perform actions, we must first install four primordial entities:
-
A subject that will only be used to bootstrap the system to a point where we have real users (The system subject).
-
An operation that allows the creation of other actions (The creator operation).
-
A permission to allow the subject (created in The system subject) to call this operation (created in The system permissions).
-
A transaction function that we can use to perform an operation (The operation transaction function).
The system subject is created to perform certain actions that are not authorized by general users of the system.
It is primarily used for bootstrapping the system and should not be used afterwards.
It is similar to the Unix root user.
link:../../src/juxt/site/alpha/init.clj[role=include]Next we install a single operation that enables the creation of all other actions.
Let’s examine the document that represents this operation:
link:../../src/juxt/site/alpha/init.clj[role=include]-
This rule allows our system subject to call this operation, if an explicit permission exists.
-
This Malli schema restricts the URIs of new Operations. Again, this should be modified if necessary to correspond to a different base URI.
-
This sets the
:juxt.site.alpha/typeattribute so that the document is treated as an operation.
The system subject cannot call the create-operation operation without being granted permission.
A permission is represented by a specific entity.
link:../../src/juxt/site/alpha/init.clj[role=include]-
This attribute tells Site this is a permission document
-
This is the set of actions which the permission allows
-
This purpose attribute must be included in every permission but is set to nil in most cases
-
This attribute is what satisfies the rule in
create-operation