Calling API Management from Azure Function using Managed Identities

One of the solutions I am consulting on today is securing a number of APIs with OAuth with client credential flow, using Azure Active Directory as the identity provider. Those APIs are exposed via Azure API Management, which makes the validation of the access tokens provided as simple as injecting a policy at a product, API or operation level.

While this all works nicely, there is one item in this process which is a painpoint from an operations point of view: as they use client certificates to request access tokens, the certificate management is becoming a bit of a chore with the number of APIs and clients that access those APIs increasing.

A lot of those clients are either Azure Functions or Azure Logic Apps, which today provide the ability to using a managed identity to easy the burden of maintaining credentials.

So it was only logical to think about how would we be able to use the managed identities configured in both Azure Functions and Logic Apps to generate a token that can be validated by API Management. Turns out that this is quite possible, but needs a bit of preparation…

Continue reading “Calling API Management from Azure Function using Managed Identities”

MS Build Recap – The AIS Edition

This year’s MS Build was very different – we all know that. But for most of us, me included, was the first opportunity to join the event officially. And what event it was.

Ran across three time zone, with a mix of live sessions, Teams Live events and smaller Teams events, like focus groups, which allowed the attendees to really interact with the product groups and advocates from Microsoft.

This year there were some interesting announcements around the Azure Integration Services technologies. I’ve recently shared those announcements on a Auckland Azure User Group meetup, and thought that, since I already had everything collated, it would be a good idea to just share this with you on the blog as well. So, let’s talk about what is now available, or just \around the corner for AIS

Continue reading “MS Build Recap – The AIS Edition”

API Management – Restrict Operation Access per Product

Last week I had an interesting request from a client. They have been creating generic APIs, using a variety of different backend systems (on-prem APIs, Azure Functions, Logic Apps, cloud APIs). Those APIs were grouped by product but even within a product they would like to restrict access to only some operations, so product A would have access to a group of operations, while product B would have access to different group. Initially I thought that role based access driven by claims, but the issue was that we didn’t have control of the identity providers, or the back end services. In the end we would have to find a solution within API Management to create this ACL like style.

Initally I didn’t like the idea to create our own access controls in APIM, but faced with the other constraints, I slowly warmed up to the idea and learned a couple of things about policies along the way.

Continue reading “API Management – Restrict Operation Access per Product”

API Management – Arc Enabled

API Management what enabled? If you haven’t keeping up with the news from MS Ignite 2019, the title might be a bit confusing. Arc (not A.R.C as I read it initially) is a new Service in Azure that allow customer to deploy and manage Azure Services anywhere – and anywhere in this case means any cloud, on-premises infrastructure and at the edge. You can find more about that service here.

During MS Ignite, the API Management team launched the public preview of a new feature, that takes advantage of the Arc technology to deploy API Management gateways anywhere. So let’s take a look of what that looks like.

Continue reading “API Management – Arc Enabled”

API call with client certificate policy failing to execute due to message size on Azure API Management

Well, that is a mouthful of a title, but I wanted to capture the exact issue, because I couldn’t find any page to help with this specific error and managed to get it fixed thanks to Vladimir Vinogradsky pointing me out to a tip in one of the APIM docs.

So my scenario was this: my team was working on an API that is protected with a client certificate policy – quite simple, very straightforward. At the API level it had the following policy:

Continue reading “API call with client certificate policy failing to execute due to message size on Azure API Management”

Integrate 2019 in Review

I was on my flight back from London, returning from Integrate 2019, when I started this blog post. It was a very long flight, around 24 hours each way, but even if the jetlag hit me really hard this time around, it wsa worth it. Integrate grew from an initiative from a group of BizTalk MVPs, into the premier conference for Microsoft Integration technologies. It was my honour to be a presenter for the third year in a row, presenting alongside a Microsoft team comprised of Product Managers, Architects and Engineers – the people that actually design and implement the technologies I use on a daily basis – and legends from the Microsoft Integration community like Sandro Pereira, Steefan Wiggers, Richard Seroter, Michael Stephenson and Kent Weare, just to name a few.

The conference is run by Kovai Co – the company formerly known as BizTalk 360 – as a very well oiled machine. A large team from Kovai dedicate months ahead preparing the conference. This edition of Integrate was the largest yet, with over 480 participants, with 26 speakers and 28 sessions, across 3 days.

If I had to choose one theme from the conference this year, would be governance. Seems like most of the integration related technologies got to a stage where the core set of features are available and companies are using them actively. All that activity highlighted the requirement for better tooling and guidance around various aspects of the governance of the platform. From DevOps guidance to security and bettern integration between on-premises and the cloud, pretty much every product group had recent or new announcements around that theme.

Continue reading “Integrate 2019 in Review”

Automating API Management CI/CD with APIM DevOps Resource Kit

Hey everyone! It’s been a while right? The only thing I have to say in my defense is that the last 5 months have been crazy with travel, presentations and lots of work, so I couldn’t get myself to create a good blog post. But enough of excuses already… Remember the “lots of work” part? That involved working with different clients, and a common theme among many of those clients was the implementation of a centralized API layer, tho expose the back services they were creating. That meant that I had to find a good way to automate the publishing of the APIs created in API Management across the different environments. Previously, I’ve relied on the fantastic work that Mattias Logdberg did with the API Management ARM Template Creator (which is also worth a look). But now that Microsoft had some official guidance for that extraction, I decided to have a go with it.

Continue reading “Automating API Management CI/CD with APIM DevOps Resource Kit”

Combining API Management with Azure Relays

As you might remember, in June I was at the Integrate 2018, doing a presentation called Exposing BizTalk to the World. It was my second time presenting on what became the premier conference on Microsoft Integration and it was a fantastic experience. It wouldn’t be fair to talk about Integrate without thanking Theta for sponsoring my trip and time of work and BizTalk360 for organizing a great event.

But why am I talking about this almost four months later? Apart from the shameless plug, during that presentation suggested a couple of ways to expose BizTalk endpoints. One of the options was using API Management to expose BizTalk receive locations, and the other was using Azure Relay to bypass firewall and securely expose BizTalk endpoints.

A couple of weeks ago, I’ve actually combine both technologies to securely expose a BizTalk endpoint. On this scenario, the client needed to create an API that would be exposed to partners, but wanted to reuse a series of BizTalk processes that were already implemented. As this was a pilot that should highlight the agility and fast time to market that can be achieved with the cloud, we didn’t have time to go through the process of exposing their environment through the firewall and whitelist API Management. Continue reading “Combining API Management with Azure Relays”

Automating API Management Backup and Restore with Logic Apps

I’ve been working during the last week or so on setting up a DR strategy for a solution that is based on API Management, Azure Functions and Service Bus. Most of the deployment to the secondary site is dealt by VSTS, but one of the main issues on the proposed strategy was the fact that APIM instance utilized is Standard, which doesn’t allow multi-region deployments. This way, to guarantee that all APIM configuration, including users, API policies and subscriptions, I had to leverage from the backup/restore functionality available in APIM, based on the Management API.

The API calls for backup and restores are quite straight forward, but use a authorization token that must be requested before the API call can be executed. So, to automate the process to generate the token and execute the backup or restore API calls, I decided to use Logic Apps. Continue reading “Automating API Management Backup and Restore with Logic Apps”

API Management Gotcha – Empty Body Definition

A while ago I saw a question in the forums where someone was trying to use a POST operation using the API Management action in Logic Apps and the action card didn’t have any way to input the body object.

To replicate the issue I’ve create a very simple logic app, so simple in fact that I didn’t even bother to define a trigger schema. After creating a new API using that logic app, to my surprise I also couldn’t find any input for the message body. Continue reading “API Management Gotcha – Empty Body Definition”