Skip to content
Merged
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
7 changes: 5 additions & 2 deletions src/sinks/appsignal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::{
},
BuildError,
},
tls::TlsSettings,
tls::{TlsConfig, TlsSettings},
};

#[derive(Debug, Snafu)]
Expand Down Expand Up @@ -71,6 +71,9 @@ pub struct AppsignalSinkConfig {
#[serde(default)]
request: TowerRequestConfig,

#[configurable(derived)]
tls: Option<TlsConfig>,

#[configurable(derived)]
#[serde(
default,
Expand Down Expand Up @@ -114,7 +117,7 @@ impl SinkConfig for AppsignalSinkConfig {

let buffer = JsonArrayBuffer::new(batch_settings.size);

let tls_settings = TlsSettings::from_options(&None)?;
let tls_settings = TlsSettings::from_options(&self.tls)?;
let client = HttpClient::new(tls_settings, cx.proxy())?;

let sink = BatchedHttpSink::new(
Expand Down
85 changes: 85 additions & 0 deletions website/cue/reference/components/sinks/base/appsignal.cue
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,89 @@ base: components: sinks: appsignal: configuration: {
}
}
}
tls: {
description: "TLS configuration."
required: false
type: object: options: {
alpn_protocols: {
description: """
Sets the list of supported ALPN protocols.

Declare the supported ALPN protocols, which are used during negotiation with peer. They are prioritized in the order
that they are defined.
"""
required: false
type: array: items: type: string: examples: ["h2"]
}
ca_file: {
description: """
Absolute path to an additional CA certificate file.

The certificate must be in the DER or PEM (X.509) format. Additionally, the certificate can be provided as an inline string in PEM format.
"""
required: false
type: string: examples: ["/path/to/certificate_authority.crt"]
}
crt_file: {
description: """
Absolute path to a certificate file used to identify this server.

The certificate must be in DER, PEM (X.509), or PKCS#12 format. Additionally, the certificate can be provided as
an inline string in PEM format.

If this is set, and is not a PKCS#12 archive, `key_file` must also be set.
"""
required: false
type: string: examples: ["/path/to/host_certificate.crt"]
}
key_file: {
description: """
Absolute path to a private key file used to identify this server.

The key must be in DER or PEM (PKCS#8) format. Additionally, the key can be provided as an inline string in PEM format.
"""
required: false
type: string: examples: ["/path/to/host_certificate.key"]
}
key_pass: {
description: """
Passphrase used to unlock the encrypted key file.

This has no effect unless `key_file` is set.
"""
required: false
type: string: examples: ["${KEY_PASS_ENV_VAR}", "PassWord1"]
}
verify_certificate: {
description: """
Enables certificate verification.

If enabled, certificates must not be expired and must be issued by a trusted
issuer. This verification operates in a hierarchical manner, checking that the leaf certificate (the
certificate presented by the client/server) is not only valid, but that the issuer of that certificate is also valid, and
so on until the verification process reaches a root certificate.

Relevant for both incoming and outgoing connections.

Do NOT set this to `false` unless you understand the risks of not verifying the validity of certificates.
"""
required: false
type: bool: {}
}
verify_hostname: {
description: """
Enables hostname verification.

If enabled, the hostname used to connect to the remote host must be present in the TLS certificate presented by
the remote host, either as the Common Name or as an entry in the Subject Alternative Name extension.

Only relevant for outgoing connections.

Do NOT set this to `false` unless you understand the risks of not verifying the remote hostname.
"""
required: false
type: bool: {}
}
}
}
}