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

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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?Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 organizationRadu Cotescu
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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.