Skip to main content

Switchboard Secrets


Dive deeper into the usage of Secrets Server here: Secrets Server Github Repository

What are Secrets?​

Secrets are sensitive information like API keys, passwords, and database credentials. In order to bring these types of information on-chain without leaking the secrets, it is important to store them securely so unauthorized individuals cannot access/tamper with them.

How it works​

Switchboard Secrets

  1. Store your secrets as key-value pairs in the server.
  2. When your Switchboard Function needs to access a secret, it sends a request to the server.
  3. The server verifies the request using SGX-generated "quotes", ensuring only authorized Functions can access secrets.
  4. If authorized, the server encrypts the secret with a key generated by the Function's enclave and returns it.
  5. The secret is decrypted within the Function's secure enclave, ensuring confidentiality.

Benefits to using Switchboard Secrets​

  • Securely store secrets: Keep your secrets outside your Switchboard Functions and only decrypt them within the SGX enclave for confidentiality and security.
  • Easy integration: Easily access your secrets directly from your Switchboard Function with simple SDK calls.
  • Self-hosting option: You can self-host the server for ultimate control and privacy.