Finding
Severity: MINOR
Section: 4
Evidence: src/transport/nats_connection.cpp:83-98 (NatsTlsConfig::validate called from NatsConfig constructor)
Principle: KISS
NatsConfig's default constructor calls tls.validate(), which calls getenv() to read environment variables during object construction. This is called at object construction time, not lazily at connection time, which means the environment is read even when TLS is disabled and no connection is being made.
Part of #504
Finding
Severity: MINOR
Section: 4
Evidence: src/transport/nats_connection.cpp:83-98 (NatsTlsConfig::validate called from NatsConfig constructor)
Principle: KISS
NatsConfig's default constructor calls tls.validate(), which calls getenv() to read environment variables during object construction. This is called at object construction time, not lazily at connection time, which means the environment is read even when TLS is disabled and no connection is being made.
Part of #504