Skip to content

Conversation

@anhthii
Copy link
Contributor

@anhthii anhthii commented Aug 31, 2025

Add more flags for mpcium-cli to handle configuration management

Summary

  • Added comprehensive configuration management flags to both mpcium and mpcium-cli binaries
  • Enhanced password handling with file-based options for automation and security
  • Improved TLS configuration flexibility for production deployments

Flag Command Arguments Added

mpcium (Main Node Binary)

  • --config, -c: Path to configuration file (allows custom config location)
  • --password-file, -f: Path to file containing BadgerDB password (secure automation)
  • --age-password-file, -k: Path to file containing password for decrypting .age encrypted node private key

mpcium-cli (Management Tools)

  • --config, -c: Path to configuration file (consistent with main binary)

Purpose of Each Flag

Configuration Management

  • --config: Enables specifying custom configuration files instead of searching default paths (config.yaml, /etc/mpcium/, $HOME/.mpcium/). Critical for multi-environment deployments and containerized setups.

Security & Automation

  • --password-file: Allows BadgerDB password to be loaded from a secure file instead of interactive prompts. Essential for:

    • Automated deployments and CI/CD pipelines
    • Production environments where interactive input isn't available
    • Docker containers and systemd services
    • Secure credential management systems integration
  • --age-password-file: Enables automated decryption of age-encrypted node private keys by loading the passphrase from a file. Supports:

    • Unattended node startup in production
    • Integration with secret management systems
    • Secure key handling in orchestrated environments

Additional Improvements

  • Enhanced TLS certificate path configuration in production environments
  • Improved error handling and memory security (password zeroing)
  • Updated config search paths for better system integration
  • Added make install target for system-wide binary installation

@anhthii anhthii force-pushed the add-more-arguments-to-mpcium-cli branch from 49acc77 to 31e45bf Compare August 31, 2025 15:40
@anhthii anhthii merged commit 31e45bf into master Sep 1, 2025
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants