Use secrets in your worker

Overview

Secrets are text payloads shared securely between the Arkindex instance and any worker. It is generally used to store sensitive values that may give Arkindex users access to any resources that should be private, for example because they cost money or are proprietary.

For more information about secrets, please visit the Arkindex documentation.

Accessing secrets in the API

Since Arkindex 0.14.2, an API endpoint is available to retrieve secrets called RetrieveSecret. The endpoint cannot be accessed by regular users, but machine learning workers and administrators can use it.

Declaring secrets in workers

Declaring a secret in your worker allows our base worker package to retrieve the secret for you, and causes it to fail when the secret is missing from the Arkindex instance. To learn how to declare secrets in your worker, check out the Arkindex worker configuration documentation.

Accessing secrets in Python code

Parameters typed as secrets will be made available to Worker classes just like the other configuration parameters, via the self.config attribute. This attribute is a Python dict mapping parameter names to their values.