Storing the config from the Vizzly API
This storage option will result in an encrypted config being stored on the Vizzly API. The config is encrypted on your Vizzly Query Engine with a secret that only you will have access to, before being sent to the Vizzly API for storage.
This option is perfect for developing new Vizzly configs quickly. We recommend this approach for local and staging environments, however as the config is instantly live after clicking save, we recommend using a different approach for your live environment.
Generate an encryption key
vizzly encryption-key
Set the environment variable
Now the secret key has been generated, you'll need to make this available to your Vizzly Query Engine through the environment variable VIZZLY_ENCRYPTION_SECRET
.
Project access token
To grant the config manager permission to save the config, we will next generate a project access token and return this in the identity
logic.
The resources that you'll need to set to the project access token are;
{
projectId: 'prj_<< rest of your project id >>',
resources: [{
id: 'cnf_<< rest of your config store id >>',
scope: 'read_write'
}],
// ... other properties
}
You can find your config store ID and project ID on the project details tab of the self-hosted projects page (opens in a new tab).
Be sure to only add this access token for users that you wish to allow control over saving the config!