Settings/Secret Store
Canvas provides you with a key-value secret store that can be accessed from within your protocols. This can be helpful if you are using notification protocols and want to store any keys or tokens for posting data to your own servers (and don’t want those secrets in plaintext in your protocol code). You can also store any other kind of settings or data that would be useful in your protocols.
To view and edit your instance’s protocol secret store, navigate to Settings
> Protocol settings
(/admin/api/protocolsetting/
). This page will list all of the key-value entries in your protocol secret store. To create a new entry, click the grey button in the top right corner that says Add protocol setting
.
Type in the key and value you wish to store and click Save.
Your new setting key should now be in the list on the main page. To access these values from within your protocol, you can simply do self.settings
and you will have the entire dictionary of key-value pairs. For example, if I wanted to access the value for the foo
key that I saved above, I would do self.settings['foo']
or even self.settings.foo