Init
Using the init command, it is possible to initialize a new permguard workspace.
Usage:
permguard init [flags]
Flags:
-h, --help help for init
--language string specify the language of the workspace to initialize
--name string specify the name of the workspace to initialize
--template string specify the template of the workspace to initialize
Global Flags:
-o, --output string output format (default "terminal")
--spiffe-enabled enable native SPIFFE mTLS via Workload API
--spiffe-endpoint string SPIFFE Workload API socket path (defaults to SPIFFE_ENDPOINT_SOCKET env)
--tls-ca-file string path to CA certificate for server verification (PEM)
--tls-cert-file string path to client certificate for mTLS (PEM)
--tls-key-file string path to client private key for mTLS (PEM)
--tls-skip-verify skip server certificate verification (insecure, dev only)
-v, --verbose true for verbose output
-w, --workdir string workdir (default ".")
caution
The output from your current version of Permguard may differ from the example provided on this page.
Initialize a Workspace
The permguard init command initializes a new permguard workspace.
permguard init
output:
Initialized empty permguard ledger in '.'.
Initialize with a Name
permguard init --name myworkspace
Initialize with AuthZ Language and Template
permguard init --language cedar --template default
JSON Output
permguard init --output json
output:
{
"workspace": {
"policy_engine": {
"language": "cedar"
},
"root": "/Users/nicolagallo/source/nitro/permguard-workspace/ledgers/playground-cedar"
}
}