new_key (deploy/_secrets.py)

zeenie-ai/OpenCompany · cli/commands/deploy/_secrets.py · python · MIT
infra

Secret + environment generation for ``company deploy``. Generates the cryptographic keys + owner password the login gate needs, and assembles the full env-var map (``app_env``) that Terraform renders into the VM's brand-specific systemd ``EnvironmentFile``. The map carries only t

# Source: https://github.com/zeenie-ai/OpenCompany | License: MIT | Copyright 2025 MachinaOs
# Provided via justclaw.it.com; keep this notice with the code.
"""Secret + environment generation for ``company deploy``.

Generates the cryptographic keys + owner password the login gate needs, and
assembles the full env-var map (``app_env``) that Terraform renders into the
VM's brand-specific systemd ``EnvironmentFile``. The map
carries only the deployment overrides + secrets; the VM's ``.env`` (copied
from ``.env.template`` by the package build) supplies the rest of the required
settings, and OS env (the EnvironmentFile) wins over ``.env`` in
pydantic-settings.
"""

from __future__ import annotations

import secrets
import string

_PW_ALPHABET = string.ascii_letters + string.digits


def new_ke

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key