1. Overview
Configuration data model. Declares the complete typed configuration tree and the public functions used to load, save and read daemon configuration files.
The original source path is:
include/bsc/config/Config.hpp
2. Role in the Daemon
This file participates in the privileged BastionGuard Secure Connection daemon. It uses the shared bsc models and follows the daemon-wide fallback strategy: optional high-fidelity backends are used when available, while portable polling or stub behavior preserves service startup.
3. Namespaces
bsc::config
4. Dependencies and Included Interfaces
cstdintstring
5. Declared Types
struct Configstruct ServerTLSOptionsstruct ServerAuthstruct ServerConfigstruct RulesOptionsstruct FwOptionsstruct StatsOptionsstruct InternalOptionsstruct TasksOptions
6. State and Data Members
The interface declares the following relevant state members:
std::string cacertstd::string server_certstd::string server_keystd::string client_certstd::string client_keyServerTLSOptions tlsServerAuth authenticationstd::string source_pathFwOptions fw_optionsServerConfig serverRulesOptions rulesInternalOptions internalStatsOptions statsTasksOptions tasks
7. API and Functions
The file declares or implements the following callable entry points:
Config load_file(const std::string& path)bool save_file(const Config& cfg, const std::string& path)std::string read_file(const std::string& path)
8. Configuration Groups
- ServerConfig and TLS/authentication settings.
- FwOptions for JSON firewall reload, NFQUEUE and monitoring intervals.
- RulesOptions for rule paths and checksum matching.
- InternalOptions, StatsOptions and TasksOptions for runtime limits and scheduling.
- Top-level defaults for unknown connections, duration, process monitor and eBPF object path.
9. External Resources and Protocol Values
Relevant paths, endpoints, command names or policy values referenced by this file include:
unix:///tmp/bsd-daemon.sock/var/log/bastionguard-secure-connectiond.log/etc/bastionguard-secure-connectiond/rules//etc/bastionguard-secure-connectiond/system-fw.json/etc/bastionguard-secure-connectiond/tasks/nftablesallowproc
10. Security Considerations
- The component processes privileged operating-system or network data and should run with only the capabilities required by its backend.
- Configuration and protocol JSON must be considered untrusted until successfully parsed and type-checked.
11. Implementation Considerations
- The file follows the daemon-wide convention of returning status values or optional objects instead of making recoverable conditions fatal.
12. Source Metrics
| Metric | Value |
|---|---|
| File size | 2148 bytes |
| Lines | 71 |
| Detected API entries | 3 |
| Detected types | 9 |
