Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally wrap TCP stream in a TLS session in TCP driver #203

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions cli/src/skell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,19 @@ fn get_outputs() -> String {
# driver = "Tcp"
# format = "Raw"

# Tcp driver has the following paramters:
# - addr (required): Hostname or IP Address to send events to
# Tcp driver has the following parameters:
# - host (required): Hostname or IP Address to send events to
# - port (required): Tcp port to send events to
# config = { addr = "localhost", port = 5000 }
# - tls_enabled (optional, defaults to false): wrap the TCP stream in a TLS session.
# Must be set for other tls_ options to take effect
# - tls_certificate_authorities (optional, defaults to undefined): Validate server certificate
# chain against these authorities. You can define multiple files or paths.
# All the certificates will be read and added to the trust store.
# - tls_certificate (optional, defaults to undefined): Path to certificate in PEM format.
# This certificate will be presented to the server.
# - tls_key (optional, defaults to undefined): Path to the private key corresponding to the
# specified certificate (PEM format).
# config = { host = "localhost", port = 5000 }


# Configure a Redis output
Expand Down
11 changes: 9 additions & 2 deletions cli/src/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,14 @@ fn outputs_add_tcp(matches: &ArgMatches) -> Result<TcpConfiguration> {
.ok_or_else(|| anyhow!("Missing TCP port"))?;

info!("Adding TCP output: {}:{}", addr, port);
Ok(TcpConfiguration::new(addr.clone(), *port))
TcpConfiguration::new(
addr.clone(),
*port,
false,
Vec::new(),
None,
None,
)
}

fn outputs_add_redis(matches: &ArgMatches) -> Result<RedisConfiguration> {
Expand Down Expand Up @@ -1101,4 +1108,4 @@ fn check_subscriptions_ro(settings: &Settings) -> Result<()> {

fn deprecated_cli_warn() {
warn!("Using commands to manage subscriptions and there outputs is deprecated and will be removed in future releases. Use subscription configuration files instead.")
}
}
Loading
Loading