DataSpace
  • DataSpace
  • Platform
    • Overview
    • Workspaces
    • User Roles
    • Transformation
      • Code
      • Preview
      • Logs
      • Plot
      • Ingest
    • Builds
    • Schedules
    • Secrets Store
  • Infrastructure
    • Overview
Powered by GitBook
On this page
  1. Platform

Secrets Store

DataSpace offers the option to store secret tokens in a secure store.

Using secrets from a secret store instead of hardcoding them in your source code offers several advantages:

  • Security: Secrets stored in the source code can be exposed to users with viewer access. The secret store keeps them encrypted and secure.

  • Maintenance: Secrets change over time, such as API tokens or credentials. Updating them in a central secret store is easier than searching through the codebase to update them everywhere they're used.

For example, instead of hardcoding an API token in your script like this:

auth_token = 'Bearer HARDCODED_API_TOKEN'

You can access it securely from the environment:

import os
auth_token = f'Bearer {os.environ['SECRET_TOKEN']}'

During the build, all secrets are injected as environment variables and can be accessed in Python by importing the os module.

Environmental secrets are stored securely and encrypted in the database to ensure sensitive information remains confidential and protected from unauthorized access.

PreviousSchedulesNextOverview

Last updated 19 days ago