Skip to content

Environment Management

Environment

An environment in Osvauld is a virtual collection of credentials aggregated from various folders. This centralized management system ensures that any updates to credentials in their source folders are automatically propagated to the associated environment.

Environments are particularly useful for maintaining consistent credential states across different operational contexts. Each environment is associated with a single CLI user, effectively sharing the environment’s credentials with that user. When credentials are updated within the folders, these changes are also updated for the CLI user.

CLI User

A CLI user is designed for programmatic access via command line. On creation, a CLI user receives a unique initialization string. This string is necessary for setting up the user in the local environment using Osvauld CLI commands.

Terminal window
osvauld init initialization-code;

this will save the private and public keys to .osvauld folder

After initialization, environments associated with the CLI user can be activated and utilized to inject necessary credentials into sessions:

Terminal window
osvauld env env_name script;
eg: osvauld env dev python test.py

This command sets the context to <env_name> and executes the specified <script>, injecting the required credentials directly into the session.

Access Management

Each environment can contain multiple credentials from different folders. The management of which credentials are included and their updates are governed by the associations defined in the following tables:

Through these associations, environments facilitate a dynamic and flexible approach to credential management, ensuring that CLI users always have the latest configuration for their operational needs.

Relevant tables:

The environments table:

  • id: unique id
  • cli_user: associated user
  • name: name of the env

The environment_fields table:

  • field_name: the name given to a particular field_archive
  • field_value: the value encrypted with cli users pub key
  • parent_field_value_id: the ref to parent field value table
  • env_id: ref to env table
  • credential_id: ref to the associated credential