api management: la puerta de enlace (por francisco nieto)
TRANSCRIPT
2017 - Madrid
API ManagementFrancisco Nieto Senior Integration Consultant, Kabel
#GIBMad2017
Who I am?
Francisco NietoSenior Integration Consultant, KabelMCPD. MCTS en Visual Studio, SQL, SharePoint, Dynamics CRM
https://twitter.com/fnietoga
+34 682 836 331
https://www.linkedin.com/in/francisco-nieto-garcia
#GIBMad2017
#GIBMad2017
The rise of APIs“Application programming interfaces (APIs) have been elevated from a development technique to a business model driver and boardroom consideration.
An organization’s core assets can be reused, shared, and monetized through APIs that can extend the reach of existing services or provide new revenue streams.
APIs should be managed like a product - one built on top of a potentially complex technical footprint that includes legacy and third-party systems and data.”
“API Economy”
CloudHybrid IT
Mobile
Analytics
IoT
Microservices
• Scales by cloning the app on multiple servers/VMs/Containers
Monolithic application approach Microservices application approach
• A microservice application separates functionality into separate smaller services.
• Scales out by deploying each service independently creating instances of these services across servers/VMs/containers
• A monolith app contains domain specific functionality and is normally divided by functional layers such as web, business and data
App 1 App 2App 1
#GIBMad2017
#GIBMad2017
Common scenarios
What is?
API Management
#GIBMad2017
High Level Architecture
Publisher Portal
#GIBMad2017
Entities
#GIBMad2017
Security
programmatically
any operation
analytics data, APIs, products
SECURITY MANAGEMENT
#GIBMad2017
https://docs.microsoft.com/en-us/azure/api-management/api-
management-access-restriction-policies
Access & Auth
• Check header
• Limit call rate
• Restrict by IP
• Set usage quota
• Validate JWT
• Authenticate withbasic / clientcertificate
Caching
• Get from cache
• Store to cache
• Get value fromcache
• Store value in cache
• Remove valuefrom cache
Cross domain Advanced
• Control flow
• Forward request
• Log to Event Hub
• Retry, Wait
• Return response
• Send request
• Set status
• Set variable
Transformation
• JSON to XML
• XML to JSON
• Find and replace
• Set backendservice
• Set body
• Set query stringparameter
• Rewrite URL
Policies
Policy Expressions
<rate-limit-by-key calls="10"
renewal-period="60"
counter-key="@(context.Request.IpAddress)" />
<quota-by-key calls="1000000"
bandwidth="10000"
renewal-period="2629800"
counter-key="@(context.Request.IpAddress)" />
<policies>
<inbound>
<log-to-eventhub logger-id ='contoso-logger'>
@( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) )
</log-to-eventhub>
</inbound>
<outbound>
</outbound>
</policies>
Policy Expressions (II)<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>
• System.Collections.Generic
• System.Security.Cryptography
• System.Text.RegularExpressions
• System.Xml.Linq
• Newtonsoft.Json.Linq
…
• Api
• Deployment
• LastError
• Operation
• Product
• Request
• Response
• Subscription
• User
…
https://docs.microsoft.com/en-us/azure/api-management/api-
management-policy-expressions#CLRTypes
Policy Expressions (III)
Developer Portal• Sign up / Sign in
• Request subscriptionbasics
• Documentation, Definiton (swagger, WADL)
• Test, Code samplesAPIs
• View Products, APIs by Product
• Report Issuemanage
• Styles & Templates
• Blogand more
#GIBMad2017
• Easily import API Apps as APIs
• mock-response policy
• Users & Products can be managed from Azure Portal
• SOAP to REST
• PowerShell and .NET SDK support for the backend entity.
• Diagnostics logs (batched hourly)
• Integration with Azure Monitor
• SSL3 is disabled, all versions of TLS are enabled by default
• Role-Based Access Control
• OMS Integration
• Version APIs
• work natively with Service Fabric
• ARM templates
• Manage API lifecycle
• Import API from a Function App
• Backlog
• Visual studio Integration
• Improved Policy Editor UI
• Deploy gateway on-premises
https://trello.com/b/FAA147vS/azure-api-management-product-roadmap
#GIBMad2017
Environment
API Management
Logic App
Backend
Internet
Microsoft Azure
GB.CustomerAPI
GB.OrdersAPI
gibmad17kb01
ordersapigibmad17-sbus-
kb01
Service
Fabric
GIB.ProductsAPI
SQL Database
GB.CurrencyConverter
SOAP WSDL
Dynamics
365
#GIBMad2017
Thanks…
#GIBMAD2017