DevOpsDays Indy 2023 demo
- Install topaz, using
brew install aserto-dev/tap/topaz - Install the policy CLI, using
brew install opcr-io/tap/policy - Install golang, using
brew install golang - Install graphviz, using
brew install graphviz - Install jq, using
brew install jq - Install grpcurl, using
brew install grpcurl
-
Clone the repo
git clone https://github.com/aserto-proj/devopsdays.git -
cd devopsdaysall the following commands must be executed from the root of the cloned directory! -
make installwill install the required version of thetopazcontainer image. -
make buildwill compile the OPA policy in theregodirectory, usingpolicy build rego --tag ghcr.io/aserto-proj/devopsdays:latest. -
make pushwill publish the OPA policy container image toghcr.io, usingpolicy push ghcr.io/aserto-proj/devopsdays:latest. -
make configurewill configure the authorizer to use the published policy container image. -
make manifestwill load the manifest into the edge directory instance, usingtopaz load ./model/manifest.yaml. -
make datawill load the objects and relations defined in thedatadirectory into the edge directory instance, usingtopaz import --directory=./data. -
make testwill run thecheckassertions, which are defined intest/assertions.jsonto validate the correctness of the authorization model, using theassert.shscript, which executes the gRPCaserto.directory.reader.v2.Reader.CheckPermissionandaserto.directory.reader.v2.Reader.CheckRelationcalls against the edge directory instance. -
make graphwill create a graphical visualization of thedata/relations.jsondata, using
The following describes the required actions after making changes.
When changing the manifest, redeploy the manifest using:
make manifest
When changing the data, objects.json or relations.json, redeploy the data using
make data
When changing the OPA rego policy in the rego directory, rebuild and publish the policy using:
make build
make push
To reset the setup execute:
make clean
This will remove the edge directory data store and configuration file located in:
$HOME/.config/topaz/cfg/config.yaml
$HOME/.config/topaz/db/directory.db
Shortcut to build (and validate the rego) and test:
make build && make configure-local && sleep .5 && make manifest && make data && make test