Copyright ©2013 Ping Identity Corporation. All rights reserved.1
Confidential
API Security
Bradford Stephens (Ping)
& Tim Anglade (Apigee)
Copyright ©2013 Ping Identity Corporation. All rights reserved.2
Confidential
•  Intros
•  The “Platform Imperative”
•  What does Security Mean?
•  Solutions
•  Wrap-Up
Contents
Copyright ©2013 Ping Identity Corporation. All rights reserved.3
Confidential
•  Hi!
•  Former CEO of VC-Backed database startup, Drawn to
Scale. Built a distributed SQL database, Spire, from
scratch.
•  Does a lot of work in big data, distributed systems, and
APIs.
•  Now running Developer Evangelism + Platforms @ Ping!
Bradford Intro
Copyright ©2013 Ping Identity Corporation. All rights reserved.4
Confidential
•  Hi as well!
•  Built financial infrastructure at NASDAQ, an eCommerce
startup, Invited Expert work at W3C and now APIs &
Mobile Apps
•  Spent a few years focusing heavily on distributed systems
and NOSQL databases — nosqltapes.com and
nosqlsummer.org
•  Now running Developer Programs @ Apigee!
Tim Intro
Copyright ©2013 Ping Identity Corporation. All rights reserved.5
Confidential
Business Software is Changing
CRM
Sales
Analytics
Sharepoint
Website
Transactions
Marketing
Biz Apps
Copyright ©2013 Ping Identity Corporation. All rights reserved.6
Confidential
Business Software is Changing
Biz Apps
Salesforce Box
AWS
Shopify
Omniture
Google
Apps
Copyright ©2013 Ping Identity Corporation. All rights reserved.7
Confidential
Business Software is Changing
Biz Apps
Salesforce Box
AWS
Shopify
Omniture
Google
Apps
API
API
API
API
API
API
API
Copyright ©2013 Ping Identity Corporation. All rights reserved.8
Confidential
The Enterprise Must Open
Understanding the API Economy—the billionaire club
Copyright ©2013 Ping Identity Corporation. All rights reserved.9
Confidential
The Enterprise Must Open
API Growth Rate
•  Open APIs
–  We just hit the 7,000 API mark
–  8,000 by year end
–  16,000 by 2015
•  Dark APIs
–  Dark APIs are 5x+/- Open API growth rate
–  80,000 by 2015
Copyright ©2013 Ping Identity Corporation. All rights reserved.10
Confidential
The Enterprise Must Open
•  Internal apps must be refactored
•  Close collaboration with Partners
•  Explosion of different channels and devices
•  Everything is more social
Copyright ©2013 Ping Identity Corporation. All rights reserved.11
Confidential
What even is security?
What does security mean in this open-default world?
Copyright ©2013 Ping Identity Corporation. All rights reserved.12
Confidential
The never-ending battle
•  Security is a never-ending battle between collaboration and
secrets … to get work done
•  Once we’ve chosen where we fall on the spectrum, how do
you keep security around it?
Copyright ©2013 Ping Identity Corporation. All rights reserved.13
Confidential
Major Concepts
•  Identity
•  Authentication
•  Authorization
•  Encryption
•  Accounting
Copyright ©2013 Ping Identity Corporation. All rights reserved.14
Confidential
Identity
•  Answers “Who are you?”
•  UserIDs, Digital Certificates, ATM Cards
•  A public claim asserting yourself
Copyright ©2013 Ping Identity Corporation. All rights reserved.15
Confidential
Authentication
•  Answers “How can you prove who you are?”
•  Responding to a challenge
•  Private shared secrets, best if known only to user (Private
Key)
Copyright ©2013 Ping Identity Corporation. All rights reserved.16
Confidential
Authorization
•  Answers “What are you allowed to do?”
•  Token/Ticket Mechanism
•  Certain tokens are allowed certain abilities
•  Enforcing the principle of least privilege
Copyright ©2013 Ping Identity Corporation. All rights reserved.17
Confidential
Encryption
•  Answers “How can we keep this secret?”
•  Only authorized parties can understand data
•  Non-symmetric algorithms ‘mask’ data – ‘impossible’ to
reverse engineer
Copyright ©2013 Ping Identity Corporation. All rights reserved.18
Confidential
Accounting
•  Answers “Who did what, when?”
•  Typically use a logging mechanism (Splunk)
•  “Closes the loop” between Authentication and
Authorization
•  Essential in identifying gaps and postmortems
Copyright ©2013 Ping Identity Corporation. All rights reserved.19
Confidential
So what is API Security?
•  A Secure API only allows the right people the right amount of
access to resources and data
•  Has to balance collaboration in an open-by-default world vs.
keeping important secrets
•  Many, many ways to do this
Copyright ©2013 Ping Identity Corporation. All rights reserved.20
Confidential
 
 Identity
 Authentication
 Authorization
 Channel Enc.
 Accounting
Dedicated ATM
  
 X
  
 X
  
802.1X
  
 X
  
 X
  
LDAP
 X
  
  
  
  
ActiveDirectory
 X
  
 X (partial)
  
  
Database Table
 X
  
  
  
  
RADIUS/Diameter
  
 X
 X
  
 X
VPN / IPSec
  
 X
  
 X
  
X.509
 X
 X
  
  
SSL, TLS, DTS
  
  
  
 X
  
Basic/Digest Auth, Login
 X
 X
  
  
  
2-factor
  
 X
  
  
  
Master login
 X
 X
  
  
  
API keys
  
 X
 X (partial)
  
  
OAuth 1.0
  
  
  
  
  
OAuth 1.0a
  
 X (partial)
  
  
OAuth 2.0
  
 X (partial)
  
  
OpenID
  
 X
  
  
  
OpenID Connect
  
 X
  
  
  
SAML
  
 X
 X (partial)
  
  
Shiro or other framework
  
 X
 X
  
  
Splunk or other logging
  
  
  
  
 X
Roll your own
  
  
  
  
  
Recap
Copyright ©2013 Ping Identity Corporation. All rights reserved.21
Confidential
Topology
Database
App Layer
API
User A
App 1
User B
App 2
User C
App 3
Copyright ©2013 Ping Identity Corporation. All rights reserved.22
Confidential
•  Use-cases
–  Internal APIs
–  Partner APIs
–  Public APIs (consumer, open, mobile etc.)
•  Tiers (legs)
–  Server-to-Server (internal, partner)
usually 2-legged authentication
–  End-user (consumer, mobile, open)
usually requires 3-legged authentication
API Types
Copyright ©2013 Ping Identity Corporation. All rights reserved.23
Confidential
Topology
Database
App Layer
API
User A
App 1
User B
App 2
User C
App 3
Copyright ©2013 Ping Identity Corporation. All rights reserved.24
Confidential
•  Malicious Apps
•  Well-intentioned but vulnerable App
•  Well-intentional App with Malicious Users
Common Security Concerns
Copyright ©2013 Ping Identity Corporation. All rights reserved.25
Confidential
Topology
Database
App Layer
API
User A
App 1
User B
App 2
User C
App 3
Copyright ©2013 Ping Identity Corporation. All rights reserved.26
Confidential
•  Two classes
–  Human & Business
–  Technologies
•  Secure APIs use both!
Remedies
Copyright ©2013 Ping Identity Corporation. All rights reserved.27
Confidential
1.  Registration Wall
–  Knowing is half the battle!
–  Identify problematic apps or users
–  Isolate them from other traffic
–  Provide means of communicating with
well-intentioned users
Human & Business Remedies
Copyright ©2013 Ping Identity Corporation. All rights reserved.28
Confidential
2.  Proof
–  Enhance registration by requiring proof the
account was not automatically created (captcha)
or has a legit email address (activation link)
–  Phone Activation
–  Driver’s license, …
Human & Business Remedies
Copyright ©2013 Ping Identity Corporation. All rights reserved.29
Confidential
3.  Traffic Shaping
–  Quotas
–  Throttling
–  Tiered Traffic
–  Dynamic IP Filters
–  Dynamic ISP Filters
–  Up to & including blocking
–  Processes not technologies!
Human & Business Remedies
Copyright ©2013 Ping Identity Corporation. All rights reserved.30
Confidential
4.  Audits & Certifications
–  More useful than you think
–  Checks for dark corners in your organization
–  PCI-DSS and ISO 2700X series
Human & Business Remedies
Copyright ©2013 Ping Identity Corporation. All rights reserved.31
Confidential
•  Which of these should you implement?
•  All of them? (Again, security vs. freedom.)
•  Don’t forget to impose those human &
business rules on internal users!
–  80.123456% of DDoS cases come from inside the
house.
Human & Business Remedies
Copyright ©2013 Ping Identity Corporation. All rights reserved.32
Confidential
•  Identity
•  Authentication
•  Authorization
•  Encryption (Channel Security)
•  Accounting (Auditing)
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.33
Confidential
 
 Identity
 Authentication
 Authorization
 Channel Enc.
 Accounting
Dedicated ATM
  
 X
  
 X
  
802.1X
  
 X
  
 X
  
LDAP
 X
  
 X (definitions)
  
  
ActiveDirectory
 X
  
 X (definitions)
  
  
Database Table
 X
  
  
  
  
RADIUS/Diameter
  
 X
 X
  
 X
VPN / IPSec
  
 X
  
 X
  
X.509
 X
 X
  
  
SSL, TLS, DTS
  
  
  
 X
  
Basic/Digest Auth, Login
 X
 X
  
  
  
2-factor
  
 X
  
  
  
Master login
 X
 X
  
  
  
API keys
  
 X
 X (primitives)
  
  
OAuth 1.0
  
  
  
  
  
OAuth 1.0a
  
 X (primitives)
  
  
OAuth 2.0
  
 X (primitives)
  
  
OpenID
  
 X
  
  
  
OpenID Connect
  
 X
  
  
  
SAML
  
 X
 X (primitives)
  
  
Shiro or other framework
  
 X
 X
  
  
Splunk or other logging
  
  
  
  
 X
Roll your own
  
  
  
  
  
Recap
Copyright ©2013 Ping Identity Corporation. All rights reserved.34
Confidential
1.  Dedicated ATM connection
–  You laugh, but…
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.35
Confidential
2.  Identity Providers
–  LDAP
–  ActiveDirectory (provides authorization as well)
–  User table in your database…
–  Third party: Google, Twitter, etc. — still usually
maps to a user record in your internal tables.
–  Every other combination of solutions will use one
of the first three in this list!
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.36
Confidential
3.  Network Channel Security
–  LAN level: 801.1X
–  Beyond: use VPN/IPSec
–  Both provide machine authentication and point-
to-point channel encryption
–  Both would rely on a RADIUS or Diameter server
for user authentication and authorization
management
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.37
Confidential
4.  Application/HTTP Channel Security
–  SSL, TLS
–  X.509
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.38
Confidential
4.  Authentication
–  Basic/Digest Auth (over SSL)
–  Login form then API key
–  Optional 2-factor (code generator, keyfob, etc.)
–  Plugged to LDAP, or table of API keys or
hardcoded master login (bad).
–  All or nothing keys: like giving every app full
access to your facebook account
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.39
Confidential
4.  Authentication/Authorization with OAuth
–  OAuth fundamentally tries to solve this problem, by
doing authentication but allowing to segment
authorization per app
–  “Valet Key” analogy: the App has access to the
system as you, but cannot do certain things (like
change your password)
–  That valet key is a token, that automatically expires
after a certain time
–  Allows for “3-legged Authentication”, not just API and
App or (API and User), but API, App and User
•  Use for revokes and accounting
–  You still end up doing a regular authentication
somewhere in the middle (Basic auth, login form, etc.)
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.40
Confidential
–  OAuth 1
•  Do not use OAuth 1.0: logically insecure
•  OAuth 1.0a (RFC edition) fixes that, works nicely, in
use at Twitter
•  Signatures are hard (made so you don’t have to rely on
SSL/TLS though)
•  Malicious Apps can be kicked out and all their tokens
revoked
•  Web authentication flow can use keyfobs or other multi-
factor auth systems
•  Very web-centric. The ideal use-case when it was
designed was “allow Twitter to access my Flickr photos”
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.41
Confidential
–  OAuth 2.0
•  Lead author famously walked out, not all bad though!
•  Hard to implement correctly, in a secure manner
•  Lots of grant types
•  Not as interoperable as OAuth 1 — really a framework,
for security, not a protocol anymore
•  Formalizes “scopes” for specific permissions (like “post
to wall”, “see friends”, etc.)
•  Introduces refresh tokens — stay away
•  Introduces compatibility with SAML and JWT — stay
away
•  2 token types: Bearer and MAC
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.42
Confidential
–  OAuth 2.0 Bearer Tokens
•  only ones used in practice
•  as insecure as a Bearer Bond
•  Heavily rely on channel being secure, which is rarely
the case, even over HTTPS
•  No client binding
–  App B could use a token issued for App A to log in as you
to App A
–  Facebook wrote its own extension to deal with that
•  Stay away from refresh tokens, it only serves a very
narrow use-case where two-tier refreshes are
necessary.
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.43
Confidential
5.  Authorization
–  Shiro — a Java framework to enforce
authorization rules in your apps
–  SAML — full XML protocol to handle
authentication and authorization
Technical Remedies!
Copyright ©2013 Ping Identity Corporation. All rights reserved.44
Confidential
 
 Identity
 Authentication
 Authorization
 Channel Enc.
 Accounting
Dedicated ATM
  
 X
  
 X
  
802.1X
  
 X
  
 X
  
LDAP
 X
  
 X (definitions)
  
  
ActiveDirectory
 X
  
 X (definitions)
  
  
Database Table
 X
  
  
  
  
RADIUS/Diameter
  
 X
 X
  
 X
VPN / IPSec
  
 X
  
 X
  
X.509
 X
 X
  
  
SSL, TLS, DTS
  
  
  
 X
  
Basic/Digest Auth, Login
 X
 X
  
  
  
2-factor
  
 X
  
  
  
Master login
 X
 X
  
  
  
API keys
  
 X
 X (primitives)
  
  
OAuth 1.0
  
  
  
  
  
OAuth 1.0a
  
 X (primitives)
  
  
OAuth 2.0
  
 X (primitives)
  
  
OpenID
  
 X
  
  
  
OpenID Connect
  
 X
  
  
  
SAML
  
 X
 X (primitives)
  
  
Shiro or other framework
  
 X
 X
  
  
Splunk or other logging
  
  
  
  
 X
Roll your own
  
  
  
  
  
Recap
Copyright ©2013 Ping Identity Corporation. All rights reserved.45
Confidential
 
 Identity
 Authentication
 Authorization
 Channel Enc.
 Accounting
Dedicated ATM
  
 X
  
 X
  
802.1X
  
 X
  
 X
  
LDAP
 X
  
 X (definitions)
  
  
ActiveDirectory
 X
  
 X (definitions)
  
  
Database Table
 X
  
  
  
  
RADIUS/Diameter
  
 X
 X
  
 X
VPN / IPSec
  
 X
  
 X
  
X.509
 X
 X
  
  
SSL, TLS, DTS
  
  
  
 X
  
Basic/Digest Auth, Login
 X
 X
  
  
  
2-factor
  
 X
  
  
  
Master login
 X
 X
  
  
  
API keys
  
 X
 X (primitives)
  
  
OAuth 1.0
  
  
  
  
  
OAuth 1.0a
  
 X (primitives)
  
  
OAuth 2.0
  
 X (primitives)
  
  
OpenID
  
 X
  
  
  
OpenID Connect
  
 X
  
  
  
SAML
  
 X
 X (primitives)
  
  
Shiro or other framework
  
 X
 X
  
  
Splunk or other logging
  
  
  
  
 X
Roll your own
  
  
  
  
  
Connect 5!
Copyright ©2013 Ping Identity Corporation. All rights reserved.46
Confidential
 
 Identity
 Authentication
 Authorization
 Channel Enc.
 Accounting
Dedicated ATM
  
 X
  
 X
  
802.1X
  
 X
  
 X
  
LDAP
 X
  
 X (definitions)
  
  
ActiveDirectory
 X
  
 X (definitions)
  
  
Database Table
 X
  
  
  
  
RADIUS/Diameter
  
 X
 X
  
 X
VPN / IPSec
  
 X
  
 X
  
X.509
 X
 X
  
  
SSL, TLS, DTS
  
  
  
 X
  
Basic/Digest Auth
 X
 X
  
  
  
2-factor
  
 X
  
  
  
Master login
 X
 X
  
  
  
API keys
  
 X
 X (primitives)
  
  
OAuth 1.0
  
  
  
  
  
OAuth 1.0a
  
 X (primitives)
  
  
OAuth 2.0
  
 X (primitives)
  
  
OpenID
  
 X
  
  
  
OpenID Connect
  
 X
  
  
  
SAML
  
 X
 X (primitives)
  
  
Shiro or other framework
  
 X
 X
  
  
Splunk or other logging
  
  
  
  
 X
Roll your own
  
  
  
  
  
Connect 5!
Copyright ©2013 Ping Identity Corporation. All rights reserved.47
Confidential
•  Use-cases
–  Internal APIs
–  Partner APIs
–  Public APIs (consumer, open, mobile etc.)
•  Tiers (legs)
–  Server-to-Server (internal, partner)
usually 2-legged authentication
–  End-user (consumer, mobile, open)
usually requires 3-legged authentication
API Types (again)
`
Copyright ©2013 Ping Identity Corporation. All rights reserved.48
Confidential
•  Internal, Server-to-Server APIs
–  Use OAuth 2.0 with Bearer Tokens obtained through a Client
Credentials grant (only 2-legged requirement)
–  Alternatives: 802.1X with RADIUS/Diameter, X.509
•  Partner, Server-to-Server APIs
–  Use OAuth 2.0 with Bearer obtained through a Client
Credentials grant (only 2-legged requirement)
–  Alternatives: VPN/IPSec with RADIUS/Diameter, X.509
•  Consumer, Open or End-user Internal/Partner
–  Consumer/Open APIs: use OAuth 2.0 with Bearer Tokens,
using Authentication Code or Implicit Grant flow (better
support for advanced authentication options, less trust on
clients)
•  Mobile APIs
–  use Oauth 2.0 (3-legged requirement) with Bearer Tokens
obtained through a Resource Owner grant or OS integration if
available (better UX)
Recommendations
Copyright ©2013 Ping Identity Corporation. All rights reserved.49
Confidential
•  Security vs. Freedom
•  Devil’s advocate OAuth 1.0a isn’t all bad, and
tons of people implement it for Twitter.
•  How badly do you want to protect this vs. how
badly do you want people to use it?
•  All the way to physically securing the
interface…
In conclusion…
Copyright ©2013 Ping Identity Corporation. All rights reserved.50
Confidential
•  Questions, comments:
bstephens@pingidentify.com
tim.a@apigee.com
Thanks!

More Related Content

PDF
How Secure Are Your APIs?
PPTX
Data-driven API Security
PPTX
apidays LIVE India - 10 steps to secure your API by Pabitra Kumar Sahoo, Qual...
PPTX
Managing Identities in the World of APIs
PDF
Hacker vs AI
PPTX
apidays LIVE New York 2021 - OWASP cautions against “insufficient logging & m...
PPTX
Protect your APIs from Cyber Threats
PDF
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
How Secure Are Your APIs?
Data-driven API Security
apidays LIVE India - 10 steps to secure your API by Pabitra Kumar Sahoo, Qual...
Managing Identities in the World of APIs
Hacker vs AI
apidays LIVE New York 2021 - OWASP cautions against “insufficient logging & m...
Protect your APIs from Cyber Threats
Checkmarx meetup API Security - API Security top 10 - Erez Yalon

What's hot (20)

PPTX
Security as an Enabler for the Digital World - CISO Perspective
PDF
The Dev, Sec and Ops of API Security - API World
PDF
The Dev, Sec and Ops of API Security - NordicAPIs
PDF
OWASP API Security Top 10 - API World
PDF
Applying API Security at Scale
PPTX
API Security and Management Best Practices
PPTX
Layered API Security: What Hackers Don't Want You To Know
PPTX
API Security: Securing Digital Channels and Mobile Apps Against Hacks
PPTX
Building better security for your API platform using Azure API Management
PPTX
APIs: The New Security Layer
PDF
Checkmarx meetup API Security - API Security in depth - Inon Shkedy
PPTX
API Security Lifecycle
PDF
WEBINAR: Positive Security for APIs: What it is and why you need it!
PDF
API Days, Paris, January 2018 - Sharing API Economy Observations: Business dr...
PDF
How Apigee Api Management Platform Helps with Digital Excellence
PDF
WEBINAR: OWASP API Security Top 10
PDF
Protecting Microservices APIs with 42Crunch API Firewall
PPTX
A Tour of Different API Management Architectures
PDF
OWASP API Security Top 10 - Austin DevSecOps Days
PDF
apidays LIVE London 2021 - API Security challenges and solutions by Wadii Tah...
Security as an Enabler for the Digital World - CISO Perspective
The Dev, Sec and Ops of API Security - API World
The Dev, Sec and Ops of API Security - NordicAPIs
OWASP API Security Top 10 - API World
Applying API Security at Scale
API Security and Management Best Practices
Layered API Security: What Hackers Don't Want You To Know
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Building better security for your API platform using Azure API Management
APIs: The New Security Layer
Checkmarx meetup API Security - API Security in depth - Inon Shkedy
API Security Lifecycle
WEBINAR: Positive Security for APIs: What it is and why you need it!
API Days, Paris, January 2018 - Sharing API Economy Observations: Business dr...
How Apigee Api Management Platform Helps with Digital Excellence
WEBINAR: OWASP API Security Top 10
Protecting Microservices APIs with 42Crunch API Firewall
A Tour of Different API Management Architectures
OWASP API Security Top 10 - Austin DevSecOps Days
apidays LIVE London 2021 - API Security challenges and solutions by Wadii Tah...
Ad

Similar to CIS13: APIs, Identity, and Securing the Enterprise (20)

PPTX
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
PDF
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
PPTX
Packt publishing book proposal api and mobile access management
PDF
Ccna sec 01
PDF
Who’s Knocking? Identity for APIs, Web and Mobile
PPTX
Catalyst 2015: Patrick Harding
PDF
CIS14: API Security for the Cloud: Tales from the Trenches
PDF
Designing Secure APIs
PPTX
Ch01 NetSec5e Network Security Essential Chapter 1.pptx
PDF
Security concepts
PPTX
Securing Applications in the Cloud
KEY
Identity soup
PPTX
Connecting The Real World With The Virtual World
PDF
Sscp Systems Security Certified Practitioner Allinone Exam Guide Third Editio...
PDF
APIdays London 2019 - Why the Financial Industry Needs Intelligent API Securi...
PDF
SSCP Systems Security Certified Practitioner All in One Exam Guide Third Edit...
PDF
SSCP Systems Security Certified Practitioner All in One Exam Guide Third Edit...
PPTX
Access Control Models Methodology Practices
PDF
access-control-week-2
PPTX
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
Packt publishing book proposal api and mobile access management
Ccna sec 01
Who’s Knocking? Identity for APIs, Web and Mobile
Catalyst 2015: Patrick Harding
CIS14: API Security for the Cloud: Tales from the Trenches
Designing Secure APIs
Ch01 NetSec5e Network Security Essential Chapter 1.pptx
Security concepts
Securing Applications in the Cloud
Identity soup
Connecting The Real World With The Virtual World
Sscp Systems Security Certified Practitioner Allinone Exam Guide Third Editio...
APIdays London 2019 - Why the Financial Industry Needs Intelligent API Securi...
SSCP Systems Security Certified Practitioner All in One Exam Guide Third Edit...
SSCP Systems Security Certified Practitioner All in One Exam Guide Third Edit...
Access Control Models Methodology Practices
access-control-week-2
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Ad

More from CloudIDSummit (20)

PPTX
CIS 2016 Content Highlights
PPTX
Top 6 Reasons You Should Attend Cloud Identity Summit 2016
PDF
CIS 2015 Security Without Borders: Taming the Cloud and Mobile Frontier - And...
PDF
Mobile security, identity & authentication reasons for optimism 20150607 v2
PDF
CIS 2015 Mobile Security, Identity & Authentication: Reasons for Optimism - R...
PDF
CIS 2015 Virtual Identity: The Vision, Challenges and Experiences in Driving ...
PDF
CIS 2015 Deploying Strong Authentication to a Global Enterprise: A Comedy in ...
PDF
CIS 2015 Without Great Security, Digital Identity is Not Worth the Electrons ...
PDF
CIS 2015 Mergers & Acquisitions in a Cloud Enabled World - Brian Puhl
PDF
CIS 2015 IoT and IDM in your Mobile Enterprise - Brian Katz
PDF
CIS 2015 Practical Deployments Enterprise Cloud Access Management Platform - ...
PDF
CIS 2015 What I Learned From Pitching IAM To My CIO - Steve Tout
PDF
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
PDF
CIS 2015 The IDaaS Dating Game - Sean Deuby
PDF
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
PDF
The Industrial Internet, the Identity of Everything and the Industrial Enterp...
PDF
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
PDF
CIS 2015 Session Management at Scale - Scott Tomilson & Jamshid Khosravian
PDF
CIS 2015 So you want to SSO … Scott Tomilson & John Dasilva
PDF
CIS 2015 Identity Relationship Management in the Internet of Things
CIS 2016 Content Highlights
Top 6 Reasons You Should Attend Cloud Identity Summit 2016
CIS 2015 Security Without Borders: Taming the Cloud and Mobile Frontier - And...
Mobile security, identity & authentication reasons for optimism 20150607 v2
CIS 2015 Mobile Security, Identity & Authentication: Reasons for Optimism - R...
CIS 2015 Virtual Identity: The Vision, Challenges and Experiences in Driving ...
CIS 2015 Deploying Strong Authentication to a Global Enterprise: A Comedy in ...
CIS 2015 Without Great Security, Digital Identity is Not Worth the Electrons ...
CIS 2015 Mergers & Acquisitions in a Cloud Enabled World - Brian Puhl
CIS 2015 IoT and IDM in your Mobile Enterprise - Brian Katz
CIS 2015 Practical Deployments Enterprise Cloud Access Management Platform - ...
CIS 2015 What I Learned From Pitching IAM To My CIO - Steve Tout
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CIS 2015 The IDaaS Dating Game - Sean Deuby
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
The Industrial Internet, the Identity of Everything and the Industrial Enterp...
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
CIS 2015 Session Management at Scale - Scott Tomilson & Jamshid Khosravian
CIS 2015 So you want to SSO … Scott Tomilson & John Dasilva
CIS 2015 Identity Relationship Management in the Internet of Things

Recently uploaded (20)

PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Architecture types and enterprise applications.pdf
PPTX
Microsoft Excel 365/2024 Beginner's training
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
TEXTILE technology diploma scope and career opportunities
NewMind AI Weekly Chronicles – August ’25 Week III
Consumable AI The What, Why & How for Small Teams.pdf
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Basics of Cloud Computing - Cloud Ecosystem
Architecture types and enterprise applications.pdf
Microsoft Excel 365/2024 Beginner's training
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
CloudStack 4.21: First Look Webinar slides
Statistics on Ai - sourced from AIPRM.pdf
The influence of sentiment analysis in enhancing early warning system model f...
Final SEM Unit 1 for mit wpu at pune .pptx
Convolutional neural network based encoder-decoder for efficient real-time ob...
Flame analysis and combustion estimation using large language and vision assi...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
A proposed approach for plagiarism detection in Myanmar Unicode text
Getting started with AI Agents and Multi-Agent Systems
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor

CIS13: APIs, Identity, and Securing the Enterprise

  • 1. Copyright ©2013 Ping Identity Corporation. All rights reserved.1 Confidential API Security Bradford Stephens (Ping) & Tim Anglade (Apigee)
  • 2. Copyright ©2013 Ping Identity Corporation. All rights reserved.2 Confidential •  Intros •  The “Platform Imperative” •  What does Security Mean? •  Solutions •  Wrap-Up Contents
  • 3. Copyright ©2013 Ping Identity Corporation. All rights reserved.3 Confidential •  Hi! •  Former CEO of VC-Backed database startup, Drawn to Scale. Built a distributed SQL database, Spire, from scratch. •  Does a lot of work in big data, distributed systems, and APIs. •  Now running Developer Evangelism + Platforms @ Ping! Bradford Intro
  • 4. Copyright ©2013 Ping Identity Corporation. All rights reserved.4 Confidential •  Hi as well! •  Built financial infrastructure at NASDAQ, an eCommerce startup, Invited Expert work at W3C and now APIs & Mobile Apps •  Spent a few years focusing heavily on distributed systems and NOSQL databases — nosqltapes.com and nosqlsummer.org •  Now running Developer Programs @ Apigee! Tim Intro
  • 5. Copyright ©2013 Ping Identity Corporation. All rights reserved.5 Confidential Business Software is Changing CRM Sales Analytics Sharepoint Website Transactions Marketing Biz Apps
  • 6. Copyright ©2013 Ping Identity Corporation. All rights reserved.6 Confidential Business Software is Changing Biz Apps Salesforce Box AWS Shopify Omniture Google Apps
  • 7. Copyright ©2013 Ping Identity Corporation. All rights reserved.7 Confidential Business Software is Changing Biz Apps Salesforce Box AWS Shopify Omniture Google Apps API API API API API API API
  • 8. Copyright ©2013 Ping Identity Corporation. All rights reserved.8 Confidential The Enterprise Must Open Understanding the API Economy—the billionaire club
  • 9. Copyright ©2013 Ping Identity Corporation. All rights reserved.9 Confidential The Enterprise Must Open API Growth Rate •  Open APIs –  We just hit the 7,000 API mark –  8,000 by year end –  16,000 by 2015 •  Dark APIs –  Dark APIs are 5x+/- Open API growth rate –  80,000 by 2015
  • 10. Copyright ©2013 Ping Identity Corporation. All rights reserved.10 Confidential The Enterprise Must Open •  Internal apps must be refactored •  Close collaboration with Partners •  Explosion of different channels and devices •  Everything is more social
  • 11. Copyright ©2013 Ping Identity Corporation. All rights reserved.11 Confidential What even is security? What does security mean in this open-default world?
  • 12. Copyright ©2013 Ping Identity Corporation. All rights reserved.12 Confidential The never-ending battle •  Security is a never-ending battle between collaboration and secrets … to get work done •  Once we’ve chosen where we fall on the spectrum, how do you keep security around it?
  • 13. Copyright ©2013 Ping Identity Corporation. All rights reserved.13 Confidential Major Concepts •  Identity •  Authentication •  Authorization •  Encryption •  Accounting
  • 14. Copyright ©2013 Ping Identity Corporation. All rights reserved.14 Confidential Identity •  Answers “Who are you?” •  UserIDs, Digital Certificates, ATM Cards •  A public claim asserting yourself
  • 15. Copyright ©2013 Ping Identity Corporation. All rights reserved.15 Confidential Authentication •  Answers “How can you prove who you are?” •  Responding to a challenge •  Private shared secrets, best if known only to user (Private Key)
  • 16. Copyright ©2013 Ping Identity Corporation. All rights reserved.16 Confidential Authorization •  Answers “What are you allowed to do?” •  Token/Ticket Mechanism •  Certain tokens are allowed certain abilities •  Enforcing the principle of least privilege
  • 17. Copyright ©2013 Ping Identity Corporation. All rights reserved.17 Confidential Encryption •  Answers “How can we keep this secret?” •  Only authorized parties can understand data •  Non-symmetric algorithms ‘mask’ data – ‘impossible’ to reverse engineer
  • 18. Copyright ©2013 Ping Identity Corporation. All rights reserved.18 Confidential Accounting •  Answers “Who did what, when?” •  Typically use a logging mechanism (Splunk) •  “Closes the loop” between Authentication and Authorization •  Essential in identifying gaps and postmortems
  • 19. Copyright ©2013 Ping Identity Corporation. All rights reserved.19 Confidential So what is API Security? •  A Secure API only allows the right people the right amount of access to resources and data •  Has to balance collaboration in an open-by-default world vs. keeping important secrets •  Many, many ways to do this
  • 20. Copyright ©2013 Ping Identity Corporation. All rights reserved.20 Confidential   Identity Authentication Authorization Channel Enc. Accounting Dedicated ATM   X   X   802.1X   X   X   LDAP X         ActiveDirectory X   X (partial)     Database Table X         RADIUS/Diameter   X X   X VPN / IPSec   X   X   X.509 X X     SSL, TLS, DTS       X   Basic/Digest Auth, Login X X       2-factor   X       Master login X X       API keys   X X (partial)     OAuth 1.0           OAuth 1.0a   X (partial)     OAuth 2.0   X (partial)     OpenID   X       OpenID Connect   X       SAML   X X (partial)     Shiro or other framework   X X     Splunk or other logging         X Roll your own           Recap
  • 21. Copyright ©2013 Ping Identity Corporation. All rights reserved.21 Confidential Topology Database App Layer API User A App 1 User B App 2 User C App 3
  • 22. Copyright ©2013 Ping Identity Corporation. All rights reserved.22 Confidential •  Use-cases –  Internal APIs –  Partner APIs –  Public APIs (consumer, open, mobile etc.) •  Tiers (legs) –  Server-to-Server (internal, partner) usually 2-legged authentication –  End-user (consumer, mobile, open) usually requires 3-legged authentication API Types
  • 23. Copyright ©2013 Ping Identity Corporation. All rights reserved.23 Confidential Topology Database App Layer API User A App 1 User B App 2 User C App 3
  • 24. Copyright ©2013 Ping Identity Corporation. All rights reserved.24 Confidential •  Malicious Apps •  Well-intentioned but vulnerable App •  Well-intentional App with Malicious Users Common Security Concerns
  • 25. Copyright ©2013 Ping Identity Corporation. All rights reserved.25 Confidential Topology Database App Layer API User A App 1 User B App 2 User C App 3
  • 26. Copyright ©2013 Ping Identity Corporation. All rights reserved.26 Confidential •  Two classes –  Human & Business –  Technologies •  Secure APIs use both! Remedies
  • 27. Copyright ©2013 Ping Identity Corporation. All rights reserved.27 Confidential 1.  Registration Wall –  Knowing is half the battle! –  Identify problematic apps or users –  Isolate them from other traffic –  Provide means of communicating with well-intentioned users Human & Business Remedies
  • 28. Copyright ©2013 Ping Identity Corporation. All rights reserved.28 Confidential 2.  Proof –  Enhance registration by requiring proof the account was not automatically created (captcha) or has a legit email address (activation link) –  Phone Activation –  Driver’s license, … Human & Business Remedies
  • 29. Copyright ©2013 Ping Identity Corporation. All rights reserved.29 Confidential 3.  Traffic Shaping –  Quotas –  Throttling –  Tiered Traffic –  Dynamic IP Filters –  Dynamic ISP Filters –  Up to & including blocking –  Processes not technologies! Human & Business Remedies
  • 30. Copyright ©2013 Ping Identity Corporation. All rights reserved.30 Confidential 4.  Audits & Certifications –  More useful than you think –  Checks for dark corners in your organization –  PCI-DSS and ISO 2700X series Human & Business Remedies
  • 31. Copyright ©2013 Ping Identity Corporation. All rights reserved.31 Confidential •  Which of these should you implement? •  All of them? (Again, security vs. freedom.) •  Don’t forget to impose those human & business rules on internal users! –  80.123456% of DDoS cases come from inside the house. Human & Business Remedies
  • 32. Copyright ©2013 Ping Identity Corporation. All rights reserved.32 Confidential •  Identity •  Authentication •  Authorization •  Encryption (Channel Security) •  Accounting (Auditing) Technical Remedies!
  • 33. Copyright ©2013 Ping Identity Corporation. All rights reserved.33 Confidential   Identity Authentication Authorization Channel Enc. Accounting Dedicated ATM   X   X   802.1X   X   X   LDAP X   X (definitions)     ActiveDirectory X   X (definitions)     Database Table X         RADIUS/Diameter   X X   X VPN / IPSec   X   X   X.509 X X     SSL, TLS, DTS       X   Basic/Digest Auth, Login X X       2-factor   X       Master login X X       API keys   X X (primitives)     OAuth 1.0           OAuth 1.0a   X (primitives)     OAuth 2.0   X (primitives)     OpenID   X       OpenID Connect   X       SAML   X X (primitives)     Shiro or other framework   X X     Splunk or other logging         X Roll your own           Recap
  • 34. Copyright ©2013 Ping Identity Corporation. All rights reserved.34 Confidential 1.  Dedicated ATM connection –  You laugh, but… Technical Remedies!
  • 35. Copyright ©2013 Ping Identity Corporation. All rights reserved.35 Confidential 2.  Identity Providers –  LDAP –  ActiveDirectory (provides authorization as well) –  User table in your database… –  Third party: Google, Twitter, etc. — still usually maps to a user record in your internal tables. –  Every other combination of solutions will use one of the first three in this list! Technical Remedies!
  • 36. Copyright ©2013 Ping Identity Corporation. All rights reserved.36 Confidential 3.  Network Channel Security –  LAN level: 801.1X –  Beyond: use VPN/IPSec –  Both provide machine authentication and point- to-point channel encryption –  Both would rely on a RADIUS or Diameter server for user authentication and authorization management Technical Remedies!
  • 37. Copyright ©2013 Ping Identity Corporation. All rights reserved.37 Confidential 4.  Application/HTTP Channel Security –  SSL, TLS –  X.509 Technical Remedies!
  • 38. Copyright ©2013 Ping Identity Corporation. All rights reserved.38 Confidential 4.  Authentication –  Basic/Digest Auth (over SSL) –  Login form then API key –  Optional 2-factor (code generator, keyfob, etc.) –  Plugged to LDAP, or table of API keys or hardcoded master login (bad). –  All or nothing keys: like giving every app full access to your facebook account Technical Remedies!
  • 39. Copyright ©2013 Ping Identity Corporation. All rights reserved.39 Confidential 4.  Authentication/Authorization with OAuth –  OAuth fundamentally tries to solve this problem, by doing authentication but allowing to segment authorization per app –  “Valet Key” analogy: the App has access to the system as you, but cannot do certain things (like change your password) –  That valet key is a token, that automatically expires after a certain time –  Allows for “3-legged Authentication”, not just API and App or (API and User), but API, App and User •  Use for revokes and accounting –  You still end up doing a regular authentication somewhere in the middle (Basic auth, login form, etc.) Technical Remedies!
  • 40. Copyright ©2013 Ping Identity Corporation. All rights reserved.40 Confidential –  OAuth 1 •  Do not use OAuth 1.0: logically insecure •  OAuth 1.0a (RFC edition) fixes that, works nicely, in use at Twitter •  Signatures are hard (made so you don’t have to rely on SSL/TLS though) •  Malicious Apps can be kicked out and all their tokens revoked •  Web authentication flow can use keyfobs or other multi- factor auth systems •  Very web-centric. The ideal use-case when it was designed was “allow Twitter to access my Flickr photos” Technical Remedies!
  • 41. Copyright ©2013 Ping Identity Corporation. All rights reserved.41 Confidential –  OAuth 2.0 •  Lead author famously walked out, not all bad though! •  Hard to implement correctly, in a secure manner •  Lots of grant types •  Not as interoperable as OAuth 1 — really a framework, for security, not a protocol anymore •  Formalizes “scopes” for specific permissions (like “post to wall”, “see friends”, etc.) •  Introduces refresh tokens — stay away •  Introduces compatibility with SAML and JWT — stay away •  2 token types: Bearer and MAC Technical Remedies!
  • 42. Copyright ©2013 Ping Identity Corporation. All rights reserved.42 Confidential –  OAuth 2.0 Bearer Tokens •  only ones used in practice •  as insecure as a Bearer Bond •  Heavily rely on channel being secure, which is rarely the case, even over HTTPS •  No client binding –  App B could use a token issued for App A to log in as you to App A –  Facebook wrote its own extension to deal with that •  Stay away from refresh tokens, it only serves a very narrow use-case where two-tier refreshes are necessary. Technical Remedies!
  • 43. Copyright ©2013 Ping Identity Corporation. All rights reserved.43 Confidential 5.  Authorization –  Shiro — a Java framework to enforce authorization rules in your apps –  SAML — full XML protocol to handle authentication and authorization Technical Remedies!
  • 44. Copyright ©2013 Ping Identity Corporation. All rights reserved.44 Confidential   Identity Authentication Authorization Channel Enc. Accounting Dedicated ATM   X   X   802.1X   X   X   LDAP X   X (definitions)     ActiveDirectory X   X (definitions)     Database Table X         RADIUS/Diameter   X X   X VPN / IPSec   X   X   X.509 X X     SSL, TLS, DTS       X   Basic/Digest Auth, Login X X       2-factor   X       Master login X X       API keys   X X (primitives)     OAuth 1.0           OAuth 1.0a   X (primitives)     OAuth 2.0   X (primitives)     OpenID   X       OpenID Connect   X       SAML   X X (primitives)     Shiro or other framework   X X     Splunk or other logging         X Roll your own           Recap
  • 45. Copyright ©2013 Ping Identity Corporation. All rights reserved.45 Confidential   Identity Authentication Authorization Channel Enc. Accounting Dedicated ATM   X   X   802.1X   X   X   LDAP X   X (definitions)     ActiveDirectory X   X (definitions)     Database Table X         RADIUS/Diameter   X X   X VPN / IPSec   X   X   X.509 X X     SSL, TLS, DTS       X   Basic/Digest Auth, Login X X       2-factor   X       Master login X X       API keys   X X (primitives)     OAuth 1.0           OAuth 1.0a   X (primitives)     OAuth 2.0   X (primitives)     OpenID   X       OpenID Connect   X       SAML   X X (primitives)     Shiro or other framework   X X     Splunk or other logging         X Roll your own           Connect 5!
  • 46. Copyright ©2013 Ping Identity Corporation. All rights reserved.46 Confidential   Identity Authentication Authorization Channel Enc. Accounting Dedicated ATM   X   X   802.1X   X   X   LDAP X   X (definitions)     ActiveDirectory X   X (definitions)     Database Table X         RADIUS/Diameter   X X   X VPN / IPSec   X   X   X.509 X X     SSL, TLS, DTS       X   Basic/Digest Auth X X       2-factor   X       Master login X X       API keys   X X (primitives)     OAuth 1.0           OAuth 1.0a   X (primitives)     OAuth 2.0   X (primitives)     OpenID   X       OpenID Connect   X       SAML   X X (primitives)     Shiro or other framework   X X     Splunk or other logging         X Roll your own           Connect 5!
  • 47. Copyright ©2013 Ping Identity Corporation. All rights reserved.47 Confidential •  Use-cases –  Internal APIs –  Partner APIs –  Public APIs (consumer, open, mobile etc.) •  Tiers (legs) –  Server-to-Server (internal, partner) usually 2-legged authentication –  End-user (consumer, mobile, open) usually requires 3-legged authentication API Types (again) `
  • 48. Copyright ©2013 Ping Identity Corporation. All rights reserved.48 Confidential •  Internal, Server-to-Server APIs –  Use OAuth 2.0 with Bearer Tokens obtained through a Client Credentials grant (only 2-legged requirement) –  Alternatives: 802.1X with RADIUS/Diameter, X.509 •  Partner, Server-to-Server APIs –  Use OAuth 2.0 with Bearer obtained through a Client Credentials grant (only 2-legged requirement) –  Alternatives: VPN/IPSec with RADIUS/Diameter, X.509 •  Consumer, Open or End-user Internal/Partner –  Consumer/Open APIs: use OAuth 2.0 with Bearer Tokens, using Authentication Code or Implicit Grant flow (better support for advanced authentication options, less trust on clients) •  Mobile APIs –  use Oauth 2.0 (3-legged requirement) with Bearer Tokens obtained through a Resource Owner grant or OS integration if available (better UX) Recommendations
  • 49. Copyright ©2013 Ping Identity Corporation. All rights reserved.49 Confidential •  Security vs. Freedom •  Devil’s advocate OAuth 1.0a isn’t all bad, and tons of people implement it for Twitter. •  How badly do you want to protect this vs. how badly do you want people to use it? •  All the way to physically securing the interface… In conclusion…
  • 50. Copyright ©2013 Ping Identity Corporation. All rights reserved.50 Confidential •  Questions, comments: [email protected] [email protected] Thanks!