secrets

Resolve secret references in server/app JSON config before modules use them. Supported value forms: - String prefix: "env:MY_VAR", "file:/run/secrets/db_password" - Object: { "$secret": "env:MY_VAR" } (optional required: false) Server config: gingee.jsonsecrets Engine-internal. App scripts cannot require('secrets') and still cannot read host process.env via the gbox sandbox — the engine resolves refs into that app's in-memory config only.
Description:
  • Resolve secret references in server/app JSON config before modules use them. Supported value forms: - String prefix: "env:MY_VAR", "file:/run/secrets/db_password" - Object: { "$secret": "env:MY_VAR" } (optional required: false) Server config: gingee.jsonsecrets Engine-internal. App scripts cannot require('secrets') and still cannot read host process.env via the gbox sandbox — the engine resolves refs into that app's in-memory config only.

Members

(inner) config :object

Type:
  • object

(inner) logger :object|null

Type:
  • object | null

(inner) projectRoot :string

Type:
  • string

Methods

(inner) initServer(cfg, rootopt, logRefopt)

Description:
  • Initialize secrets subsystem.
Parameters:
Name Type Attributes Description
cfg object | null | undefined gingee.json secrets section
root string <optional>
project root for relative file roots / .env
logRef object <optional>

(inner) isSecretRef(value) → {boolean}

Description:
  • Whether a string looks like an unresolved secret ref (for packaging/tests).
Parameters:
Name Type Description
value *
Returns:
Type
boolean

(inner) resolveDeep(input) → {*}

Description:
  • Deep-clone JSON-like structure and resolve all secret refs. Does not mutate the input.
Parameters:
Name Type Description
input *
Returns:
Type
*

(inner) resolveValue(value) → {*}

Description:
  • Resolve a single config value (literal or secret ref).
Parameters:
Name Type Description
value *
Returns:
Type
*