18
Protection des APIs avec F5 Networks et NGINX SIMON Benjamin Consultant Avant-Vente [email protected]

Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

Protection des APIs avec F5 Networks et NGINXSIMON Benjamin Consultant Avant-Vente

[email protected]

Page 2: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F52

Nous vivons dans un monde d’API !

CONFIDENTIAL

Page 3: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F53

Des Méthodes pour interagir:

GET : obtenir

POST : créer

PATCH : mettre à jour

DELETE : supprimer

HTTPS://SWAPI.CO/Exemple d’API REST

SWAPIThe Star Wars API

{"name": "Luke Skywalker","height": "172","mass": "77","hair_color": "blond","skin_color": "fair","eye_color": "blue","birth_year": "19BBY","gender": "male","homeworld": "https://swapi.co/api/planets/1/","films": [

"https://swapi.co/api/films/2/",…

],"species": [

"https://swapi.co/api/species/1/"],"vehicles": [

"https://swapi.co/api/vehicles/14/"https://swapi.co/api/vehicles/30/

],"starships": [

"https://swapi.co/api/starships/12"https://swapi.co/api/starships/22

],"created": "2014-12-09T13:50:51.644000Z","edited": "2014-12-20T21:17:56.891000Z","url": "https://swapi.co/api/people/1/"

}

GET /api/people/1Host: http://swapi.co

{"properties": {

"birth_year": {"description": "The birth year of this

person. BBY (Before the Battle of Yavin) or ABY (After the Battle of Yavin).",

"type": "string"},"homeworld": {

"description": "The url of the planet resource that this person was born on.",

"type": "string"},

…},"type": "object","required": [

"name","height","mass","hair_color",…"created","edited"],

"$schema": "http://json-schema.org/draft-

04/schema","title": "People","description": "A person within the

Star Wars universe"

}

GET /api/people/schemaHost: http://swapi.co

Une documentation

En ligne

Open API/swagger

Une Authentification

Basic

OAuth/Open ID

API key

Ressource Identifiant :id

Donnée au format JSON

Authorization server

Token

{ }

Page 4: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F54

Des API dans les applications modernes (web ou mobiles)

Modern App

{ }

https://object/...

HTML

https://api/...

JSONJSON JSON

Traditional App

Page 5: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F55

Des API dans les applications modernes (micro-services)

Page 6: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F56

De nouveaux services pour l’utilisateur …

Page 7: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F57

… Parfois imposés !

$$$

Page 8: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F58

Pourquoi sécuriser les APIs ?!

CONFIDENTIAL

Page 9: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F59

SE FAIRE HACKER SON COMPTE UBER !

Avril 2019 découvert par

Prise de contrôle de comptes, tous les comptes …

Uber

POST /p3/fleet-manager/\_rpc?rpc=addDriverV2 HTTP/1.1Host: partners.uber.com{“nationalPhoneNumber”:”xxxxxxxxxx”,”countryCode”:”1"}{

“status”:”failure”,”data”: {“code”:1009,”message”:”Driver ‘47d063f8–0xx5e-xxxxx-b01a-xxxx’ not found”}}

#1

#2Merci pour l’Uid du chauffeur !

Page 10: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F510

Avril 2019 découvert par

Prise de contrôle de comptes, tous les comptes …

POST /marketplace/\_rpc?rpc=getConsentScreenDetailsHTTP/1.1…{“language”:”en”,”userUuid”:”xxxx–776–4xxxx1bd-861a-837xxx604ce”}

{“status”:”success”,”data”:{

…”getUser”:{

“uuid”:”cxxxxxc5f7371e”,”firstname”:”Maxxxx”,”lastname”:”XXXX”,…”email”:”[email protected]”,”emailToken”:”xxxxxxxx”,…”token”:”b8038ec4143bb4xxxxxx72d…”lastSelectedPaymentProfileUuid”:”x…”driverInfo”:{

…},

”partnerInfo”:{“address”:”Nxxxxxxx”,”dateOfBirth”:xxxxxx,

”…}

}

#3

#4Tout le profil du chauffeur + Token

UberSE FAIRE HACKER SON COMPTE UBER !

Page 11: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F511

Un accès direct à toutes vos données, et celles de vos utilisateurs

Le Risque Majeur

{ }

Page 12: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F512

API1: Broken Object Level Authorization

API2: Broken Authentication

API3: Excessive Data Exposure

API4: Lack of Resources - Rate Limiting

API5: Broken Function Level Authorization

API6: Mass Assignment

API7: Security Misconfiguration

API8: Injection

API9: Improper Assets Management

API10: Insufficient Logging - Monitoring

API OWASP Top 10 Attack Vectors 2019HTTPS://OWASP.ORG/INDEX.PHP/OWASP_API_SECURITY_PROJECT

Authorization & Authentication

Access Control

Application Security

Visibility and Reporting

Page 13: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F513

Des solutions adaptées …

CONFIDENTIAL

Page 14: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F514

Les 3 Piliers de la Sécurité

API Gateway API ManagementAPI Security

# Contrôle d’accès # Visibilité & administration # Sécurité applicative

Page 15: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F515

Solutions de Bout en Bout

LB

LB

F5BIG-IP et BIG-IQ

Utilisateurs

App App App

NGINX Plus (API GATEWAYS)REST API

NGINX Controller(API Module)

CONFIGURE

SUPERVISE

TUNE

COMBINE CONTROLE CENTRALISE AVEC AGILITE DEVOPS

ON PREM

MULTI-CLOUD

AppDev & DevOpsInfrastructure & Ops

Page 16: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F516

Venez nous voir sur le Stand ABBAKAN – B3

En complément, une Présentation plus détaillée + Demo sur la Protection des APIs :

• Mardi 28 janvier : 11h-12h

• Mercredi 29 janvier : 14h30-15h30

• Jeudi 30 janvier : 16h30-17h30

CONFIDENTIAL

Des questions ?

Page 17: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO

| ©2019 F517

Questions ?!

CONFIDENTIAL

Page 18: Protection des APIs avec F5 Networks et NGINX...3 | ©2019 F5 Des Méthodes pour interagir: GET : obtenir POST : créer PATCH : mettre à jour DELETE : supprimer … HTTPS://SWAPI.CO