Validate
Using the validate command, it is possible to validate the local state for consistency and correctness.
Usage:
permguard validate [flags]
Flags:
-h, --help help for validate
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.
Validate the local state
The permguard validate command allows you to validate the local state for consistency and correctness.
permguard validate
output:
Your workspace has on error in the following file:
- 'platform/platform-policies.cedar'
1: parser error: parse error at <input>:15:5 "n": exact got whe want ;
Please fix the errors to proceed.
Failed to validate the current workspace.
JSON Output
permguard validate --output json
output:
{
"error": "cli: operation on file failed",
"validation_errors": {
"platform/platform-policies.cedar": {
"1": {
"path": "platform/platform-policies.cedar",
"section": "parser error: parse error at <input>:15:5 \"n\": exact got whe want ;"
}
}
}
}