/

Environment Management

Environment isolation

Environments allow you to manage different sets of secrets for development, staging, production, and other contexts.

Accessing Environment Settings

  1. Log in to ByteHide Cloud
  2. Select your Secrets project
  3. Click on the Settings tab
  4. Navigate to the Environments section

Environment Management

Creating Environments

To create a new environment:

  1. Click the Add button
  2. Enter a name for the environment (e.g., "staging")
  3. Optionally connect a repository to this environment
  4. Click Save

Every project starts with a "production" environment by default.

Environment Naming Conventions

Follow these best practices for naming environments:

  • Use lowercase names without spaces
  • Stick to standard names when possible:
    • development (for local development)
    • testing (for automated tests)
    • staging (for pre-production testing)
    • production (for live applications)
  • For feature environments, use a prefix: feature-login, feature-payment

Connecting Repositories

You can link GitHub repositories to specific environments:

  1. In the Environments section, find the environment you want to connect
  2. Click the Connect Repository button Environment Management
  3. Select a repository from the dropdown
  4. Choose a branch Environment Management
  5. Click Select Repository

This enables automatic scanning of the repository for secrets.

For more information about GitHub integration, including how to connect repositories and configure scanning, see our GitHub Integration guide.

Managing Environment-Specific Secrets

Once you have multiple environments set up:

  1. Go to the Keys tab
  2. Add a secret or select an existing one
  3. Enter different values for each environment Environment Management

You can see which environments have values for each secret using the indicators:

  • Green check: Environment has a value
  • Red circle: Environment is missing a value Environment Management

Environment Security

You can configure different security settings per environment:

  1. In the Settings tab, navigate to the Security section
  2. Configure IP restrictions for specific environments
  3. Set up different notification rules

This allows you to have stricter security for production environments.

Environment Variables

When using the Secrets Manager SDK, specify which environment to use:

// Set via environment variable
// BYTEHIDE_SECRETS_ENVIRONMENT=production

// Or when initializing
ManagerSecrets.UnsecureInitialize(
    token: "your-token", 
    environment: "production"
);

Copying Secrets Between Environments

To copy secrets from one environment to another:

  1. Go to the Keys tab
  2. Expand the secret you want to copy
  3. Click on the environment without a value
  4. Click the "Copy from" button
  5. Select the source environment
  6. Click Save

This is useful when promoting configurations from staging to production.

Deleting Environments

To delete an environment:

  1. In the Settings tab, go to the Environments section
  2. Find the environment you want to delete
  3. Click the "delete" icon
  4. Confirm the deletion

Deletion warning

Deleting an environment will delete all secrets stored in that environment. This action cannot be undone.

Environment Dashboard

Each environment has its own dashboard showing:

  1. Connected repositories
  2. Recent detections
  3. Secret coverage (percentage of secrets with values)

Access this by clicking on an environment name in the Environments section.

Best Practices

Environment Consistency

Maintain the same set of secret keys across all environments:

  • If a secret exists in production, it should exist in all environments
  • Use placeholder values for development if needed
  • Document the purpose of each secret

Environment Isolation

Keep environment values completely separate:

  • Never use production credentials in development environments
  • Use different accounts/credentials for each environment
  • Limit access to production environment values

Next Steps

Previous
Viewing Detections