All Projects → Nepitwin → RabbitSSL

Nepitwin / RabbitSSL

Licence: Apache-2.0 license
Example Java, Spring-Boot and Python RabbitMQ SSL configuration

Programming Languages

java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to RabbitSSL

safeminer
全网第一款本地连接矿池加密软件,隐藏本地ip、加密数据包、流量混淆,可实现防止被监管的目的
Stars: ✭ 8 (-61.9%)
Mutual labels:  tls, ssl
python-mbedtls
Cryptographic library with an mbed TLS back end
Stars: ✭ 64 (+204.76%)
Mutual labels:  tls, ssl
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (+4.76%)
Mutual labels:  tls, ssl
Illustrated Tls
The Illustrated TLS Connection: Every byte explained
Stars: ✭ 2,751 (+13000%)
Mutual labels:  tls, ssl
sslcli
Pretty awesome command-line client for public SSLLabs API
Stars: ✭ 17 (-19.05%)
Mutual labels:  tls, ssl
Openssl
TLS/SSL and crypto library
Stars: ✭ 17,157 (+81600%)
Mutual labels:  tls, ssl
steady-tun
Secure TLS tunnel with pool of prepared upstream connections
Stars: ✭ 37 (+76.19%)
Mutual labels:  tls, ssl
Ssl exporter
Exports Prometheus metrics for SSL certificates
Stars: ✭ 211 (+904.76%)
Mutual labels:  tls, ssl
SimpleSockets
Asynchronous TCP .NET library with reliable transmission and receipt of data, with an ssl implementation.
Stars: ✭ 74 (+252.38%)
Mutual labels:  tls, ssl
cryptonice
CryptoNice is both a command line tool and library which provides the ability to scan and report on the configuration of SSL/TLS for your internet or internal facing web services. Built using the sslyze API and ssl, http-client and dns libraries, cryptonice collects data on a given domain and performs a series of tests to check TLS configuration…
Stars: ✭ 91 (+333.33%)
Mutual labels:  tls, ssl
Snuffy
Snuffy is a simple command line tool to inspect SSL/TLS data.
Stars: ✭ 236 (+1023.81%)
Mutual labels:  tls, ssl
vault-pki-monitor-venafi
Venafi PKI Monitoring Secrets Engine for HashiCorp Vault that enforces security policy and provides certificate visiblity to the enterprise.
Stars: ✭ 18 (-14.29%)
Mutual labels:  tls, ssl
Rustls
A modern TLS library in Rust
Stars: ✭ 3,062 (+14480.95%)
Mutual labels:  tls, ssl
hudsucker
Intercepting HTTP/S proxy
Stars: ✭ 114 (+442.86%)
Mutual labels:  tls, ssl
Sslyze
Fast and powerful SSL/TLS scanning library.
Stars: ✭ 2,623 (+12390.48%)
Mutual labels:  tls, ssl
dheater
D(HE)ater is a proof of concept implementation of the D(HE)at attack (CVE-2002-20001) through which denial-of-service can be performed by enforcing the Diffie-Hellman key exchange.
Stars: ✭ 142 (+576.19%)
Mutual labels:  tls, ssl
Watsontcp
WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
Stars: ✭ 209 (+895.24%)
Mutual labels:  tls, ssl
Terraform Provider Acme Old
ACME (Let's Encrypt) Support for Terraform
Stars: ✭ 211 (+904.76%)
Mutual labels:  tls, ssl
tipi
Tipi - the All-in-one Web Server for Ruby Apps
Stars: ✭ 214 (+919.05%)
Mutual labels:  tls, ssl
Chromium-Gost
Chromium с поддержкой алгоритмов ГОСТ
Stars: ✭ 286 (+1261.9%)
Mutual labels:  tls, ssl

RabbitMQ - SSL Example

SSL-Example for Python and Java Clients from https://www.rabbitmq.com/ssl.html.

Docker - RabbitMQ-Server

Simple use docker-compose to create a docker rabbitmq container with ssl support.

cd Docker
docker-compose up

RabbitMQ-Server Certificates

SSL Certificate Generation

Rabbitmq ssl-tutorial --> https://www.rabbitmq.com/ssl.html

Using tls-gen's tool from michael klishin --> https://github.com/michaelklishin/tls-gen

git clone https://github.com/michaelklishin/tls-gen
cd tls-gen/basic
# private key password
make PASSWORD=bunnies
make verify
make info
ls -l ./result
# Files generated in result folder
--> ca_certificate.pem
--> ca_key.pem
--> client_certificate.pem
--> client_key.p12
--> client_key.pem
--> server_certificate.pem
--> server_key.p12
--> server_key.pem

Create a Java Keystore File

https://docs.cloudera.com/documentation/enterprise/5-10-x/topics/cm_sg_openssl_jks.html

cd result

keytool.exe -importkeystore -srckeystore server_key.p12
  -srcstoretype PKCS12 -srcstorepass bunnies 
  -deststorepass bunnies -destkeypass password 
  -destkeystore server_store.jks

SSL Certificate Setup

Copy /Certificates/testca/cacert.pem, /Certificates/server/key.pem and /Certificates/server/cert.pem to /etc/ssl/rabbit/ to setup certificate example files to establish a RabbitMQ-TLS connection.

cd /etc/ssl/
mkdir rabbit
cd <GIT_Project_PATH>
cp /Certificates/testca/cacert.pem /etc/ssl/rabbit/cacert.pem
cp /Certificates/server/cert.pem /etc/ssl/rabbit/cert.pem
cp /Certificates/server/key.pem /etc/ssl/rabbit/key.pem

SSL-Configuration

Copy this example file for RabbiMQ and restart service.

Old syntax by rabbitmq.config

[
  {rabbit, [
     {ssl_listeners, [5671]},
     {ssl_options, [{cacertfile,"/etc/ssl/rabbit/cacert.pem"},
                    {certfile,"/etc/ssl/rabbit/cert.pem"},
                    {keyfile,"/etc/ssl/rabbit/key.pem"},
                    {verify,verify_peer},
                    {fail_if_no_peer_cert,true}]}
   ]}
].

New syntax by rabbitmq.conf

listeners.tcp = none
listeners.ssl.default = 5671

ssl_options.cacertfile           = /etc/ssl/rabbit/ca_certificate.pem
ssl_options.certfile             = /etc/ssl/rabbit/server_certificate.pem
ssl_options.keyfile              = /etc/ssl/rabbit/server_key.pem
ssl_options.verify               = verify_peer
ssl_options.fail_if_no_peer_cert = true

Execute Examples

Use Java (Gradle) or Python examples to execute examples.

Python

Python client is split up for a consumer (rabitssl_consume.py) and producer (rabitssql_send.py). Producer sends a message to RabbitMQ-Server and consumer receives this message. PIKA is needed to establish connections.

cd Python
python rabitssql_consume.py/rabitssql_send.py

Java

Java client sends and receives message from a single main file. Simple use Gradle to build and run example.

cd Java
gradle run

Spring-Boot-amqp

RabbitMQ-SSL Spring-Boot example can be build and executed to use Gradle. Clients sends by scheduled task every 5 seconds a sample message.

cd Spring
gradle bootRun

License

Copyright 2017-2018 Andreas Sekulski

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].