Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Implement API Gateway using Azure API Management

1,232 views

Published on

API-centric architecture is very popular in IT world because of their value in achievement of new business goals, extending of trade channels and business offerings. But as usual nothing is free and this kind of architecture requires solid instrument for management of APIs in terms of limits & quotas, combining of APIs to business offerings, security, usage analytics, etc.

During this presentation you’ll learn production experience on implementation of API Gateway using Azure API Management.

Published in: Engineering
  • Be the first to comment

Implement API Gateway using Azure API Management

  1. 1. IMPLEMENT API GATEWAY USING AZURE API MANAGEMENT ALEXANDER LAYSHA, CHIEF SOFTWARE ENGINEER AT EPAM SYSTEMS
  2. 2. AGENDA • WHY WE IMEPLEMENTED API GATEWAY • INTRODUCTION TO AZURE API MANAGEMENT • DESIGN FOR PRICING TIERS • OVERVIEW OF PUBLISH AND DEVELOPER PORTALS • POLICY DISCUSSION • OPTIONS FOR SECURITY
  3. 3. EVOLUTION OF OUR PROJECT UI SOAP REST API 1 REST API 2 REST API N REST APIs DEVELOPERS APPS BEFORE AFTER MONOLITH APP
  4. 4. OUR CONCERNS IN API MANAGEMENT • ACCESS TO PUBLIC & INTERNAL APIs • VISIBILITY OF APIs TO CUSTOMERS BASE ON PRICING TIER • CONTROL OF API USAGE BASE ON PRICING TIER • ANALYTICS OF APIs USAGE BY CUSTOMERS • FUTURE NEEDS AND GROWTH PLANS
  5. 5. HOW WE ADDRESSED CONCERNS? UI SOAP REST API 1 REST API 2 REST API N REST APIs DEVELOPERS APPS BEFORE AFTER MONOLITH APP APIGATEWAY
  6. 6. A BIT ABOUT API GATEWAY & HISTORY API GATEWAY SERVICE TRANSFORMATION SECURITY USAGE QUOTAS & LIMITS MONETIZATION LOGS ANALYTICS DEV SUPPORT VISIBILITY • CREATE API TO EXPOSE BACK-END SERVICES • ACTS AS REVERSE-PROXY • VENDORS: Apigee, WSO2, MuleSoft, AWS API Gateway, Azure API Management
  7. 7. INTRO TO AZURE API MANAGEMENT API DEVELOPER PORTAL PUBLISHER PORTAL PROXY AZURE API MANAGEMENT PUBLISHER / ADMIN DEVELOPERS APPS BACKEND
  8. 8. API MANAGEMENT FEATURES DEVELOPER PORTAL PUBLISHER PORTAL PROXY AZURE API MANAGEMENT REGISTRATION DOCUMENTATION INTERACTIVE API CONSOLE DEVELOPER ANALYTICS APP GALLERY FORUMS NEWS ISSUES WIKI API PUBLISHING SUBSCRIPTION MANAGEMENT SECURITY MEDIATION CONTENT PUBLISHING SITE CUSTOMIZATION ISSUE MANAGEMENT ANALYTICS REPORTS SCALING CACHING MONITORING TRAFFIC MANAGEMENT TRANSFORMATION
  9. 9. API MANAGEMENT ENTITIES USER PRODUCT OPEN|PROTECTED API RATE LIMITS & QUOTAs GROUP
  10. 10. DEMO: OUR DESIGN FOR PRICING TIERS TRIAL PRODUCT PROTECTED PAID PRODUCT PROTECTED SYS PRODUCT PROTECTED Health Check API LIMITS FOR TRIAL SYS GROUP LIMITS FOR PAID TRIAL GROUP ADMIN GROUP UNLIMITED SYS ACCOUNT TRIAL ACCOUNT PAID ACCOUNT ADMIN ACCOUNT API NAPI 2API 1 APIs CUSTOMER PRODUCTS INTERNAL USE ADMIN USE BUSINESS USE PAID GROUP
  11. 11. API MANAGEMENT POLICY “In Azure API Management, policies are a powerful capability of the system that allow the publisher to change the behavior of the API through configuration. Policies are a collection of Statements that are executed sequentially on the request or response of an API. ” POLICY SCOPES ARE EVALUATED IN THE FOLLOWING ORDER: • Global scope • Product scope • API scope • Operation scope
  12. 12. POLICY TEMPLATE <policies> <inbound> <!-- statements to be applied to the request go here --> </inbound> <backend> <!-- statements to be applied before the request is forwarded to the backend service go here --> </backend> <outbound> <!-- statements to be applied to the response go here --> </outbound> <on-error> <!-- statements to be applied if there is an error condition go here --> </on-error> </policies> POLICY REFERENCE: https://docs.microsoft.com/en-us/azure/api-management/api-management-policy-reference
  13. 13. HOW TO DEBUG API MANAGEMENT? • API INSPECTOR TOOL HEADER: Ocp-Apim-Trace = true • EVENT HUB LOGGER <log-to-eventhub logger-id ='logger-id'> @( string.Join(",", DateTime.UtcNow, ...)) </log-to-eventhub>
  14. 14. DEMO: POLICY TO DOWNLOAD A FILE DEVELOPERS AZURE BLOB STORAGE CUSTOMPOLICY AZURE WEB APP AZUREAPIMANAGEMENT URL + SAS 2 5 URL + SAS FILE ID 3 4 FILE FILE ID FILE 1 6
  15. 15. WHAT ARE OPTIONS TO SECURE API? • SECURITY BY OBSCURITY • BASIC AUTH • MUTUAL SSL • VNET • OAUTH 2.0 • OPENID
  16. 16. DEMO: OUR DESIGN FOR SECURITY DEVELOPERS AZURE API MANAGEMENT SUBSCIPTION KEY AZURE WEB APPs CERTIFICATIO NFILE BUSINESS PROCESS TO REGISTER NEW CUSTOMER SUBSCIPTION KEY API NAPI 1
  17. 17. Q&A

×