• Aucun résultat trouvé

Offloading security services to the cloud infrastructure

N/A
N/A
Protected

Academic year: 2022

Partager "Offloading security services to the cloud infrastructure"

Copied!
35
0
0

Texte intégral

(1)

Offloading Security Services to the Cloud Infrastructure

Paul Chaignon12, Diane Adjavon23, Kahina Lazri2, Jérôme François1, and Olivier Festor145

1Inria 2Orange Labs 3EURECOM 4Telecom Nancy

5University of Lorraine August 24, 2018

(2)

Cost of Hardware Memory Isolation

Hardware Host VM3

VM1 VM2

(3)

Cost of Hardware Memory Isolation

Hardware DPDK, netmap, XDP, etc.

VM3

VM1 VM2

Many improvements at the host layer

(4)

Offloading Security Services

Security services as a first target for offloads 1. Filters in front of applications

– IDS/IDP – Anti-DDoS – Rate-limiters – ...

2. Encode insights on the application’s expected queries: – Frequency of queries

– Format of queries – ...

3. Sometimes work in coordination with application (e.g., SYN cookies)

(5)

Offloading Security Services

Security services as a first target for offloads 1. Filters in front of applications

– IDS/IDP – Anti-DDoS – Rate-limiters – ...

2. Encode insights on the application’s expected queries: – Frequency of queries

– Format of queries – ...

3. Sometimes work in coordination with application (e.g., SYN cookies)

(6)

Offloading Security Services

Security services as a first target for offloads 1. Filters in front of applications

– IDS/IDP – Anti-DDoS – Rate-limiters – ...

2. Encode insights on the application’s expected queries:

– Frequency of queries – Format of queries – ...

3. Sometimes work in coordination with application (e.g., SYN cookies)

(7)

Offloading Security Services

Security services as a first target for offloads 1. Filters in front of applications

– IDS/IDP – Anti-DDoS – Rate-limiters – ...

2. Encode insights on the application’s expected queries:

– Frequency of queries – Format of queries – ...

3. Sometimes work in coordination with application (e.g., SYN cookies)

(8)

Design

Host

Tenant 1’s domain Tenant 2’s

domain

vSwitch

Agent

SmartNIC

Compiler agent

Cloud API

prog1.c ...progn.c

prog2.c tmplt.c

+ +

host_α

1 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0

(9)

Design: Isolation

Many software solutions available:

– Safe languages (e.g., Rust, Java, Modula-2) – Proof-Carrying Code [OSDI’96]

– Software-Fault Isolation [SOSP’93]

We use the BPF interpreter

– Relies on ahead-of-time verification of programs through static analysis – Tailored for packet processing (limited ISA, limited computational power)

(10)

Design: Isolation

Many software solutions available:

– Safe languages (e.g., Rust, Java, Modula-2) – Proof-Carrying Code [OSDI’96]

– Software-Fault Isolation [SOSP’93]

We use the BPF interpreter

– Relies on ahead-of-time verification of programs through static analysis – Tailored for packet processing (limited ISA, limited computational power)

(11)

Design: CPU Fairness

1. Guarantee each tenant its fair share of the CPU time 2. Work-conserving allocation: not wasting CPU time

(12)

Design: CPU Fairness

Run-to-completion model common across packet processing frameworks – Packets processed by a single thread, on a single core

– Reduces the number of expensive context switches

Preemptive CPU schedulers break this model

Current approach is to dedicate entire cores to programs [Andromeda

@NSDI’18] [NetBricks @OSDI’16] – Inefficient use of resources

– Requires demultiplexing in hardware NIC

(13)

Design: CPU Fairness

Run-to-completion model common across packet processing frameworks – Packets processed by a single thread, on a single core

– Reduces the number of expensive context switches

Preemptive CPU schedulers break this model

Current approach is to dedicate entire cores to programs [Andromeda

@NSDI’18] [NetBricks @OSDI’16]

– Inefficient use of resources

– Requires demultiplexing in hardware NIC

(14)

Design: CPU Fairness

Indirectly limit the CPU consumption by limiting the number of processed packets

(15)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Packet for tenant 1 arrives; costs 12 to process

(16)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Packet for tenant 1 arrives; costs 12 to process

(17)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Packet for tenant 1 arrives; costs 12 to process

(18)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Packet for tenant 1 arrives; we drop it

(19)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Packet for tenant 1 arrives; we drop it

(20)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t

t1: +30 tokens to distribute

(21)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute

(22)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute

t2: +30 tokens to distribute

(23)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute t2: +30 tokens to distribute

(24)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute t2: +30 tokens to distribute

t20: +8 tokens to distribute

(25)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute t2: +30 tokens to distribute t20: +8 tokens to distribute

(26)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute t2: +30 tokens to distribute t20: +8 tokens to distribute

t200: +1 tokens to distribute

(27)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute t2: +30 tokens to distribute t20: +8 tokens to distribute t00: +1 tokens to distribute

(28)

Design: CPU Fairness

Tenant 1 Tenant 2 Tenant 3

Generate new tokens every∆t t1: +30 tokens to distribute t2: +30 tokens to distribute t20: +8 tokens to distribute t200: +1 tokens to distribute

(29)

Design: Accounting for CPU Usage

First timestamp read on packet arrival

Second timestamp read once packet is processed, depending on action:

– Transmitted => Hook on return of transmit function – Sent to tenant domain => Hook after packet handoff – Dropped => Hook on return of free function

(30)

Evaluations: Implementation and Example Offloads

1. TCP proxy

– Answers with SYN cookies using Linux’s algorithm

– 1 hash table lookup + SipHash algorithm + addresses swapping – Retransmits SYNs, drops invalid SYN+ACK, sends to tenant otherwise 2. DNS rate limiter

– Check queried domain + token bucket – Parse DNS query + 2 memory accesses – Drops packet or sends to tenant

(31)

Evaluations: Performance Gain

TCP Proxy DNS Rate-limiter

0.0 2,000.0 4,000.0

Throughput(kpps)

With Offload Without Offload

(32)

Evaluations: Overhead from CPU Accounting Probes

0.0 200.0 400.0 600.0

Throughput(kpps)

Probes disabled Probes enabled

(33)

Evaluations: Overhead from CPU Accounting Probes

0.0 200.0 400.0 600.0

Throughput(kpps)

Probes disabled Probes enabled

0.0 2.0 4.0 6.0

Throughput(req/s)

(34)

Evaluations: Preemptive Scheduler

2 4 6 8 10

0 2 4 6 8

Number of programs

Throughput(Mpps)

Run-to-completion fairness Linux scheduler + cgroups

(35)

Conclusion

Offload security services using BPF for safety New run-to-completion fairness mechanism

Need to trace CPU time for each packet

– But small per-packet cost compared to app. processing Large performance improvement thanks to offload

– But depends on I/O library used

Références

Documents relatifs

2 Schedulability analyses [21] are a priori mechanism for predicting the timing be- haviour of a system.. modelling language, AUTOSAR supports multi-core platforms. However, as

The migration of cloud infrastructure services between IaaS deployments can be facilitated using a model-based round-trip engineering approach combining generation techniques

The T-3 signal used in this study was an electronic pulse; it is possible that a bell emitting the T-3 pattern or a slow whoop could convey a higher degree of perceived urgency and

This prediction is confirmed by the data: as soon as both children use different words to express recurrent communicative intentions, they produce ConvG- and

As children get older (and calculation procedures would become more automatized), we predicted that dRTs would become more positive for addition problems (i.e., an increase in

Herein, we propose a novel approach to predict the energy of the sampling error on the real time traffic volume estimation, based on a spectral analysis in the frequency domain..

Occurrence and AFB1-producing ability of 150 isolates of Aspergillus section Flavi isolated from samples of pre-harvest, stored wheat and its derivatives collected in 2004 and

ﺚﻟﺎﺜﻟا ﻞﺼﻔﻟا : ﺔﯿﻔﯾﺮﻟا ﺔﯿﻤﻨﺘﻟا و ﺔﺣﻼﻔﻟا ﻚﻨﺑ ﺔﻟﺎﺣ ﺔﺳارد – ﺔﻟﺎﻛو 463 – لﻮﻠﺸﺑ ﺔﻟﺎﻛﻮﻟا ( ﺎﻬﻨﻣ و ﺔﻴﺟرﺎﳋا ) كﻮﻨﺒﻟا ﲔﺑ ﺎﻣ تﺎﻴﻠﻤﻋ ( ﺎﻤﻛ مﺎﻋ ﻞﻜﺸﺑ ﺔﻴﻜﻨﺒﻟا