cloudamqp / lavinmq

Lightweight and fast AMQP (0-9-1) server
https://lavinmq.com
Apache License 2.0
582 stars 33 forks source link

Shovel - Problem with self-signed certificates #741

Closed milokmet closed 1 month ago

milokmet commented 3 months ago

There is a mismatch between the documentation and the latest version of the code regarding to shovel and SSL.

In documentation there is staten that:

URI: connection string to the source and destination clusters. The URI used to connect can be in any of the formats: ... amqps://user:password@server-name?cacertfile=/path/to/cacert.pem&certfile=/path/to/cert.pem&keyfile=/path/to/key.pem&verify=verify_peer ... amqps://server-name?cacertfile=/path/to/cacert.pem&certfile=/path/to/cert.pem&keyfile=/path/to/key.pem&verify=verify_peer&fail_if_no_peer_cert=true&auth_mechanism=external

However, when I specify source or destination URI in showel with cacertfile, I got this error in logs:

shovel[name: "kotlina-meter", vhost: "/"] Invalid parameter: cacertfile
Invalid parameter: cacertfile (ArgumentError)
   from usr/share/crystal/src/array.cr:1111:5 in 'new'
   from usr/src/lavinmq_2.0.0-rc.3/src/lavinmq/shovel/shovel.cr:75:17 in '->'
   from usr/share/crystal/src/fiber.cr:143:11 in 'run'
   from ???

Don't know how to speficy the src or dest URI to accept self signed certificates.

Thanks

carlhoerberg commented 3 months ago

You are right, I'm working on a fix.

spuun commented 1 month ago

Fixed in #45

walro commented 1 month ago

Fixed in #45

Wrong 45, this 45: https://github.com/cloudamqp/amqp-client.cr/pull/45 😄

spuun commented 1 month ago

Fixed in #45

Wrong 45, this 45: cloudamqp/amqp-client.cr#45 😄

🤦