I have an Azure API Management, added a logic app as back end API. Now I want to enable basic authentication for the API Management so that when client will call the logic app url which is protected by API Management need to provide username and password. I am familiar with access restriction policy of API Management , now my question is where and how to set basic authentication credentials in the APIM?
相关问题
- Azure API Management - How to get original IP when
- API management service ClientConnectionFailure at
- Access to API through Azure API Management without
- Manage versioned API in Azure API Manager
- Azure API Management CORS: Why do I get “Headers s
相关文章
- how to get 'code' for getting access_token
- Azure API Management Import API always says: API w
- Azure API Management > CORS and POST
- Azure Functions and Azure Application Gateway or A
- How to use a variable when returning response in p
- API Management Basic Authentication
- Azure的API管理和ASMX / WSDL SOAP端点?(Azure API Manageme
- How Do I Access Active Directory Users/Groups In A
Here is a code snippet to set up basic auth wuth username="someUser" and password="ThePassw0rd"
If I understood your question, you can set the policy in: Apis -> All Apis or specifc -> Design -> Inbound processing -> Code View. Inside policies/inbound you can insert:
authentication-basic username="username" password="password"
See more in: https://docs.microsoft.com/en-us/azure/api-management/api-management-authentication-policies#Basic
You can use below code snippet https://github.com/Azure/api-management-policy-snippets/blob/master/examples/Perform%20basic%20authentication.policy.xml
And incase you want to store password to keyvault you can use below policy instead of above
Hope this helps
I am able to solve this , I have added a access restriction policy for basic authentication and put a credentials in the policy.
Sample Policy
Basic B64Credentials