Skip to content

Commit

Permalink
feat(amqp): added integration test for TLS (vectordotdev#18813)
Browse files Browse the repository at this point in the history
* feat(sources): enable TLS in AMQP source(sink)
- added integration test for TLS
- new test certs for rabbitmq

Ref: LOG-16435


Signed-off-by: Dmitri Khokhlov <dkhokhlov@gmail.com>

* Remove sleep container

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>

* Await connection at start of tests

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>

* Clippy

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>

* Try a much smaller pause

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>

---------

Signed-off-by: Dmitri Khokhlov <dkhokhlov@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Co-authored-by: Dmitri Khokhlov <dmitri.khokhlov@gmail.com>
  • Loading branch information
StephenWakely and Dmitri Khokhlov authored Oct 13, 2023
1 parent 96ef9ee commit 3c4ae86
Show file tree
Hide file tree
Showing 15 changed files with 326 additions and 7 deletions.
1 change: 1 addition & 0 deletions scripts/integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN rustup run "${RUST_VERSION}" cargo install cargo-nextest --version 0.9.25 --locked

COPY scripts/environment/install-protoc.sh /
COPY tests/data/ca/certs /certs
RUN bash /install-protoc.sh
11 changes: 10 additions & 1 deletion scripts/integration/amqp/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ services:
rabbitmq:
image: docker.io/rabbitmq:${CONFIG_VERSION}
ports:
- 5672:5672
- 5672:5672
- 5671:5671
environment:
- RABBITMQ_SSL_KEYFILE=/code/tests/data/ca/intermediate_server/private/rabbitmq.key.pem
- RABBITMQ_SSL_CERTFILE=/code/tests/data/ca/intermediate_server/certs/rabbitmq.cert.pem
- RABBITMQ_SSL_CACERTFILE=/code/tests/data/ca/intermediate_server/certs/ca-chain.cert.pem
- RABBITMQ_SSL_FAIL_IF_NO_PEER_CERT=false
volumes:
- ${PWD}:/code

24 changes: 24 additions & 0 deletions src/amqp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,30 @@ impl Default for AmqpConfig {
}
}

/// Polls the connection until a connection can be made.
/// Gives up after 5 attempts.
#[cfg(feature = "amqp-integration-tests")]
#[cfg(test)]
pub(crate) async fn await_connection(connection: &AmqpConfig) {
let mut pause = tokio::time::Duration::from_millis(1);
let mut attempts = 0;

loop {
let connection = connection.clone();
if connection.connect().await.is_ok() {
return;
}
attempts += 1;

if attempts == 5 {
return;
}

tokio::time::sleep(pause).await;
pause *= 2;
}
}

impl AmqpConfig {
pub(crate) async fn connect(
&self,
Expand Down
4 changes: 4 additions & 0 deletions src/sinks/amqp/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::*;
use crate::{
amqp::await_connection,
config::{SinkConfig, SinkContext},
shutdown::ShutdownSignal,
template::Template,
Expand Down Expand Up @@ -33,6 +34,7 @@ async fn healthcheck() {

let mut config = make_config();
config.exchange = Template::try_from(exchange.as_str()).unwrap();
await_connection(&config.connection).await;
let (_conn, channel) = config.connection.connect().await.unwrap();
super::config::healthcheck(Arc::new(channel)).await.unwrap();
}
Expand All @@ -57,6 +59,7 @@ async fn amqp_happy_path() {
config.exchange = Template::try_from(exchange.as_str()).unwrap();
let queue = format!("test-{}-queue", random_string(10));

await_connection(&config.connection).await;
let (_conn, channel) = config.connection.connect().await.unwrap();
let exchange_opts = lapin::options::ExchangeDeclareOptions {
auto_delete: true,
Expand Down Expand Up @@ -141,6 +144,7 @@ async fn amqp_round_trip() {
config.exchange = Template::try_from(exchange.as_str()).unwrap();
let queue = format!("test-{}-queue", random_string(10));

await_connection(&config.connection).await;
let (_conn, channel) = config.connection.connect().await.unwrap();
let exchange_opts = lapin::options::ExchangeDeclareOptions {
auto_delete: true,
Expand Down
63 changes: 59 additions & 4 deletions src/sources/amqp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ async fn handle_ack(status: BatchStatus, entry: FinalizerEntry) {
pub mod test {
use lookup::OwnedTargetPath;
use vector_core::schema::Definition;
use vector_core::tls::TlsConfig;
use vrl::value::kind::Collection;

use super::*;
Expand All @@ -510,9 +511,32 @@ pub mod test {
};
let user = std::env::var("AMQP_USER").unwrap_or_else(|_| "guest".to_string());
let pass = std::env::var("AMQP_PASSWORD").unwrap_or_else(|_| "guest".to_string());
let host = std::env::var("AMQP_HOST").unwrap_or_else(|_| "rabbitmq".to_string());
let vhost = std::env::var("AMQP_VHOST").unwrap_or_else(|_| "%2f".to_string());
config.connection.connection_string =
format!("amqp://{}:{}@rabbitmq:5672/{}", user, pass, vhost);
format!("amqp://{}:{}@{}:5672/{}", user, pass, host, vhost);

config
}

pub fn make_tls_config() -> AmqpSourceConfig {
let mut config = AmqpSourceConfig {
queue: "it".to_string(),
..Default::default()
};
let user = std::env::var("AMQP_USER").unwrap_or_else(|_| "guest".to_string());
let pass = std::env::var("AMQP_PASSWORD").unwrap_or_else(|_| "guest".to_string());
let vhost = std::env::var("AMQP_VHOST").unwrap_or_else(|_| "%2f".to_string());
let host = std::env::var("AMQP_HOST").unwrap_or_else(|_| "rabbitmq".to_string());
let ca_file =
std::env::var("AMQP_CA_FILE").unwrap_or_else(|_| "/certs/ca.cert.pem".to_string());
config.connection.connection_string =
format!("amqps://{}:{}@{}/{}", user, pass, host, vhost);
let tls = TlsConfig {
ca_file: Some(ca_file.as_str().into()),
..Default::default()
};
config.connection.tls = Some(tls);
config
}

Expand Down Expand Up @@ -588,6 +612,7 @@ mod integration_test {
use super::test::*;
use super::*;
use crate::{
amqp::await_connection,
shutdown::ShutdownSignal,
test_util::{
components::{run_and_assert_source_compliance, SOURCE_TAGS},
Expand All @@ -604,6 +629,23 @@ mod integration_test {
#[tokio::test]
async fn amqp_source_create_ok() {
let config = make_config();
await_connection(&config.connection).await;
assert!(amqp_source(
&config,
ShutdownSignal::noop(),
SourceSender::new_test().0,
LogNamespace::Legacy,
false,
)
.await
.is_ok());
}

#[tokio::test]
async fn amqp_tls_source_create_ok() {
let config = make_tls_config();
await_connection(&config.connection).await;

assert!(amqp_source(
&config,
ShutdownSignal::noop(),
Expand Down Expand Up @@ -640,17 +682,16 @@ mod integration_test {
.unwrap();
}

#[tokio::test]
async fn amqp_source_consume_event() {
async fn source_consume_event(mut config: AmqpSourceConfig) {
let exchange = format!("test-{}-exchange", random_string(10));
let queue = format!("test-{}-queue", random_string(10));
let routing_key = "my_key";
trace!("Test exchange name: {}.", exchange);
let consumer = format!("test-consumer-{}", random_string(10));

let mut config = make_config();
config.consumer = consumer;
config.queue = queue;

let (_conn, channel) = config.connection.connect().await.unwrap();
let exchange_opts = lapin::options::ExchangeDeclareOptions {
auto_delete: true,
Expand Down Expand Up @@ -718,4 +759,18 @@ mod integration_test {
assert!(log_ts.signed_duration_since(now) < chrono::Duration::seconds(1));
assert_eq!(log["exchange"], exchange.into());
}

#[tokio::test]
async fn amqp_source_consume_event() {
let config = make_config();
await_connection(&config.connection).await;
source_consume_event(config).await;
}

#[tokio::test]
async fn amqp_tls_source_consume_event() {
let config = make_tls_config();
await_connection(&config.connection).await;
source_consume_event(config).await;
}
}
18 changes: 18 additions & 0 deletions tests/data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,24 @@ ca/intermediate_server/certs/postgres.cert.pem: ca/intermediate_server/csr/postg
ca/intermediate_server/certs/postgres-chain.cert.pem: ca/intermediate_server/certs/ca-chain.cert.pem ca/intermediate_server/certs/postgres.cert.pem
cat ca/intermediate_server/certs/postgres.cert.pem ca/intermediate_server/certs/ca-chain.cert.pem > ca/intermediate_server/certs/postgres-chain.cert.pem

ca/intermediate_server/private/rabbitmq.key.pem:
openssl genrsa -out ca/intermediate_server/private/rabbitmq.key.pem 2048

ca/intermediate_server/csr/rabbitmq.csr.pem: ca/intermediate_server/private/rabbitmq.key.pem
openssl req -config ca/intermediate_server/openssl.cnf \
-key ca/intermediate_server/private/rabbitmq.key.pem \
-subj '/CN=rabbitmq/OU=Vector/O=Datadog/ST=New York/L=New York/C=US' \
-new -sha256 -out ca/intermediate_server/csr/rabbitmq.csr.pem

ca/intermediate_server/certs/rabbitmq.cert.pem: ca/intermediate_server/csr/rabbitmq.csr.pem
openssl ca -batch -config ca/intermediate_server/openssl.cnf \
-extensions server_cert -days 3650 -notext -md sha256 \
-in ca/intermediate_server/csr/rabbitmq.csr.pem \
-out ca/intermediate_server/certs/rabbitmq.cert.pem

ca/intermediate_server/certs/rabbitmq-chain.cert.pem: ca/intermediate_server/certs/ca-chain.cert.pem ca/intermediate_server/certs/rabbitmq.cert.pem
cat ca/intermediate_server/certs/rabbitmq.cert.pem ca/intermediate_server/certs/ca-chain.cert.pem > ca/intermediate_server/certs/rabbitmq-chain.cert.pem

ca/intermediate_server/private/kafka.key.pem:
openssl genrsa -out ca/intermediate_server/private/kafka.key.pem 2048

Expand Down
98 changes: 98 additions & 0 deletions tests/data/ca/intermediate_server/certs/rabbitmq-chain.cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
-----BEGIN CERTIFICATE-----
MIIFhTCCA22gAwIBAgICEAcwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCVVMx
ETAPBgNVBAgMCE5ldyBZb3JrMRAwDgYDVQQKDAdEYXRhZG9nMQ8wDQYDVQQLDAZW
ZWN0b3IxJjAkBgNVBAMMHVZlY3RvciBJbnRlcm1lZGlhdGUgU2VydmVyIENBMB4X
DTIzMDQxNTAwMDAzOVoXDTMzMDQxMjAwMDAzOVowaTELMAkGA1UEBhMCVVMxETAP
BgNVBAgMCE5ldyBZb3JrMREwDwYDVQQHDAhOZXcgWW9yazEQMA4GA1UECgwHRGF0
YWRvZzEPMA0GA1UECwwGVmVjdG9yMREwDwYDVQQDDAhyYWJiaXRtcTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMLztNXZwWAo/NxFlt+W2zDPrVOWEJuy
0ZJHmR/V7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QNBC8XLAuBoK9R8luCJpOJWUcFXjLpjcDab4V2hKTuAs+GQyDh/Xx4wF1yHX0r
zIkyN0EkOD/SvD8X4uFaM4mdsAh+ucn4ryUV7i5PgvDM9z4InHAMAee1ebBl0U+h
+NzMWF5c5OwxD5o6/Wh1HopmzJiVNT2v9u0kHT/f
-----END CERTIFICATE-----
32 changes: 32 additions & 0 deletions tests/data/ca/intermediate_server/certs/rabbitmq.cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-----BEGIN CERTIFICATE-----
MIIFhTCCA22gAwIBAgICEAcwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCVVMx
ETAPBgNVBAgMCE5ldyBZb3JrMRAwDgYDVQQKDAdEYXRhZG9nMQ8wDQYDVQQLDAZW
ZWN0b3IxJjAkBgNVBAMMHVZlY3RvciBJbnRlcm1lZGlhdGUgU2VydmVyIENBMB4X
DTIzMDQxNTAwMDAzOVoXDTMzMDQxMjAwMDAzOVowaTELMAkGA1UEBhMCVVMxETAP
BgNVBAgMCE5ldyBZb3JrMREwDwYDVQQHDAhOZXcgWW9yazEQMA4GA1UECgwHRGF0
YWRvZzEPMA0GA1UECwwGVmVjdG9yMREwDwYDVQQDDAhyYWJiaXRtcTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMLztNXZwWAo/NxFlt+W2zDPrVOWEJuy
0ZJHmR/V7INCss3c57Qfd8FtTeQGAY5cLF6iBeLDlDtrpKbsvghmK3jLczMcCRad
SlcPeQ1Pk/brfBNdXWokqKqiQqMOHJ9ogdfrPFhSAn36ZdLVIMp/kDnSonwBnApE
xRcHb8W4tiJnKphZYj8W0M9b+XhGs0oemFQK+tefKkl25W3dTPk2RyzlI90OuUAO
5Xy+5OHYNm8582sycxhySxAn8scw7lTrG692QGRyAd3MRdWfRufVKJQJbkJTOkMH
1phxWnECGq8ibGPIPF9VFvQeZZNHhzjWcLkAz2IZCLhU5rE0iJ+zDtkCAwEAAaOC
ATM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c7tdTEWxLcrXC5XPClSNP8+KkI8RkFPaGdQYzfFB3GkMP8Od
KXkJ7TwIQ7ZGLCx+m3OfhRMIVRvV/vT0RA==
-----END CERTIFICATE-----
17 changes: 17 additions & 0 deletions tests/data/ca/intermediate_server/csr/rabbitmq.csr.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICrjCCAZYCAQAwaTERMA8GA1UEAwwIcmFiYml0bXExDzANBgNVBAsMBlZlY3Rv
cjEQMA4GA1UECgwHRGF0YWRvZzERMA8GA1UECAwITmV3IFlvcmsxETAPBgNVBAcM
CE5ldyBZb3JrMQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAMLztNXZwWAo/NxFlt+W2zDPrVOWEJuy0ZJHmR/V7INCss3c57Qfd8Ft
TeQGAY5cLF6iBeLDlDtrpKbsvghmK3jLczMcCRadSlcPeQ1Pk/brfBNdXWokqKqi
QqMOHJ9ogdfrPFhSAn36ZdLVIMp/kDnSonwBnApExRcHb8W4tiJnKphZYj8W0M9b
+XhGs0oemFQK+tefKkl25W3dTPk2RyzlI90OuUAO5Xy+5OHYNm8582sycxhySxAn
8scw7lTrG692QGRyAd3MRdWfRufVKJQJbkJTOkMH1phxWnECGq8ibGPIPF9VFvQe
ZZNHhzjWcLkAz2IZCLhU5rE0iJ+zDtkCAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4IB
AQCg/BhDbn/JeBsS8s2iOVmNAIGJDMcB3+SE417qqlujhdwFOzMgcH4g5oEYjZQn
IUx9JcHrv/V1iTx7ESuZl53kCzR27F88qecxbmTQf6gQSZfH3IpNOXX+G+8QvP9B
+NdtdF4mdgxxRQ/10MG4q/G6yeK0nkK9RQxrTosW4QNRMU+2mUGEBxsRSjG60muU
OmJBV8qgJEGHym/CxLMtOfdYM/7QWJTLPrNLkW/UWVRhn7U+cCOgW4ujaCA8Gf2v
6b2UaOGXkvLmNeq5/rP2Rpne1YgvIKEmL1bKJ2IshnYMARTJIXj28jHRPg4sisN/
Jp0989bLVSFGmPOVIQqUvqpH
-----END CERTIFICATE REQUEST-----
1 change: 1 addition & 0 deletions tests/data/ca/intermediate_server/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ V 320613194901Z 1003 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/C
V 320613195026Z 1004 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=postgres
V 320613195253Z 1005 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=kafka
V 320731200837Z 1006 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=dufs-https
V 330412000039Z 1007 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=rabbitmq
1 change: 1 addition & 0 deletions tests/data/ca/intermediate_server/index.txt.old
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ V 320613192819Z 1001 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/C
V 320613194901Z 1003 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=influxdb-v1-tls
V 320613195026Z 1004 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=postgres
V 320613195253Z 1005 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=kafka
V 320731200837Z 1006 unknown /C=US/ST=New York/L=New York/O=Datadog/OU=Vector/CN=dufs-https
Loading

0 comments on commit 3c4ae86

Please sign in to comment.