toc
Cages
Cages are serverless functions hosted on Evervault for processing the data you encrypt with Relay or our SDKs.
Cage.toml Reference
A convenient way to configure your Cages in code.
Overview
The Cage.toml provides a simple way to configure your Cage. Just include a Cage.toml in your deployed Cage, and we'll extract and apply your configuration settings.
Define your Cage configuration in toml with a top level cage
key:
toml[cage]whitelist = ["api.yoursite.com"]timeout = 120handler = "main.myFunc"[cage.playground]username = "Bob"creditCardNumber = "1234 5678 9012 3456"cv2 = 001
Reference
cage.whitelist
Restrict your Cage's network access to specific domains by providing an array of strings.
Default: allow all
toml[cage]whitelist = ["api.yoursite.com"]# Alternatively# cage.whitelist = ["api.yoursite.com"]
cage.timeout
Customize your Cage's timeout by providing a positive integer value. The timeout is specified in seconds.
Default: 30
Maximum: 900
toml[cage]timeout = 60# Alternatively# cage.timeout = 60
cage.handler
Customize your Cage's entry point by specifying the handler in the form <FILE>.<FUNCTION>
.
Default: index.handler
toml[cage]handler = "main.myFunc"# Alternatively# cage.handler = "main.myFunc"
cage.playground
Customize the default playground data for your Cage in the Evervault Dashboard. This data will be used to construct the JSON data shown in the Cage Playground and Cage Guides.
Default: { name: "<YOUR_ACCOUNT_NAME>" }
toml[cage.playground]username = "Bob"creditCardNumber = "1234 5678 9012 3456"cv2 = 001
Default Cage Configuration
The below table outlines the default values used to configure your Cage when it is first created.
Option | Value |
---|---|
Node.js version | 12 |
Timeout | 30 seconds |
Memory | 1024 MB |
Ephemeral storage | 512 MB |