Skip to content

Read encryption key from environment variable and base64 decode it for CIFS #78

@SimoneBendazzoli93

Description

@SimoneBendazzoli93

Requested Enhancement:

Edit MAIA/maia_admin.py at lines 439-440 to change how the CIFS encryption key is provided:

  • Instead of passing an empty string as the publicKey value, read the encryption key from an environment variable.
  • Base64 decode the environment variable value and pass it as the encryption publicKey in the maia_namespace_values["cifs"] dictionary.

Suggested Implementation:

  • Read the encryption key from an environment variable (e.g., CIFS_ENCRYPTION_KEY).
  • Decode the value using base64.b64decode().
  • Pass the decoded value as publicKey in the config.

Relevant code location:

  • File: MAIA/maia_admin.py
  • Lines: 439-440

Acceptance Criteria:

  • The encryption key should be securely loaded and decoded at runtime for deployment.
  • The value should not be hardcoded or left empty.
  • Implementation must handle cases where the environment variable is missing or invalid (e.g., log an error or fallback appropriately).

Reference: Source file

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions