Search
K

Store credentials for data & applications

Noteable offers Secrets Management to allow teams to securely store and share connection credentials and other sensitive information.

Create secrets

Secrets can be private to an individual or shared with team members and there are multiple ways to create secrets:
Notebook
Resources page
To add a secret from the notebook, use the secrets panel:
  1. 1.
    Open the Secrets panel by clicking on the key icon (
    ) in the left sidebar.
  2. 2.
    Click on the
    sign to launch the Add secret modal.
  3. 3.
    Provide a Name for the secret that meets the following requirements:
    • Secret names must start with a letter or ‘_’.
    • Secret names can only contain alphanumeric characters or underscores.
  4. 4.
    Enter credentials into the Value field.
  5. 5.
    Choose the secret’s Visibility - this cannot be changed later:
    • Private secrets can only be seen, managed, or accessed by the user who created the secret and can be used in any space.
    • Space-level secrets can be seen and managed by all users who have Contributor or Owner access for the space but can only be used in notebooks within the designated space.
  6. 6.
    If the secret is scoped at the space-level, choose the space it should be associated with from the drop-down menu.
  7. 7.
    Click Create.
  8. 8.
    Restart the kernel, if prompted.
To add a secret from the resources page:
  1. 1.
    Click on the Secrets link in the main sidebar. This sidebar is visible from all space or project pages.
  2. 2.
    Click on the +Create a Secret button to launch the Add secret modal.
  3. 3.
    Provide a Name for the secret that meets the following requirements:
    • Secret names must start with a letter or ‘_’.
    • Secret names can only contain alphanumeric characters or underscores.
  4. 4.
    Enter credentials into the Value field.
  5. 5.
    Choose the secret’s Visibility - this cannot be changed later:
    • Private secrets can only be seen, managed, or accessed by the user who created the secret and can be used in any space.
    • Space-level secrets can be seen and managed by all users who have Contributor or Owner access for the space but can only be used in notebooks within the designated space.
  6. 6.
    If the secret is scoped at the space-level, choose the space it should be associated with.
  7. 7.
    Click Create.
  8. 8.
    Restart any running kernels to use this connection.
The secret will now appear in the Secrets panel of the notebook sidebar and in the Secrets management section of the resources page.
Create a secret
If you have a private secret with the same name as a space-level secret, the private secret value will be used

Use secrets

To reference a credential stored in a secret from a Python cell, you must:
  • Load the secret into the kernel:
    • All space-level secrets are loaded when starting any notebook in the space.
    • Private secrets are selectively loaded based on which user starts the kernel and then accessible by all users collaborating on that notebook.
  • Import the OS library.
  • Use ALL CAPS to reference the secret - regardless of the actual case of the secret name.
import os
secret_name = os.environ["SECRET_NAME_IN_UPPERCASE"]
To automatically generate a cell with this code, please open the Secrets panel by clicking on the key icon (
), select a secret, and select Insert Secret from the (
) menu.
Use a secret

Manage secrets

There are multiple ways to manage secrets:
Notebook
Resources page
To manage secrets from the notebook, open the secrets panel by clicking on the key icon (
) in the left sidebar. From this menu, you may:
  • Create new secrets by selecting the
    sign in the menu.
  • View and manage all of your privately scoped secrets.
  • Edit or delete secrets space-level secrets if you have Contributor or Owner access for the space.
To edit or delete a secret, hover over the secret to access the
menu.
To manage secrets from the resources page, Click on the Secrets link in the main sidebar. This sidebar is visible from all space or project pages.
From the resources page, you may:
  • Create new secrets by clicking the +Create a Secret button.
  • View and manage all of your privately scoped secrets.
  • Edit or delete space-level secrets if you have Contributor or Owner access for the space.
To edit or delete a secret, hover over the secret to access the
menu.

Learn more