SlideShare a Scribd company logo
1 of 12
1
CONFIDENTIAL
Andrew Winder
Senior Software Engineer, Message Systems
Key Management for a Distributed API
July 14, 2014
2
Who Is Message Systems?
3
How do we develop products?
• API-centric architecture
• Resource-oriented APIs, future plans for Hypermedia
• Web UIs are JavaScript apps talking to APIs
• Modular APIs and codebases
4
Challenges with that approach?
5
Challenges
6
Solution, from 10K feet
7
Pre-Built Solutions
8
Nginx for CORS
9
Nginx for Auth
10
Benefits of this approach
11
12
Demo & Questions
Twitter: @awinder
andrew.winder@messagesystems.com

More Related Content

What's hot

Building and Delivering Software in a Faster and More Consistent Way
Building and Delivering Software in a Faster and More Consistent WayBuilding and Delivering Software in a Faster and More Consistent Way
Building and Delivering Software in a Faster and More Consistent WayDevOps Indonesia
 
Why APIs Call for 2xs the DevOps
Why APIs Call for 2xs the DevOpsWhy APIs Call for 2xs the DevOps
Why APIs Call for 2xs the DevOpsPostman
 
Design-first API Development using Swagger and Node
Design-first API Development using Swagger and NodeDesign-first API Development using Swagger and Node
Design-first API Development using Swagger and NodeApigee | Google Cloud
 
Container on Windows, not windows containers Docker meetup Melbourne
Container on Windows, not windows containers  Docker meetup MelbourneContainer on Windows, not windows containers  Docker meetup Melbourne
Container on Windows, not windows containers Docker meetup MelbourneJorge Arteiro
 
Roadshow to dev opsdays jakarta 2020 with linkaja announcement
Roadshow to dev opsdays jakarta 2020 with linkaja   announcementRoadshow to dev opsdays jakarta 2020 with linkaja   announcement
Roadshow to dev opsdays jakarta 2020 with linkaja announcementDevOps Indonesia
 
Building APIs with Apigee Edge and Microsoft Azure
Building APIs with Apigee Edge and Microsoft AzureBuilding APIs with Apigee Edge and Microsoft Azure
Building APIs with Apigee Edge and Microsoft AzureApigee | Google Cloud
 
About JustplugIt services
About JustplugIt servicesAbout JustplugIt services
About JustplugIt servicesJustPlugIt
 
Roadshow DevOpsDay Jakarta X Qoala Announcement
Roadshow DevOpsDay Jakarta X Qoala AnnouncementRoadshow DevOpsDay Jakarta X Qoala Announcement
Roadshow DevOpsDay Jakarta X Qoala AnnouncementDevOps Indonesia
 
Mix-IT - Des Produits avec des Equipes Distribuées
Mix-IT - Des Produits avec des Equipes DistribuéesMix-IT - Des Produits avec des Equipes Distribuées
Mix-IT - Des Produits avec des Equipes DistribuéesAlexis Monville
 
Promote Your API Brand and Extend Your API Reach
Promote Your API Brand and Extend Your API ReachPromote Your API Brand and Extend Your API Reach
Promote Your API Brand and Extend Your API ReachChris Haddad
 
CONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANECONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANECocoaHeads France
 
DevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcement
DevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcementDevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcement
DevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcementDevOps Indonesia
 
DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...
DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...
DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...DevOps Indonesia
 
apidays LIVE India - The link between technical documentation and developer e...
apidays LIVE India - The link between technical documentation and developer e...apidays LIVE India - The link between technical documentation and developer e...
apidays LIVE India - The link between technical documentation and developer e...apidays
 
Introduction to the World of Containers
Introduction to the World of ContainersIntroduction to the World of Containers
Introduction to the World of ContainersFelix Roberge
 
Integrate Security and Compliance into your CI/CD Pipeline
Integrate Security and Compliance into your CI/CD PipelineIntegrate Security and Compliance into your CI/CD Pipeline
Integrate Security and Compliance into your CI/CD PipelineDevOps Indonesia
 
Service Operations Transformation Journey
Service Operations Transformation JourneyService Operations Transformation Journey
Service Operations Transformation JourneyDevOps Indonesia
 
Microservices Tools | Edureka
Microservices Tools | EdurekaMicroservices Tools | Edureka
Microservices Tools | EdurekaEdureka!
 

What's hot (19)

Building and Delivering Software in a Faster and More Consistent Way
Building and Delivering Software in a Faster and More Consistent WayBuilding and Delivering Software in a Faster and More Consistent Way
Building and Delivering Software in a Faster and More Consistent Way
 
Why APIs Call for 2xs the DevOps
Why APIs Call for 2xs the DevOpsWhy APIs Call for 2xs the DevOps
Why APIs Call for 2xs the DevOps
 
Design-first API Development using Swagger and Node
Design-first API Development using Swagger and NodeDesign-first API Development using Swagger and Node
Design-first API Development using Swagger and Node
 
Container on Windows, not windows containers Docker meetup Melbourne
Container on Windows, not windows containers  Docker meetup MelbourneContainer on Windows, not windows containers  Docker meetup Melbourne
Container on Windows, not windows containers Docker meetup Melbourne
 
Roadshow to dev opsdays jakarta 2020 with linkaja announcement
Roadshow to dev opsdays jakarta 2020 with linkaja   announcementRoadshow to dev opsdays jakarta 2020 with linkaja   announcement
Roadshow to dev opsdays jakarta 2020 with linkaja announcement
 
Building APIs with Apigee Edge and Microsoft Azure
Building APIs with Apigee Edge and Microsoft AzureBuilding APIs with Apigee Edge and Microsoft Azure
Building APIs with Apigee Edge and Microsoft Azure
 
About JustplugIt services
About JustplugIt servicesAbout JustplugIt services
About JustplugIt services
 
Mobile SDKs
Mobile SDKs Mobile SDKs
Mobile SDKs
 
Roadshow DevOpsDay Jakarta X Qoala Announcement
Roadshow DevOpsDay Jakarta X Qoala AnnouncementRoadshow DevOpsDay Jakarta X Qoala Announcement
Roadshow DevOpsDay Jakarta X Qoala Announcement
 
Mix-IT - Des Produits avec des Equipes Distribuées
Mix-IT - Des Produits avec des Equipes DistribuéesMix-IT - Des Produits avec des Equipes Distribuées
Mix-IT - Des Produits avec des Equipes Distribuées
 
Promote Your API Brand and Extend Your API Reach
Promote Your API Brand and Extend Your API ReachPromote Your API Brand and Extend Your API Reach
Promote Your API Brand and Extend Your API Reach
 
CONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANECONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANE
 
DevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcement
DevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcementDevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcement
DevOps indonesia meetup #40 (online) DevOps and DevSecOps - announcement
 
DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...
DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...
DevOps Indonesia "Going deeper into Jenkins, Docker and even more" - Announce...
 
apidays LIVE India - The link between technical documentation and developer e...
apidays LIVE India - The link between technical documentation and developer e...apidays LIVE India - The link between technical documentation and developer e...
apidays LIVE India - The link between technical documentation and developer e...
 
Introduction to the World of Containers
Introduction to the World of ContainersIntroduction to the World of Containers
Introduction to the World of Containers
 
Integrate Security and Compliance into your CI/CD Pipeline
Integrate Security and Compliance into your CI/CD PipelineIntegrate Security and Compliance into your CI/CD Pipeline
Integrate Security and Compliance into your CI/CD Pipeline
 
Service Operations Transformation Journey
Service Operations Transformation JourneyService Operations Transformation Journey
Service Operations Transformation Journey
 
Microservices Tools | Edureka
Microservices Tools | EdurekaMicroservices Tools | Edureka
Microservices Tools | Edureka
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

API Key Management for a Distributed API

Editor's Notes

  1. Hi, I’m Andy Winder from Message Systems, and I wanted to talk today about some of the work we’re doing, and how we structure that work into distributed components under one API.
  2. Message Systems writes software for handling large customers email management needs, companies like Facebook, LinkedIn, and Twitter. Our software manages the sending and receiving of emails, as well as other types of messages like push notifications and SMS messages. We’re increasingly focused on users interacting with our systems over REST APIs instead of SMTP, as was traditionally the main interface into email systems.
  3. We build Resource-Oriented APIs and are beginning to focus on really supporting hypermedia interactivity within our APIs. We don’t build APIs as a second thought, they’re integral and first-class citizens, and we need them to be able to build browser apps for our customers as well. We don’t want to build them into one big codebase though, we want to build small sub-APIs that compose our larger API offering.
  4. Tons of smaller components need to be managed, and we need smart ways to share common functionality across these smaller APIs so that we don’t reinvent the wheel everywhere.
  5. Different internal teams use different languages and tool chains to produce their APIs. We needed a way to build common functionality in a sharable way, and then expose a collection of APIs as a more unified offering to users. We also needed for developers of all these APIs to be able to easily integrate in something like authentication in a consistent way across the API.
  6. We decided to use Nginx to build an API gateway and expose our smaller API components as one unified API. The API Gateway acts as a midpoint between the backend APIs and the user request. Nginx, and a distribution called OpenResty, allows for not only using Nginx as a proxy, but writing middleware in Lua to manipulate requests and responses in different phases of nginx handling a request. Internal APIs, on the right side, are only exposed inside the network. We can build smarts into the gateway to extend these internal APIs.
  7. Layer7, 3Scale, Mashery and Apigee offer pre-built API gateways. These gateways offer very robust feature sets, but when we investigated the offerings, we saw some tradeoffs in complexity, ability to integrate at key points, and they were all paid offerings. Some offerings involve cloud solutions only, and can carry performance costs as well. We had simple upfront needs and explored building a gateway solution for our use-cases to see what the level of effort would be to replicate what we needed.
  8. Let developers use your APIs in their web applications without needing to be on the same domain. Using Nginx middleware, we intercept the request and add in CORS headers to all requests. CORS involves a preflight OPTIONS request to the URI specified, so we build that into nginx too. Now all of our APIs are CORS compliant, and using the same logic, but that logic only exists in one place. Less room for error, and less overhead for developers.
  9. Authentication and Authorization work in a similar way. When requests begin, a Lua routine runs and inspects the API key (in the Authorization header) from the client request. It calls an internal API endpoint to figure out if the request is valid or invalid. Invalid authentication, or a valid API key with no access to the requested endpoint, have error messages returned to the user. Successful authentication & authorization pulls out user details from the API key and adds them as X- headers, and then passes control to the right API endpoint.
  10. The benefit of this approach is that no single API component needs to understand the mechanics of authentication & authorization, but all API components are protected by authentication by default. API code is orthogonal to the gateway functionality. We can make big changes to the internal mechanics of authentication, as long as we fulfill the contract of passing X- headers along to underlying APIs, and they won’t know that anything has changed.
  11. To wrap up, we use these methods to organize our highly-distributed architecture into a well-defined structure, with shared functionality “wrapping” our APIs at the nginx layer. We’re not tossing all our functionality for the entire organization into one big pile of blocks, we’re building it into small, organized, and well-separated pieces.