• No results found

IPSL - PRODIGUER. Messaging Platform Design

N/A
N/A
Protected

Academic year: 2021

Share "IPSL - PRODIGUER. Messaging Platform Design"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

IPSL - PRODIGUER

(2)
(3)
(4)

IPSL User @ Command Line

TGCC

IDRIS

CINES

(5)

Demain

(6)

MQ Cluster

MQ Apps

API

DB’s

IP

S

L

IP

S

L

IPSL User @ Browser | Command Line |

Desktop

json

TGCC

MQ Relay

IDRIS

MQ Relay

CINES

MQ Relay

CNRM

MQ Relay

XXX

MQ Relay msg msg msg msg msg

(7)

Solution = Durable Message Queues

AMQP : Advanced Message Queue

Protocol

RabbitMQ : AMQP Implementation

1. Erlang – i.e. parallel & scalable;

2. Persistence – i.e. durable;

3. Multi-OS – i.e. ubiquitous;

(8)
(9)
(10)
(11)

Message Flow 1: CC.NODE ---> CC.MQ

MQ Relay @ Computing Centre

(amqp + rabbit-mq + shovel)

simul (fortran) liblIGCM(ksh) MQ client (c) args args

Compute Node @ Computing

Centre

msg

(12)

ssl

Message Flow 2: CC.MQ ---> IPSL.MQ

MQ Relay @ Computing Centre

(amqp + rabbit-mq + shovel)

shovel

(ini)

failover ???

(python)

MQ Cluster @ IPSL

(amqps + rabbit-mq + shovel)

shovel

(ini)

msg msg

(13)

Message Flow 3: IPSL.MQ <---> IPSL.MQ-APP

MQ Cluster @ IPSL

(amqps + rabbit-mq + shovel)

tcp/ip (port=5672)

MQ APPS @ IPSL

sim-mon

(python) metrics(python) (python)esg-f es-doc(python)

primary

api

(python) (python)smtp (python)img

secondary

(14)

Message Flow 4: IPSL.MQ-APP ---> Other

MQ APPS @ IPSL

sim-mon

(python) metrics(python) (python)esg-f es-doc(python)

primary

api

(python) (python)smtp (python)img

secondary

DB @ IPSL @ ESG-FAPI API@ SMTP @ IPSL

ES-DOC File Server @ IPSL FE @ brows er tcp/ip https wss smtp ???

(15)

Message Flow 4: IPSL.API ---> IPSL.FE

API @ IPSL

(tornado http & ws server)

sim-mon

(python) metrics(python) (python)xxx

FE @ browser

(jquery, backbone, underscore, bootstrap)

sim-mon

(javascript) metrics(javascript) (javascript)xxx

(16)
(17)

Message Content

(18)

Message Content

(19)
(20)

Security

(21)

Security : Transport Level

AMQPS = encrypted advanced messaging protocolCommunication channel is encrypted via SSL

SSL Certificate Authority = CNRS

Example RabbitMQ server configuration:

[

{rabbit, [

{ssl_listeners, [5671]}, # port number {ssl_options, [

{cacertfile,"/path/to/ca/cacert.pem"}, # certifcate authority .pem file {certfile,"/path/to/server/cert.pem"}, # server certificaye .pem file {keyfile,"/path/to/server/key.pem"}, # server certificate key file {verify,verify_peer}, # requires client to present a certificate

{fail_if_no_peer_cert,false} # validates presented client certificate ]}

]} ].

(22)

Security : Transport Level

Clients pass SSL credentials via connection params:

– ssl = flag indicating whether to enable SSL

handshake

– ssl_options = dictionary of SSL options

● cacertfile : "/path/to/ca/cacert.pem" ● certfile : "/path/to/client/cert.pem" ● keyfile : "/path/to/client/key.pem" ● verify : verify_peer

(23)

Security : Transport Level

SSL TODO

– Obtain CNRS root authority certificate – Create signed server certificates

– Deploy server certificates

– Update Rabbit MQ server config file & restart

– Create signed client certificates (one per client ?) – Deploy client certificates alongside client binaries – Update clients to update AMQP connection strings

(24)

Security

(25)

Security : Authentication

– Authentication = SASL PLAIN

– SASL = Simple Authentication and Security Layer – PLAIN = clear-text username & password

– SASL PLAIN = default for RabbitMQ servers and clients – SASL PLAIN requires SSL to be secure

– Servers are setup with user accounts

– Server authentication is at the MQ exchange level

– Clients pass in credentials via amqps connection string

– Clients should pass base64 encoded SHA-256 encrypted credentials – User must be created in target RabbitMQ server

(26)

Security

(27)

Security : Authorization

– User names map to server permissions defined

against:

● MQ Virtual hosts

● MQ Exchanges

● MQ Queues

– Virtual Host = prodiguer

– Exchanges = in, internal, out

– Queues = logger, main, smon … etc

– Each user account (publisher / consumer) will have to

assigned relevant permissions

– Permissions assigned using either RabbitMQ

(28)
(29)
(30)
(31)

RabbitMQ - Configuration

Environment variables

– rabbitmq-env.config

– RabbitMQ initialises several environment variables – Unlikely they need to be changed

Server Configuration file

– rabbitmq.config

– No need to change general options

– Management options include a json file for

initialising exchanges, queues, virtual hosts, users … etc.

(32)

RabbitMQ - Operations

RabbitMQ management plugin

– rabbitmq-plugins enable rabbitmq_management – front-end

● http://SERVER-NAME:15672/

● Can view connections, channels, exchanges, queues ● Can view, create, update, delete virtual hosts

● Can view, create, update, delete users ● Can enable / disable statistics

– API

● HTTP REST service

● Can perform all tasks supported by front-end ● e.g. create a virtual host

– curl -i -u guest:guest -H "content-type:application/json" \ – -XPUT http://localhost:15672/api/vhosts/foo

– Command Line Interface ● Wraps the API

(33)
(34)

Further Info

AMPQhttp://www.amqp.org/ – http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol  RabbitMQ – Security - SSL ● http://www.rabbitmq.com/ ssl.html ● http://www.rabbitmq.com/troubleshooting- ssl.html – Security – SASL ● http://en.wikipedia.org/wiki/ Simple_Authentication_and_Security_Layer ● http://security.stackexchange.com/questions/15040/standards-for-encrypting- passwords-in-configuration-files

– Security – Access Control

● http://www.rabbitmq.com/access- control.html

– Configuration

References

Related documents