SlideShare a Scribd company logo
1 of 28
Download to read offline
Enterprise Security Patterns for RESTful
Web Services
Francois Lascelles
Technical Director, Europe
Agenda


 Why REST matters to the Enterprise?
 Enterprise security requirements for RESTful web services
 REST security patterns
 Moving beyond point-to-point
Web services in the Enterprise

• Enterprise integration                            • Web background
  (EI) background
                                                    • Web API, SAAS, Cloud
• SOAP, WSDL, UDDI
                                                    • Lightweight
• Sophisticated
  infrastructure available
  today


                    WS-*                            RESTful



                                    service
                             orientation enablers
                             (both styles matter)



                                   3
Today’s Enterprise SOA landscape

                       enterprise SOA
                                             SAAS
  Cloud deployed
  services
                                                           partner


                   enterprise boundary




         • Sensitive data, apps
         • Mission critical
         • ID authority
         • Legacy
                                                    SAAS




                                         4
REST fits the new extended Enterprise SOA


 Today’s enterprise SOA extends beyond the enterprise boundary
 - Services on-premise/off-premise
 - External service providers, partners, public APIs
 - Multiple identity domains and authorities

 This distributed SOA is increasingly aligning with the web
 - RESTful Web services as an architectural style fits this trend

 The enterprise consumes external RESTful web services
 The enterprise needs to expose its own RESTful web services


                                     5
Enterprise requirement: Threat protection
 Some RESTful web services are ‘public’ and require no
 authentication/authorization mechanisms
 Regardless, all RESTful services are subject to threats
 Service orientation => multiplication of threats


      Web Threats                                     WS Threats


                       RESTful web service threats

                       • parser attacks
                       • SQL/CODE/LDAP injections
                       • DOS, MITM, malware, buffer
                       overflow, replay, …

                                  6
Enterprise requirement: Access Control


 Authentication
 Authorization
 Integration with enterprise identity infrastructure
 - IAM, STS, LDAP

 Trust management
 Brokered authentication, federated identity
 Brokered authorization



                                 7
RESTful Security


 Security applied to RESTful web services must align with REST
 principles
 - Statelessness (no server sessions, no cookies)
 - URI uniquely identifies resources
 - Cachable
 - Use existing HTTP concepts like Authorization header, appropriate HTTP
   status codes, etc

 Security aware of REST concepts
 - Access control which considers HTTP verbs, URI patterns, cache duration




                                       8
Ex. A basic REST authorization pattern


 Simple authorization rule based on URI pattern (resource) and
 HTTP Verb (action)


 Resource   GET       PUT             POST        DELETE
 /foo/*     ok        forbidden       forbidden   forbidden
 /bar/*     ok        ok              ok          ok
 /baz/*     ok        ok              ok          forbidden




                                  9
Ex. Identity based response pattern

      GET /account
      Authorization: [joe’s passwd]
                                           <account name="joe”
                                           …>



      GET /account
      Authorization: [bob’s passwd]
                                           <account name=”bob”
                                           …>




                                      10
Message level integrity (?)
                     WS-*                                          REST

                transport                                                              transport


transport headers              Self contained                          transport headers
                                                                                           sig
                                     message
               message      independent from                                         resource
                                                                                     (payload)
soap headers                   transport layer
                    sig                          Action and
                                                 resource identifier
soap body                                        in transport
(payload)

                                                               ?
                                                      sig
2-party authentication/authorization

                            Resource
                        GET/PUT/POST/DEL
                        ETE with credentials
 Requester                                      RESTful web service




 Requester provides its own credentials
 The RESTful web service controls access to resources




                                12
SSL

 The ‘obvious’ fit
 - SSL is de-facto security for the web
 - RESTful

 Addresses many security requirements
 - Confidentiality, integrity
 - Endpoint authentication
 - Client authentication (with ssl mutual or http basic/digest)

 Limitations
 - Point-to-point
 - PKI Burden (?)
 - Does not provide non-repudiation
                                      13
Proprietary schemes


 Grassroots enterprise REST initiatives often rely on
 proprietary/point-to-point authentication schemes
 - Browser-friendly account id in query parameters
 - Web-style login forms and sessions

 Many PAAS and Web API management solutions also define their
 own authentication schemes
 - Often related to their subscription model (account ids, account keys)




                                     14
Ex. Azure storage REST API


PUT /somewhere/someresource
…
Authorization: SharedKey accntname:fr0t5AzM6qT3S40pBPmfrTLJwMuZurA8=
…


   HMAC signatures in Authorization header using a key associated
    with account
    - Signature covers URI, certain headers and payload’s md5
    - Potential end-to-end integrity (although proprietary)




                                         15
EX. Amazon S3 REST API


PUT /somewhere/someresource
…
Authorization: AWS keyid:fr0t5AzM6qT3S40pBPmfrTLJwMuZurA8=
…

   Almost the same thing (yet incompatible)
    - Different scheme name
    - Different string to sign order and contents




                                         16
3-party access control
                               Retrieve resource with
                                owner authorization
                                 (REST exchange)
                                                                        Resource
      Application
                                                                         provider



                     Do something                 Yes, I authorize it
                    with my resource


                                       Resource
                                        owner



 An application accesses a resource with the authorization of its
 owner




                                        17
OAuth
   A standard solution to a common scenario
    - Standard protocol and authorization token
    - User grant access to its resource, not its credentials
    - Already implemented by numerous platforms and services: google, twitter,
      salesforce, …
    - OAuth 1.0 (rfc5849) -> OAuth WRAP -> OAuth 2.0


GET /somewhere/someresource
…
Authorization: OAUTH fr0t5AzM6qT3S40pBPmfrTLJwMuZurA8=
…




                                         18
OAuth Enterprise pattern
 SaaS/PaaS composition pattern
 - Enterprise subscribes to multiple SaaS and needs them to integrate
 - Addresses critical challenge related to enterprise cloud adoption

                            SaaS A and B integrate on
                             behalf of enterprise user
                             through OAuth + REST
  SaaS A                                                                     SaaS B


                 Do something
                with my resource                       Yes, I authorize it
                    at SaaS B


                                  Enterprise user
                               subscribing to SaaS A
                                       and B




                                       19
OAuth Enterprise pattern
 Authorize access to enterprise resource
 - OAuth-enabled SaaS/PaaS can also retrieve resources hosted by enterprise




               Call back enterprise
                                                    Enterprise OAuth
                retrieves resource,                 authorization server
             through OAuth + REST
SaaS
PaaS
                                                                       Protected
                                                                       resource



                   Do something with             Yes, I authorize it
                     my resource at
                   http://myenterprise

                                                             Enterprise boundary

                                      20
Federated authentication
                              Consume service with
                               token from trusted
                                     issuer
                                                                  RESTful
      Requester
                                                                   service



                  Authenticate, get
                    token back                          Trust relationship

                                             Identity
                                            Authority




 Requester does not have credentials recognized by service but
 accessed by authenticating with an identity authority trusted by
 the service provider
 Essential pattern for B2B interactions
                                      21
Federated authentication

 Also a crucial pattern to avoid identity silos related to enterprise
 cloud usage
 Visibility and control for enterprise access of external services

                           Access SaaS with      Enterprise STS
                            token issued by
                                                                  Enterprise
SaaS                           enterprise                               IAM



                                               Authenticate
                                                  locally
       SaaS instance configured
       to trust enterprise issuing
             authority (STS)

                                                         Enterprise boundary


                                          22
Federated authentication and REST
 OpenID
 - Web focused
 - Browser driven (interactive steps, redirects)

 SAML
 - Enterprise focused
 - Has browser profile binding very similar to OpenID flow
 - Has other bindings (such as ws-security) and is extensible

 RESTful/API friendly federated authentication
 - No redirects
 - No interactive steps
 - Don’t expect a browser

                                        23
Example SAML binding for RESTful web service


                 GET /token/joe
                 Authorization: …
                                         200 OK
                                         <saml:Assertion …
                                         />


                 GET /someresource
                 Authorization: SAML PmfrTLJwMuZurA8=


        200 OK
        …

                                                                      (not
                                                             standardized)



                                    24
Decoupling security from service

 Service orientation is about agility
 More security decoupling = more agility

                                                            X
                                                           Security
                                                      as a Service,
                                                         Gateways
                         Container        X Agent
 agility




                         security         solutions
                             X
           Security in
           application
           logic
            X

                               decoupling

                                     25
Perimeter security implementation




                                                  RESTful
Requesters                                    service zone




                                    Delegate security responsibilities
                                        to specialized perimeter
                                             infrastructure




                         26
Perimeter security benefits

 Avoid duplication of responsibilities across all service endpoints
 Threat protection
 - Additional abstraction layer camouflages service implementation
 - Safe detection of parser attacks, injections
 - Safe input sanitization (XML Schemas, JSON Schemas)

 Uniform centralized trust management acting on behalf of
 services
 Uniform identity authority acting on behalf of services
 Efficient use of resources (performance)
 Reconcile caching and security
                                      27
Apply Enterprise REST security patterns


 Enable REST developers by providing REST-capable security
 infrastructure and process
 Demand and favor standard and interoperable security
 mechanisms from your providers
 Avoid identity silos
 - REST-enable your perimeter identity infrastructure

 Decouple security from application logic
 - Centralize access control, validation and threat protection




                                     28

More Related Content

What's hot

Wi fi call flows
Wi fi call flowsWi fi call flows
Wi fi call flows
framedrelay
 
HAD05: Collaborating with Extranet Partners on SharePoint 2010
HAD05: Collaborating with Extranet Partners on SharePoint 2010HAD05: Collaborating with Extranet Partners on SharePoint 2010
HAD05: Collaborating with Extranet Partners on SharePoint 2010
Michael Noel
 
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
Shreeraj Shah
 
A great api is hard to find
A great api is hard to findA great api is hard to find
A great api is hard to find
Dan Diephouse
 
Find me if you can – smart fuzzing and discovery! shreeraj shah
Find me if you can – smart fuzzing and discovery!   shreeraj shahFind me if you can – smart fuzzing and discovery!   shreeraj shah
Find me if you can – smart fuzzing and discovery! shreeraj shah
owaspindia
 
Identity Manager in Cloud with Openflow Switches
Identity Manager in Cloud with Openflow SwitchesIdentity Manager in Cloud with Openflow Switches
Identity Manager in Cloud with Openflow Switches
Mohammad Faraji
 

What's hot (20)

Wi fi call flows
Wi fi call flowsWi fi call flows
Wi fi call flows
 
HAD05: Collaborating with Extranet Partners on SharePoint 2010
HAD05: Collaborating with Extranet Partners on SharePoint 2010HAD05: Collaborating with Extranet Partners on SharePoint 2010
HAD05: Collaborating with Extranet Partners on SharePoint 2010
 
PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
Soa limitations
Soa limitationsSoa limitations
Soa limitations
 
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
 
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
 
When and Why Would I use Oauth2?
When and Why Would I use Oauth2?When and Why Would I use Oauth2?
When and Why Would I use Oauth2?
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Building tomorrow's web with today's tools
Building tomorrow's web with today's toolsBuilding tomorrow's web with today's tools
Building tomorrow's web with today's tools
 
Troubleshooting Federation, ADFS, and More
Troubleshooting Federation, ADFS, and More Troubleshooting Federation, ADFS, and More
Troubleshooting Federation, ADFS, and More
 
A great api is hard to find
A great api is hard to findA great api is hard to find
A great api is hard to find
 
JAX-RS 2.0: RESTful Web services on steroids
JAX-RS 2.0: RESTful Web services on steroidsJAX-RS 2.0: RESTful Web services on steroids
JAX-RS 2.0: RESTful Web services on steroids
 
Find me if you can – smart fuzzing and discovery! shreeraj shah
Find me if you can – smart fuzzing and discovery!   shreeraj shahFind me if you can – smart fuzzing and discovery!   shreeraj shah
Find me if you can – smart fuzzing and discovery! shreeraj shah
 
seekda's Web Service search engine
seekda's Web Service search engineseekda's Web Service search engine
seekda's Web Service search engine
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
 
Identity Manager in Cloud with Openflow Switches
Identity Manager in Cloud with Openflow SwitchesIdentity Manager in Cloud with Openflow Switches
Identity Manager in Cloud with Openflow Switches
 
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the Cloud
 
4. tmg 2010 e uag 2010
4. tmg 2010 e uag 20104. tmg 2010 e uag 2010
4. tmg 2010 e uag 2010
 

Similar to Layer 7: 2010 RSA Presentation on REST and Oauth Security

Windows Azure架构探析
Windows Azure架构探析Windows Azure架构探析
Windows Azure架构探析
George Ang
 
Application Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomApplication Services On The Web Sales Forcecom
Application Services On The Web Sales Forcecom
QConLondon2008
 
CTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App FabricCTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App Fabric
Spiffy
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
deimos
 
XSS and CSRF with HTML5
XSS and CSRF with HTML5XSS and CSRF with HTML5
XSS and CSRF with HTML5
Shreeraj Shah
 

Similar to Layer 7: 2010 RSA Presentation on REST and Oauth Security (20)

Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
 
Using Windows Azure for Solving Identity Management Challenges (Visual Studio...
Using Windows Azure for Solving Identity Management Challenges (Visual Studio...Using Windows Azure for Solving Identity Management Challenges (Visual Studio...
Using Windows Azure for Solving Identity Management Challenges (Visual Studio...
 
OAuth in the Real World featuring Webshell
OAuth in the Real World featuring WebshellOAuth in the Real World featuring Webshell
OAuth in the Real World featuring Webshell
 
Windows Azure架构探析
Windows Azure架构探析Windows Azure架构探析
Windows Azure架构探析
 
Demystifying identity on AWS
Demystifying identity on AWSDemystifying identity on AWS
Demystifying identity on AWS
 
Embedding Jaspersoft into your PHP application
Embedding Jaspersoft into your PHP applicationEmbedding Jaspersoft into your PHP application
Embedding Jaspersoft into your PHP application
 
Modified REST Presentation
Modified REST PresentationModified REST Presentation
Modified REST Presentation
 
Application Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomApplication Services On The Web Sales Forcecom
Application Services On The Web Sales Forcecom
 
OpenSSO Tech Overview Aquarium
OpenSSO Tech Overview AquariumOpenSSO Tech Overview Aquarium
OpenSSO Tech Overview Aquarium
 
CTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App FabricCTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App Fabric
 
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise UsersApache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
 
The Middleware technology that connects the enterprise
The Middleware technology that connects the enterpriseThe Middleware technology that connects the enterprise
The Middleware technology that connects the enterprise
 
Nasdanika Foundation Server
Nasdanika Foundation ServerNasdanika Foundation Server
Nasdanika Foundation Server
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
2014 q3-platform-update-v1.06.johnmathon
2014 q3-platform-update-v1.06.johnmathon2014 q3-platform-update-v1.06.johnmathon
2014 q3-platform-update-v1.06.johnmathon
 
Secure Credential Management with CredHub - DaShaun Carter & Sharath Sahadevan
Secure Credential Management with CredHub - DaShaun Carter & Sharath Sahadevan Secure Credential Management with CredHub - DaShaun Carter & Sharath Sahadevan
Secure Credential Management with CredHub - DaShaun Carter & Sharath Sahadevan
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Gartner Catalyst Savvis Cloud API Case Study
Gartner Catalyst   Savvis Cloud API Case StudyGartner Catalyst   Savvis Cloud API Case Study
Gartner Catalyst Savvis Cloud API Case Study
 
XSS and CSRF with HTML5
XSS and CSRF with HTML5XSS and CSRF with HTML5
XSS and CSRF with HTML5
 

More from CA API Management

5 steps end to end security consumer apps
5 steps end to end security consumer apps5 steps end to end security consumer apps
5 steps end to end security consumer apps
CA API Management
 

More from CA API Management (20)

Api architectures for the modern enterprise
Api architectures for the modern enterpriseApi architectures for the modern enterprise
Api architectures for the modern enterprise
 
Mastering Digital Channels with APIs
Mastering Digital Channels with APIsMastering Digital Channels with APIs
Mastering Digital Channels with APIs
 
Takeaways from API Security Breaches Webinar
Takeaways from API Security Breaches WebinarTakeaways from API Security Breaches Webinar
Takeaways from API Security Breaches Webinar
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
 
Liberating the API Economy with Scale-Free Networks - Mike Amundsen, Director...
Liberating the API Economy with Scale-Free Networks - Mike Amundsen, Director...Liberating the API Economy with Scale-Free Networks - Mike Amundsen, Director...
Liberating the API Economy with Scale-Free Networks - Mike Amundsen, Director...
 
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
 
API Monetization: Unlock the Value of Your Data
API Monetization: Unlock the Value of Your DataAPI Monetization: Unlock the Value of Your Data
API Monetization: Unlock the Value of Your Data
 
Revisiting Geddes' Outlook Tower - Mike Amundsen, Director of API Architectur...
Revisiting Geddes' Outlook Tower - Mike Amundsen, Director of API Architectur...Revisiting Geddes' Outlook Tower - Mike Amundsen, Director of API Architectur...
Revisiting Geddes' Outlook Tower - Mike Amundsen, Director of API Architectur...
 
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
 
Enabling the Multi-Device Universe
Enabling the Multi-Device UniverseEnabling the Multi-Device Universe
Enabling the Multi-Device Universe
 
Building APIs That Last for Decades - Irakli Nadareishvili, Director of API S...
Building APIs That Last for Decades - Irakli Nadareishvili, Director of API S...Building APIs That Last for Decades - Irakli Nadareishvili, Director of API S...
Building APIs That Last for Decades - Irakli Nadareishvili, Director of API S...
 
The Art of API Design - Ronnie Mitra, Director of API Design, API Academy at ...
The Art of API Design - Ronnie Mitra, Director of API Design, API Academy at ...The Art of API Design - Ronnie Mitra, Director of API Design, API Academy at ...
The Art of API Design - Ronnie Mitra, Director of API Design, API Academy at ...
 
APIs Fueling the Connected Car Opportunity - Scott Morrison, SVP & Distinguis...
APIs Fueling the Connected Car Opportunity - Scott Morrison, SVP & Distinguis...APIs Fueling the Connected Car Opportunity - Scott Morrison, SVP & Distinguis...
APIs Fueling the Connected Car Opportunity - Scott Morrison, SVP & Distinguis...
 
Adapting to Digital Change: Use APIs to Delight Customers & Win
Adapting to Digital Change: Use APIs to Delight Customers & WinAdapting to Digital Change: Use APIs to Delight Customers & Win
Adapting to Digital Change: Use APIs to Delight Customers & Win
 
Balancing Security & Developer Enablement in Enterprise Mobility - Jaime Ryan...
Balancing Security & Developer Enablement in Enterprise Mobility - Jaime Ryan...Balancing Security & Developer Enablement in Enterprise Mobility - Jaime Ryan...
Balancing Security & Developer Enablement in Enterprise Mobility - Jaime Ryan...
 
5 steps end to end security consumer apps
5 steps end to end security consumer apps5 steps end to end security consumer apps
5 steps end to end security consumer apps
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
 
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
 
Gartner AADI Summit Sydney 2014 Implementing the Layer 7 API Management Pla...
Gartner AADI Summit Sydney 2014   Implementing the Layer 7 API Management Pla...Gartner AADI Summit Sydney 2014   Implementing the Layer 7 API Management Pla...
Gartner AADI Summit Sydney 2014 Implementing the Layer 7 API Management Pla...
 
Using APIs to Create an Omni-Channel Retail Experience
Using APIs to Create an Omni-Channel Retail ExperienceUsing APIs to Create an Omni-Channel Retail Experience
Using APIs to Create an Omni-Channel Retail Experience
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Layer 7: 2010 RSA Presentation on REST and Oauth Security

  • 1. Enterprise Security Patterns for RESTful Web Services Francois Lascelles Technical Director, Europe
  • 2. Agenda  Why REST matters to the Enterprise?  Enterprise security requirements for RESTful web services  REST security patterns  Moving beyond point-to-point
  • 3. Web services in the Enterprise • Enterprise integration • Web background (EI) background • Web API, SAAS, Cloud • SOAP, WSDL, UDDI • Lightweight • Sophisticated infrastructure available today WS-* RESTful service orientation enablers (both styles matter) 3
  • 4. Today’s Enterprise SOA landscape enterprise SOA SAAS Cloud deployed services partner enterprise boundary • Sensitive data, apps • Mission critical • ID authority • Legacy SAAS 4
  • 5. REST fits the new extended Enterprise SOA  Today’s enterprise SOA extends beyond the enterprise boundary - Services on-premise/off-premise - External service providers, partners, public APIs - Multiple identity domains and authorities  This distributed SOA is increasingly aligning with the web - RESTful Web services as an architectural style fits this trend  The enterprise consumes external RESTful web services  The enterprise needs to expose its own RESTful web services 5
  • 6. Enterprise requirement: Threat protection  Some RESTful web services are ‘public’ and require no authentication/authorization mechanisms  Regardless, all RESTful services are subject to threats  Service orientation => multiplication of threats Web Threats WS Threats RESTful web service threats • parser attacks • SQL/CODE/LDAP injections • DOS, MITM, malware, buffer overflow, replay, … 6
  • 7. Enterprise requirement: Access Control  Authentication  Authorization  Integration with enterprise identity infrastructure - IAM, STS, LDAP  Trust management  Brokered authentication, federated identity  Brokered authorization 7
  • 8. RESTful Security  Security applied to RESTful web services must align with REST principles - Statelessness (no server sessions, no cookies) - URI uniquely identifies resources - Cachable - Use existing HTTP concepts like Authorization header, appropriate HTTP status codes, etc  Security aware of REST concepts - Access control which considers HTTP verbs, URI patterns, cache duration 8
  • 9. Ex. A basic REST authorization pattern  Simple authorization rule based on URI pattern (resource) and HTTP Verb (action) Resource GET PUT POST DELETE /foo/* ok forbidden forbidden forbidden /bar/* ok ok ok ok /baz/* ok ok ok forbidden 9
  • 10. Ex. Identity based response pattern GET /account Authorization: [joe’s passwd] <account name="joe” …> GET /account Authorization: [bob’s passwd] <account name=”bob” …> 10
  • 11. Message level integrity (?) WS-* REST transport transport transport headers Self contained transport headers sig message message independent from resource (payload) soap headers transport layer sig Action and resource identifier soap body in transport (payload) ? sig
  • 12. 2-party authentication/authorization Resource GET/PUT/POST/DEL ETE with credentials Requester RESTful web service  Requester provides its own credentials  The RESTful web service controls access to resources 12
  • 13. SSL  The ‘obvious’ fit - SSL is de-facto security for the web - RESTful  Addresses many security requirements - Confidentiality, integrity - Endpoint authentication - Client authentication (with ssl mutual or http basic/digest)  Limitations - Point-to-point - PKI Burden (?) - Does not provide non-repudiation 13
  • 14. Proprietary schemes  Grassroots enterprise REST initiatives often rely on proprietary/point-to-point authentication schemes - Browser-friendly account id in query parameters - Web-style login forms and sessions  Many PAAS and Web API management solutions also define their own authentication schemes - Often related to their subscription model (account ids, account keys) 14
  • 15. Ex. Azure storage REST API PUT /somewhere/someresource … Authorization: SharedKey accntname:fr0t5AzM6qT3S40pBPmfrTLJwMuZurA8= …  HMAC signatures in Authorization header using a key associated with account - Signature covers URI, certain headers and payload’s md5 - Potential end-to-end integrity (although proprietary) 15
  • 16. EX. Amazon S3 REST API PUT /somewhere/someresource … Authorization: AWS keyid:fr0t5AzM6qT3S40pBPmfrTLJwMuZurA8= …  Almost the same thing (yet incompatible) - Different scheme name - Different string to sign order and contents 16
  • 17. 3-party access control Retrieve resource with owner authorization (REST exchange) Resource Application provider Do something Yes, I authorize it with my resource Resource owner  An application accesses a resource with the authorization of its owner 17
  • 18. OAuth  A standard solution to a common scenario - Standard protocol and authorization token - User grant access to its resource, not its credentials - Already implemented by numerous platforms and services: google, twitter, salesforce, … - OAuth 1.0 (rfc5849) -> OAuth WRAP -> OAuth 2.0 GET /somewhere/someresource … Authorization: OAUTH fr0t5AzM6qT3S40pBPmfrTLJwMuZurA8= … 18
  • 19. OAuth Enterprise pattern  SaaS/PaaS composition pattern - Enterprise subscribes to multiple SaaS and needs them to integrate - Addresses critical challenge related to enterprise cloud adoption SaaS A and B integrate on behalf of enterprise user through OAuth + REST SaaS A SaaS B Do something with my resource Yes, I authorize it at SaaS B Enterprise user subscribing to SaaS A and B 19
  • 20. OAuth Enterprise pattern  Authorize access to enterprise resource - OAuth-enabled SaaS/PaaS can also retrieve resources hosted by enterprise Call back enterprise Enterprise OAuth retrieves resource, authorization server through OAuth + REST SaaS PaaS Protected resource Do something with Yes, I authorize it my resource at http://myenterprise Enterprise boundary 20
  • 21. Federated authentication Consume service with token from trusted issuer RESTful Requester service Authenticate, get token back Trust relationship Identity Authority  Requester does not have credentials recognized by service but accessed by authenticating with an identity authority trusted by the service provider  Essential pattern for B2B interactions 21
  • 22. Federated authentication  Also a crucial pattern to avoid identity silos related to enterprise cloud usage  Visibility and control for enterprise access of external services Access SaaS with Enterprise STS token issued by Enterprise SaaS enterprise IAM Authenticate locally SaaS instance configured to trust enterprise issuing authority (STS) Enterprise boundary 22
  • 23. Federated authentication and REST  OpenID - Web focused - Browser driven (interactive steps, redirects)  SAML - Enterprise focused - Has browser profile binding very similar to OpenID flow - Has other bindings (such as ws-security) and is extensible  RESTful/API friendly federated authentication - No redirects - No interactive steps - Don’t expect a browser 23
  • 24. Example SAML binding for RESTful web service GET /token/joe Authorization: … 200 OK <saml:Assertion … /> GET /someresource Authorization: SAML PmfrTLJwMuZurA8= 200 OK … (not standardized) 24
  • 25. Decoupling security from service  Service orientation is about agility  More security decoupling = more agility X Security as a Service, Gateways Container X Agent agility security solutions X Security in application logic X decoupling 25
  • 26. Perimeter security implementation RESTful Requesters service zone Delegate security responsibilities to specialized perimeter infrastructure 26
  • 27. Perimeter security benefits  Avoid duplication of responsibilities across all service endpoints  Threat protection - Additional abstraction layer camouflages service implementation - Safe detection of parser attacks, injections - Safe input sanitization (XML Schemas, JSON Schemas)  Uniform centralized trust management acting on behalf of services  Uniform identity authority acting on behalf of services  Efficient use of resources (performance)  Reconcile caching and security 27
  • 28. Apply Enterprise REST security patterns  Enable REST developers by providing REST-capable security infrastructure and process  Demand and favor standard and interoperable security mechanisms from your providers  Avoid identity silos - REST-enable your perimeter identity infrastructure  Decouple security from application logic - Centralize access control, validation and threat protection 28