Secrets
Openexus supports a special datatype called a secret
. A property of type secret
is functionally of type text
but its contents cannot easily be revealed. This allows for the storage of unique secure data such as API Tokens and passwords in a secure manner that do not leak to outside users.
Secret Storage
Secrets are stored in the project or page settings of a Stitcher. Secrets that are used by multiple pages should be added to the Project Settings. Secrets used by only a single page should be stored in the Page Settings. In either case Secrets can be found under the RESOURCES section of these settings.
To create a Secret one must provide two things:
- key - A unique (to the project or page) name for this secret. The Secret key is used wherever one needs to refer to the secret.
- value - The value represents the hidden secret itself. This is where one would store the API Token or Password that they want protected.
Using Secrets
When a instance has a property that has a value of secret
one can select which secret key (from the Project Settings or Page Settings) they wish to associate with that property. The Secret is never displayed and cannot be connected to a non-secret property. However, when that secret is used, the secret selected is swapped for its secret value and that is used instead.