Custom System Packages
A Package is a collection of related policies consisting of Rego rules and helper functions. Each package has its unique name and organizes its policies.
The following Data Sources and packages are added by default when a new Custom System is created:
-
features: A package that allows you to define rich data that a stack can use in its rule implementations.
-
labels: A package that identifies your System and describes its purpose (for example,
production
), contracts (for example,pci-compliant
), lifecycle (for example,release
), and other characteristics. -
monitor: A package that defines the results displayed in the Compliance pane for your System and in the Validate results pane. For more information on package monitor, see Compliance.
-
rules: A package where you write your policies.
-
system.log: A package where you specify the policy to remove any sensitive data before uploading the decision to the
package system.log
. -
test: A package used to write OPA unit tests. Run the unit tests with the Validate button in the Policy Editor.
-
dataset: A Data Source where you can create dynamic or static JSON data for your policies.
The Data Sources and packages provide a starting point for new users. You can delete these resources from your Custom System.
Reserved Packages
Styra DAS reserves a small number of package paths.
-
global
: References all of the Rego code in the Library. -
system
: Reserved by OPA for decision log (system.log) and authorization (system.authz). -
styra
: Reserved for future internal functionality. -
metadata
: Reserved for data about the system as a whole. For example,labels
. -
monitor
: Used for computing compliance violations. -
stock packages for a Custom System
: Stock packages includerules
,test
, andmonitor
.