The tool makes use of Open Policy Agent's Rego Policy language. There are three ways users can obtain the OPA executable:
- Using the provided setup utility
- Using the provided getopa utility
- Manually downloading the OPA executable.
The ScubaGoggles setup utility performs the initial configuration of ScubaGoggles, including downloading OPA if needed. Execute it using the following command:
scubagoggles setup
Note
The ScubaGoggles setup utility only needs to be run once, for the initial installation of ScubaGoggles, but may be run as many times as needed.
It creates a .scubagoggles
directory in your home directory and
populates it with an OPA executable and a config file controlling several default ScubaGoggles parameters.
There are several advanced configuration options for setup that allow users to indicate what values should be used for those defaults;
advanced users may use these options now if desired, but those defaults can be configured at any time.
See Configuring Defaults for more details.
You will only need to download the OPA executable separately if you need a specific version. Otherwise, you may skip this step and continue to Prerequisites.
You may download the OPA executable, to either upgrade the version you
currently have or use a specific version, using the scubagoggles getopa
command:
scubagoggles getopa --help
usage: scubagoggles getopa [-h] [--nocheck] [--force] [--version <OPA-version>] [--opapath <directory>]
Download OPA executable
options:
-h, --help show this help message and exit
--nocheck, -nc Do not check hash code after download
--force, -f Overwrite existing OPA executable
--version <OPA-version>, -v <OPA-version>
Version of OPA to download (default: latest version)
--opapath <directory>, -r <directory>
Directory containing OPA executable (default: location established by setup)
# example
scubagoggles getopa -v v0.60.0
If you have run the ScubaGoggles setup utility,
you may have specified the location of the OPA executable. getopa
will save the OPA executable to this location. Optionally, you may specify an alternate location for the executable, such as a location that is in the PATH environment variable. If you experience issues with ScubaGoggles recognizing your OPA executable, rename the executable to opa
.
- If the above options can not execute for any reason or you would prefer to download OPA manually, go to the Open Policy Agent website
- Check the website for a compatible OPA version (Currently v0.45.0 and above) for ScubaGoggles and select the corresponding version on top left of the website.
- Navigate to the menu on left side of the screen:
Introduction -> Running OPA -> Download OPA
- Follow the instructions for downloading the respective OPA executable for your OS.
- Run
scubagoggles setup --opapath [path to executable]
to configure ScubaGoggles to use the newly downloaded executable as the default OPA location.
Note
For linux and macOS, you must make sure the OPA executable has execute
permission. If you downloaded the OPA executable either during the setup
process or using the getopa
subcommand, the permission has already been set
correctly.
# give the opa executable execute permissions
chmod u+x opa
- Continue to Configuring Defaults
- Return to Documentation Home