SlideShare a Scribd company logo
The State of Authenticating
RESTful APIs
@rob_winch
Authentication
Naïve approach…
4
https://api.example.com?username=r
ob&password=secret
Naïve approach…
5
https://api.example.com?username=r
ob&password=secret
“ Come on Bender. It's up to you
to make your own decisions in
life. That's what's separates
people and robots from
animals .. and animal robots!
Fry
Futurama
RFC-7231 Sensitive Information
7
“ Authors of services ought to avoid
GET-based forms for the submission
of sensitive data …
- RFC-7231: Section 9.4
Basic Authentication
Basic Authentication
Digest Authentication
Transport Layer Security (TLS)
• Confidentiality
• Integrity
Checking TLS
https://www.ssllabs.com/ssltes
t/
https://shaaaaaaaaaaaaa.com/
https://letsencrypt.org/
https://letsencrypt.org/
TLS Performance
• Computational overhead
• Latency overhead
• Cache
Adam Langley, Google
“On our production frontend machines, SSL/TLS
accounts for less than 1% of the CPU load, less than 10
KB of memory per connection and less than 2% of
network overhead.
https://goo.gl/IYJrqv
Doug Beaver, Facebook
“We have found that modern software-based TLS
implementations running on commodity CPUs are fast
enough to handle heavy HTTPS traffic load without
needing to resort to dedicated cryptographic hardware.
https://goo.gl/pf8Xwh
Jacob Hoffman-Andrews, Twitter
“HTTP keepalives and session resumption mean that
most requests do not require a full handshake, so
handshake operations do not dominate our CPU
usage.
https://goo.gl/Re0ijb
TLS Optimize
• TLS Resumption
• Latency
• Online Certificate Status Protocol (OCSP)
• Cloudflare
2
0
Optimizing TLS
Is TLS Fast Yet.com
21
HTTP Basic over HTTPS?
oclHashcat
Hash Type Speed
MD5 115.840 Bh/s
SHA1 37.336 Bh/s
SHA256 14.416 Bh/s
SHA512 4.976 Bh/s
Ubuntu 14.04, 64 bit
ForceWare 346.29
8x NVidia Titan X
Introduce Session
23
username=winch&name=Rob+Winch
Encrypting the Session
24
Base64(IV,
aes_cbc(k,IV,plainText))
• k – a secret key only known to server
• aes_cbc – encrypts the plainText using AES/CBC with the
provided IV
• plainText – format of username=winch&name=Rob+Winch
Your handwriting is atrocious,
not encrypted
Introduce Session
username=winch&name=Rob+Winch
username=admin&name=Rob+Winch
Can change properly encrypted value below:
To have the following Plaintext
https://goo.gl/2Uio0W
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxM
jM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4
iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZg
eFONFh7HgQ
JWT Encoded
Header
{
"alg": "HS256",
"typ": "JWT”
}
Payload
{
"sub": "1234567890",
"name": "John Doe",
"admin": true
}
HMACSHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
“secret”
)
JWT Signature
2:03 PM - 27 Jul 2015
https://goo.gl/Hs383Z
10:54 AM - 28 May 2015
https://goo.gl/ZbP9Yp
eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiIxMjM
0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iO
nRydWV9.
JWT Encoded
Header
{
"alg": "none",
"typ": "JWT”
}
Payload
{
"sub": "1234567890",
"name": "John Doe",
"admin": true
}
eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiIxMjM
0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iO
nRydWV9. EkN-
DOsnsuRjRO6BxXemmJDm3HbxrbRzXglbN2S…
JWT Encoded
Header
{
"alg": "RS256",
"typ": "JWT”
}
Payload
{
"sub": "1234567890",
"name": "John Doe",
"admin": true
}
RSASHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
Private RSA Key
)
Creating RSASHA256
RSASHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
provided signature,
Public RSA Key
)
Verifying RSASHA256
Header
{
"alg": "HS256",
"typ": "JWT”
}
HMACSHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
RSA Public Key
)
JWT Signature
“… each request from client to server must contain all
of the information necessary to understand the
request, and cannot take advantage of any stored
context on the server.
- Roy Fielding, Architectural Styles and
the Design of Network-based Software Architectures
http://goo.gl/MzVy0V
Roy Fielding
Representational STATE transfer
“… session state can be transferred by the
server to another service such as a database to
maintain a persistent state for a period and
allow authentication
- Wikipedia
http://goo.gl/bd33t7
Summary
• Do NOT place sensitive information in URL
• Use HTTPS everywhere
• Use “cached” credentials
• Security prefers State
@rob_winch
Presentation Available at
https://goo.gl/QTfCCW

More Related Content

What's hot

Vault - Secret and Key Management
Vault - Secret and Key ManagementVault - Secret and Key Management
Vault - Secret and Key ManagementAnthony Ikeda
 
HTTPS Explained Through Fairy Tales
HTTPS Explained Through Fairy TalesHTTPS Explained Through Fairy Tales
HTTPS Explained Through Fairy TalesOVHcloud
 
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultJeff Horwitz
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014bryan_call
 
Nginx - The webserver you might actually like
Nginx - The webserver you might actually likeNginx - The webserver you might actually like
Nginx - The webserver you might actually likeEdorian
 
5 things you didn't know nginx could do
5 things you didn't know nginx could do5 things you didn't know nginx could do
5 things you didn't know nginx could dosarahnovotny
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩smalltown
 
5 things you didn't know nginx could do velocity
5 things you didn't know nginx could do   velocity5 things you didn't know nginx could do   velocity
5 things you didn't know nginx could do velocitysarahnovotny
 
VisualWorks Security Reloaded - STIC 2012
VisualWorks Security Reloaded - STIC 2012VisualWorks Security Reloaded - STIC 2012
VisualWorks Security Reloaded - STIC 2012Martin Kobetic
 
Web前端性能优化 2014
Web前端性能优化 2014Web前端性能优化 2014
Web前端性能优化 2014Yubei Li
 
Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2SergeyChernyshev
 
Hacking NodeJS applications for fun and profit
Hacking NodeJS applications for fun and profitHacking NodeJS applications for fun and profit
Hacking NodeJS applications for fun and profitJose Manuel Ortega Candel
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Deploying NGINX Plus with Ansible
Deploying NGINX Plus with AnsibleDeploying NGINX Plus with Ansible
Deploying NGINX Plus with AnsibleKevin Jones
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJSHüseyin BABAL
 
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINXDockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINXKevin Jones
 
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...Amazon Web Services
 
Nginx - Tips and Tricks.
Nginx - Tips and Tricks.Nginx - Tips and Tricks.
Nginx - Tips and Tricks.Harish S
 

What's hot (20)

Vault - Secret and Key Management
Vault - Secret and Key ManagementVault - Secret and Key Management
Vault - Secret and Key Management
 
HTTPS Explained Through Fairy Tales
HTTPS Explained Through Fairy TalesHTTPS Explained Through Fairy Tales
HTTPS Explained Through Fairy Tales
 
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
 
Nginx - The webserver you might actually like
Nginx - The webserver you might actually likeNginx - The webserver you might actually like
Nginx - The webserver you might actually like
 
5 things you didn't know nginx could do
5 things you didn't know nginx could do5 things you didn't know nginx could do
5 things you didn't know nginx could do
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩
 
5 things you didn't know nginx could do velocity
5 things you didn't know nginx could do   velocity5 things you didn't know nginx could do   velocity
5 things you didn't know nginx could do velocity
 
VisualWorks Security Reloaded - STIC 2012
VisualWorks Security Reloaded - STIC 2012VisualWorks Security Reloaded - STIC 2012
VisualWorks Security Reloaded - STIC 2012
 
Web前端性能优化 2014
Web前端性能优化 2014Web前端性能优化 2014
Web前端性能优化 2014
 
WordPress Performance Tuning
WordPress Performance TuningWordPress Performance Tuning
WordPress Performance Tuning
 
Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2
 
Hacking NodeJS applications for fun and profit
Hacking NodeJS applications for fun and profitHacking NodeJS applications for fun and profit
Hacking NodeJS applications for fun and profit
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Deploying NGINX Plus with Ansible
Deploying NGINX Plus with AnsibleDeploying NGINX Plus with Ansible
Deploying NGINX Plus with Ansible
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Hashicorp Vault ppt
Hashicorp Vault pptHashicorp Vault ppt
Hashicorp Vault ppt
 
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINXDockerCon Live 2020 - Securing Your Containerized Application with NGINX
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
 
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
 
Nginx - Tips and Tricks.
Nginx - Tips and Tricks.Nginx - Tips and Tricks.
Nginx - Tips and Tricks.
 

Viewers also liked

.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 Tikal Knowledge
 
DevOps: Process, Tool or Mindset?
DevOps: Process, Tool or Mindset?DevOps: Process, Tool or Mindset?
DevOps: Process, Tool or Mindset?Tathagat Varma
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousArthur Hicken
 
Getting started with Enterprise Application Integration (EAI) using Enterpris...
Getting started with Enterprise Application Integration (EAI) using Enterpris...Getting started with Enterprise Application Integration (EAI) using Enterpris...
Getting started with Enterprise Application Integration (EAI) using Enterpris...Tamim Khan
 
Micro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factorsMicro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factorsDejan Glozic
 
SQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data ArchitectureSQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data ArchitectureVenu Anuganti
 
Social networking 2012
Social networking 2012Social networking 2012
Social networking 2012jrharshman
 
Bocom report on Alibaba apr 2012
Bocom report on Alibaba apr 2012Bocom report on Alibaba apr 2012
Bocom report on Alibaba apr 2012Soa Ngo
 
Remote Proctor: Software Secure SACSCOC Conference 2013
Remote Proctor: Software Secure SACSCOC Conference 2013Remote Proctor: Software Secure SACSCOC Conference 2013
Remote Proctor: Software Secure SACSCOC Conference 2013Software Secure, Inc.
 
Seo terminology
Seo terminologySeo terminology
Seo terminologydenise2228
 
Nganhang cauhoithi-mangmaytinh-haiphongit dapan.com
Nganhang cauhoithi-mangmaytinh-haiphongit dapan.comNganhang cauhoithi-mangmaytinh-haiphongit dapan.com
Nganhang cauhoithi-mangmaytinh-haiphongit dapan.comLại Văn Đạo
 
iSpot southern Africa- SANBI’s exciting new citizen science initiative
iSpot southern Africa- SANBI’s exciting new citizen science initiativeiSpot southern Africa- SANBI’s exciting new citizen science initiative
iSpot southern Africa- SANBI’s exciting new citizen science initiativeMark Simon
 
Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02
Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02
Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02Carlos Gutierrez
 
USADA: Armstrong - Reasoned decision
USADA: Armstrong - Reasoned decisionUSADA: Armstrong - Reasoned decision
USADA: Armstrong - Reasoned decisionLuxemburger Wort
 

Viewers also liked (18)

.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
DevOps: Process, Tool or Mindset?
DevOps: Process, Tool or Mindset?DevOps: Process, Tool or Mindset?
DevOps: Process, Tool or Mindset?
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuous
 
Getting started with Enterprise Application Integration (EAI) using Enterpris...
Getting started with Enterprise Application Integration (EAI) using Enterpris...Getting started with Enterprise Application Integration (EAI) using Enterpris...
Getting started with Enterprise Application Integration (EAI) using Enterpris...
 
Micro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factorsMicro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factors
 
SQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data ArchitectureSQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data Architecture
 
TOGAF 9 Architectural Artifacts
TOGAF 9  Architectural ArtifactsTOGAF 9  Architectural Artifacts
TOGAF 9 Architectural Artifacts
 
Cách làm bánh Sôcôla Tart, cho mùa thu ấm áp!
Cách làm bánh Sôcôla Tart, cho mùa thu ấm áp!Cách làm bánh Sôcôla Tart, cho mùa thu ấm áp!
Cách làm bánh Sôcôla Tart, cho mùa thu ấm áp!
 
Social networking 2012
Social networking 2012Social networking 2012
Social networking 2012
 
Bocom report on Alibaba apr 2012
Bocom report on Alibaba apr 2012Bocom report on Alibaba apr 2012
Bocom report on Alibaba apr 2012
 
Edinge
EdingeEdinge
Edinge
 
Remote Proctor: Software Secure SACSCOC Conference 2013
Remote Proctor: Software Secure SACSCOC Conference 2013Remote Proctor: Software Secure SACSCOC Conference 2013
Remote Proctor: Software Secure SACSCOC Conference 2013
 
Seo terminology
Seo terminologySeo terminology
Seo terminology
 
Nganhang cauhoithi-mangmaytinh-haiphongit dapan.com
Nganhang cauhoithi-mangmaytinh-haiphongit dapan.comNganhang cauhoithi-mangmaytinh-haiphongit dapan.com
Nganhang cauhoithi-mangmaytinh-haiphongit dapan.com
 
Internet Marketing 20150211
Internet Marketing 20150211Internet Marketing 20150211
Internet Marketing 20150211
 
iSpot southern Africa- SANBI’s exciting new citizen science initiative
iSpot southern Africa- SANBI’s exciting new citizen science initiativeiSpot southern Africa- SANBI’s exciting new citizen science initiative
iSpot southern Africa- SANBI’s exciting new citizen science initiative
 
Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02
Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02
Fundamentosdeelectricidad miltongussowespanhol-130131164241-phpapp02
 
USADA: Armstrong - Reasoned decision
USADA: Armstrong - Reasoned decisionUSADA: Armstrong - Reasoned decision
USADA: Armstrong - Reasoned decision
 

Similar to State of Authenticating RESTful APIs

Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심Amazon Web Services Korea
 
DEF CON 23 - CASSIDY LEVERETT LEE - switches get stitches
DEF CON 23 - CASSIDY LEVERETT LEE - switches get stitchesDEF CON 23 - CASSIDY LEVERETT LEE - switches get stitches
DEF CON 23 - CASSIDY LEVERETT LEE - switches get stitchesFelipe Prado
 
Best Practices of IoT in the Cloud
Best Practices of IoT in the CloudBest Practices of IoT in the Cloud
Best Practices of IoT in the CloudAmazon Web Services
 
RedisConf17 - Operationalizing Redis at Scale
RedisConf17 - Operationalizing Redis at ScaleRedisConf17 - Operationalizing Redis at Scale
RedisConf17 - Operationalizing Redis at ScaleRedis Labs
 
Adding serverless to legacy applications
Adding serverless to legacy applicationsAdding serverless to legacy applications
Adding serverless to legacy applicationsbrettflorio
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...Felipe Prado
 
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudFebruary 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudAmazon Web Services
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudAmazon Web Services
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systemsDEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systemsFelipe Prado
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layerBU
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudAmazon Web Services
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourSoroush Dalili
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsSlawomir Jasek
 
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...Lacework
 
Best Practices of IoT Security in the Cloud
Best Practices of IoT Security in the CloudBest Practices of IoT Security in the Cloud
Best Practices of IoT Security in the CloudAmazon Web Services
 
Aditya - Hacking Client Side Insecurities - ClubHack2008
Aditya - Hacking Client Side Insecurities - ClubHack2008Aditya - Hacking Client Side Insecurities - ClubHack2008
Aditya - Hacking Client Side Insecurities - ClubHack2008ClubHack
 
[CLASS 2014] Palestra Técnica - Jonathan Knudsen
[CLASS 2014] Palestra Técnica - Jonathan Knudsen[CLASS 2014] Palestra Técnica - Jonathan Knudsen
[CLASS 2014] Palestra Técnica - Jonathan KnudsenTI Safe
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Barney Hanlon
 

Similar to State of Authenticating RESTful APIs (20)

Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
 
I See You
I See YouI See You
I See You
 
DEF CON 23 - CASSIDY LEVERETT LEE - switches get stitches
DEF CON 23 - CASSIDY LEVERETT LEE - switches get stitchesDEF CON 23 - CASSIDY LEVERETT LEE - switches get stitches
DEF CON 23 - CASSIDY LEVERETT LEE - switches get stitches
 
Best Practices of IoT in the Cloud
Best Practices of IoT in the CloudBest Practices of IoT in the Cloud
Best Practices of IoT in the Cloud
 
RedisConf17 - Operationalizing Redis at Scale
RedisConf17 - Operationalizing Redis at ScaleRedisConf17 - Operationalizing Redis at Scale
RedisConf17 - Operationalizing Redis at Scale
 
Adding serverless to legacy applications
Adding serverless to legacy applicationsAdding serverless to legacy applications
Adding serverless to legacy applications
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
 
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudFebruary 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the Cloud
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systemsDEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layer
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the Cloud
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocols
 
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
 
Best Practices of IoT Security in the Cloud
Best Practices of IoT Security in the CloudBest Practices of IoT Security in the Cloud
Best Practices of IoT Security in the Cloud
 
Aditya - Hacking Client Side Insecurities - ClubHack2008
Aditya - Hacking Client Side Insecurities - ClubHack2008Aditya - Hacking Client Side Insecurities - ClubHack2008
Aditya - Hacking Client Side Insecurities - ClubHack2008
 
[CLASS 2014] Palestra Técnica - Jonathan Knudsen
[CLASS 2014] Palestra Técnica - Jonathan Knudsen[CLASS 2014] Palestra Técnica - Jonathan Knudsen
[CLASS 2014] Palestra Técnica - Jonathan Knudsen
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
 
Jwt Security
Jwt SecurityJwt Security
Jwt Security
 

Recently uploaded

ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»QADay
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform EngineeringJemma Hussein Allen
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 

Recently uploaded (20)

ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 

State of Authenticating RESTful APIs

Editor's Notes

  1. Open command prompt for hashcat & type hc -a 0 -m 1420 passwords-A0.M1420.hash hashkiller-dict.txt Who here is using REST? Who here is looking for ideas on how to best perform Authentication? Who here already knows all the answers and wants to give this talk for me?
  2. First I certainly don’t have all the answers. But as a person interested in security, I will be telling you what you need to hear not what you want to hear. I am fairly certain some of the things I say in this talk will be difficult to swallow at first. So if I say something that gives you the urge to throw me off the stage, I want you to try and put things in perspective. I want you to take a step back and think for yourself. Don’t blindly trust your pre conceived notions. Don’t blindly trust anyone…except me https://www.flickr.com/photos/jurvetson/1118807/ 4 minutes
  3. Describes the who, Username/password, secure (secure random generated it, plenty of entropy, rotate password regularly), passwords are great right?, but best way we have, can layer additional layers multi factor Describes session, secure random generated, long, finite lifetime Web App good to use cookie – defense in depth Outside of the browser
  4. Other than the password being too difficult to guess, can anyone tell me what is wrong with this? Sensitive information should not be included in a URL…even over SSL Leaked in browser history, referrer URL What about other sensitive information? Put it into perspective Reminds me of… Does anyone watch (or use to watch) Futurama? Fry – If someone programmed you to jump off a bridge, would you do it? Bender – I’ll have to check my program. Yep!
  5. Other than the password being too difficult to guess, can anyone tell me what is wrong with this? Sensitive information should not be included in a URL…even over SSL Leaked in browser history, referrer URL What about other sensitive information? Put it into perspective Reminds me of… Does anyone watch (or use to watch) Futurama? Fry – If someone programmed you to jump off a bridge, would you do it? Bender – I’ll have to check my program. Yep!
  6. Think for yourself You are thinking great, this guy is telling me to take advice from a one of the “brightest” cartoon characters on TV.
  7. because that data will be placed in the request-target. Many existing servers, proxies, and user agents log or display the request-target in places where it might be visible to third parties. Such services ought to use POST-based form submission instead. Browser Cache, Proxies, Server Logs http://tools.ietf.org/html/rfc7231#section-9.4 9min
  8. Password not transmitted, nonce means header never repeated (replay attacks) MD5 broken, Certifications (FIPS), prevents proper password storage, MitM attacks +4 min = 13min
  9. Confidentiality, Integrity JavaScript need SSL? CSS need SSL? Images need SSL? Static HTML pages? CDN, router MiTM (using CSRF) Comcast injects ads +10 = 23 min
  10. Heartbleed - http://heartbleed.com/ Gotofail – fail was not in a conditional statement, https://www.imperialviolet.org/2014/02/22/applebug.html CRIME (Compression Ratio Info-leak Made Easy) http://en.wikipedia.org/wiki/CRIME BEAST - Browser Exploit Against SSL/TLS POODLE (Padding oracle on downloaded legacy encryption; SSL3)- http://en.wikipedia.org/wiki/POODLE
  11. People say its too expensive or difficult to manage keys
  12. https://istlsfastyet.com/ https://www.youtube.com/watch?v=0EB7zh_7UE4 Asymmetric O(1 ms) / handshake Symmetric – easily saturate your NIC (so crypto not bottleneck) 100mbps+ per core w/ sha256 and 1024 byte blocks Find out: $ openssl speed sha $openssl speed ecdh
  13. https://www.imperialviolet.org/2010/06/25/overclocking-ssl.html
  14. http://lists.w3.org/Archives/Public/ietf-http-wg/2012JulSep/0251.html
  15. https://blog.twitter.com/2013/forward-secrecy-at-twitter-0
  16. TLS Resumption eliminates asymmetric crypto by reusing params, no handshake so 1 – RTT (Round Trip Time) connection Session identifiers (server side state, session tickets) Latency Use a CDN (terminate closer to the client) TLS False Start OCSP – DNS lookup, TCP connect, wait for server response, OCSP stapling (include OCSP response and includes w/ certificate, signed by CA so can trust) Cloudflare can add one click SSL, new Keyless SSL
  17. +7min = 30 min
  18. Plaintext, MD5, SHA, Salt Hashcat sample (25M+ passwords) - Actually quite slow….(show numbers) Ocl (Open Computing Language – library for parallel computing of modern processors) Crypto Hash (fast & intended for IP-sec…packet by packet basis) vs Password Hash (slow) Adaptive One way function – PBKDF2 (NIST), scrypt, bcrypt; intended to be slow (tune to be .5 seconds), remember hackers use GPUs, limit with Scrypt but that takes lots of RAM (>= 16MB / password verify) Ashley Madison 36M passwords …..4K cracked using 10K top passwords Would take 116,958 years to crack all of them. 156 hashes per second +13 m = 43 min
  19. State is bad! Let’s embed information in a token Encryption not authentication Replay attacks How revoke access if compromised?
  20. State is bad! Let’s embed information in a token + 3min = 46 min
  21. HS256 means using HMAC-SHA256, but… None RSA vs HMAC When decrypting, particular care must be taken not to allow the JWE recipient to be used as an oracle for decrypting messages. https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  22. HS256 means using HMAC-SHA256, but… None RSA vs HMAC When decrypting, particular care must be taken not to allow the JWE recipient to be used as an oracle for decrypting messages. https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  23. SqureEng Cyber Security JOSE – JavaScript Object Signing and Encryption JWT – JSON Web Token JWE – JSON Web Encryption JWS – JSON Web Signature
  24. Founder of Matasano Security
  25. HS256 means using HMAC-SHA256, but… None RSA vs HMAC When decrypting, particular care must be taken not to allow the JWE recipient to be used as an oracle for decrypting messages. https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  26. HS256 means using HMAC-SHA256, but… None RSA vs HMAC When decrypting, particular care must be taken not to allow the JWE recipient to be used as an oracle for decrypting messages. https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  27. HS256 means using HMAC-SHA256, but… None RSA vs HMAC When decrypting, particular care must be taken not to allow the JWE recipient to be used as an oracle for decrypting messages. https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  28. HS256 means using HMAC-SHA256, but… None RSA vs HMAC When decrypting, particular care must be taken not to allow the JWE recipient to be used as an oracle for decrypting messages. https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
  29. + 9 min = 55 min
  30. It won’t scale! HTTP is a stateless protocol layered on top of TCP IP is a stateless protocol that uses Border Gateway Protocol (PGP)
  31. http://en.wikipedia.org/wiki/Representational_state_transfer#Stateless Consider… Person Needs to be stored Place it in a DataStore Doesn’t Perform….cache Too large, lots of writes, etc doesn’t perform think for yourself
  32. Why do sessions have a checkered past?