This is what azure virtual networks (vnets ) are for.
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I'm building the backend of a mobile app on Azure, I was thinking to use Function apps in conjunction with ASP.NET Core 3.1 Web Api. I need to do the following
Is it possible to accomplish the part where I want the POST method visible to the Function app?
This is what azure virtual networks (vnets ) are for.
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview
@erotavlas , you server (web-api) needs to demand some sort of secret/claim from the client code (Az function).
If you need a quick solution, just hide some secret on both sides of those 2 services (shared key) and make the call using that secret as part of the request. (eg. https://dzone.com/articles/api-key-user-aspnet-web-api).
If you want to do it more advanced, then a Managed Identity for the Az Function and an authorization to call that API/scope should be the way to go. Create a different scope for the mobile app, and another for the backend calls (Az Function). This is the way to go if you are already using or planning to use AzureAD for AuthN+AuthZ in your app/api.
eg.:
managed identities https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?context=%2Fazure%2Factive-directory%2Fmanaged-identities-azure-resources%2Fcontext%2Fmsi-context&tabs=dotnet
webapi scopes https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-protected-web-api-verification-scope-app-roles?tabs=aspnetcore