Developing Azure functions locally

horatius

I am leading a large team of azure functions developers. So, most of the examples quoted by Microsoft using the azure web interface don't work for me. I am developing Azure functions locally using emulators to save some costs. I publish all my functions through visual studio into my integration environment.

I am developing a bunch of azure functions that need the api gateway to handle the authentication workflows using Azure AD B2C. Now, there's no api gateway emulator or an Azure AD B2C emulator that I can run locally. My authentication workflows involve intercepting requests to the api, redirecting them to AD B2C for authentication and the subsequent addition of the auth-token to the http header and then invoking the http-triggered azure functions.

Now, the question becomes, how do I test authentication workflows? How can I setup the api gateway to register my functions running locally in visual studio as api endpoint for my api gateway in the cloud?

Eric Jorgensen

What I did:

  1. Added an "authorize" API that handles general-purpose authorization against foreign authorities. This API returns my own JWT with my own custom claims that lasts for a some limited amount of time.
  2. Changed all of my other API's to use my custom JWT.

Advantages:

  • Super easy to test locally. I just add #if DEBUG sections to the authorization API to skip normal authorization and give me a JWT of my design.
  • I can put whatever I want in the claim, so I use it as a cache to reduce external authorization calls.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Azure Functions does not run on Azure but works locally

分類Dev

How to override logging settings when running azure Functions locally?

分類Dev

How to locally edit an already deployed function in Azure Functions (Python)?

分類Dev

Run Firebase cloud functions locally?

分類Dev

Web api working locally but not when deployed to Azure

分類Dev

Azure FunctionsのDI

分類Dev

Azure FunctionsのDI

分類Dev

Azure FunctionsのDI

分類Dev

Azure functions runtime configuration

分類Dev

Azure Functions return IQueryable

分類Dev

Azure Functions Traffic Manager

分類Dev

Cloud Functions to Cloud FireStore running locally but not when deployed

分類Dev

Using the cloud functions emulator to test Dialogflow fulfillment locally

分類Dev

-split ' ' that works locally in Powershell does not work in a Azure pipeline Powershell task

分類Dev

How to speed up debugging C# Azure Function locally? Is

分類Dev

Calling Azure functions through the Azure CLI

分類Dev

Azure FunctionsとLogic Apps

分類Dev

Azure FunctionsとLogic Apps

分類Dev

Azure FunctionsとLogic Apps

分類Dev

SQL connection pooling in Azure Functions

分類Dev

Azure Functions Billing Async Methods

分類Dev

Cannot install Azure Functions Extension

分類Dev

Validating Azure Functions CRUD operations

分類Dev

Headless browser in Azure functions JavaScript?

分類Dev

Azure functions & HTTP OPTIONS request

分類Dev

Need clarification on the Azure Functions ecosystem

分類Dev

Serverless architecture - Azure functions @edge

分類Dev

Global exception handler for Azure Functions

分類Dev

Install Python modules in Azure Functions

Related 関連記事

ホットタグ

アーカイブ