Lesson 3 of 5 Securing Application Platform Services

Securing Azure Logic Apps

This lesson explains who can trigger, edit and view a workflow, and how it connects to other services.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the Logic Apps roles.
  • Compare ways of protecting a trigger.
  • Explain how to protect run history.
  • Explain the risk of workflow edit rights.

What needs protecting

Azure Logic Apps automates workflows across services. A workflow may read mail, update a database and call an API, so it holds considerable access. There are several concerns: who can start a workflow, who can edit it, who can read data in its run history, and how it reaches other systems. The Consumption plan runs in a shared environment, and the Standard plan is single-tenant, with stronger network options.

Access to the workflow

Azure roles control who can manage a logic app. The following table lists them.

PlanRoleAllows
ConsumptionLogic App ContributorManaging logic apps
ConsumptionLogic App OperatorReading, enabling and disabling, but not editing
StandardLogic Apps Standard ReaderViewing workflows and run history
StandardLogic Apps Standard OperatorEnabling, resubmitting and disabling workflows
StandardLogic Apps Standard DeveloperEditing workflows, but not settings such as virtual network integration
StandardLogic Apps Standard ContributorManaging all aspects of a workflow app

A warning applies here. Anyone with Contributor or workflow-editing rights can make a workflow request a bearer token for any audience, using the logic app's managed identity, and tokens last for one hour. Edit rights to a workflow are therefore effectively the rights of its identity, so grant them sparingly.

Match the pairs

Logic Apps Standard roles

Exam skills 3.3.6

Match each Logic Apps Standard role with what it allows.

Log in to try this activity Interactive activities are free with an account.

Protecting triggers

A workflow with a Request trigger has a callback URL that contains a shared access signature. Anyone with that URL can start the workflow, so treat it as a secret. Stronger options are available.

  • IP restrictions limit which addresses can call the trigger.
  • OAuth with Microsoft Entra ID requires a token, through an authorization policy on Consumption.
  • Easy Auth is available on Standard for Request triggers.
  • API Management in front adds validation and throttling.
  • Private endpoints on Standard give private inbound access.

Consumption workflows can disable SAS authentication when OAuth is used, so that the URL alone is not enough. IP restrictions do not block a call through the Azure REST API, or a call through API Management, which is worth remembering when reasoning about what they protect.

Select all that apply

Protecting a Request trigger

Exam skills 3.3.6

Identify the controls that protect a Request trigger.

Log in to try this activity Interactive activities are free with an account.

Protecting run history

Run history records inputs and outputs of each action, and it can therefore expose secrets or personal data to anyone who can read it. There are two controls. Restrict by IP range limits who can view run history content. Secure inputs and outputs is a setting on a trigger or action that hides its data from run history and from logs, and a value hidden in one action is hidden automatically in actions that use it.

Some built-in operations, such as Compose, Parse JSON and Response, do not support all of these options. Sensitive values in a workflow definition should use parameters of type securestring or secureobject, so that they do not appear in the definition or logs.

True or false

Run history

Exam skills 3.3.6

Check how sensitive data in run history is protected.

Log in to try this activity Interactive activities are free with an account.

Connections and identity

Prefer a managed identity for connections to Azure resources, and for calling APIs through the HTTP action with Microsoft Entra authentication. Consumption allows one user-assigned identity, and Standard allows several, although only one is used at a time. Standard workflows can use virtual network integration for outbound traffic to private resources.

Microsoft Sentinel playbooks are logic apps, so all of this applies to them too. A playbook may hold high privileges, so its protection deserves particular care.

Worked example

Sensitive data in run history

A logic app retrieves a secret from Key Vault and calls a partner API. An auditor notices that the secret appears in plain text in run history. Support staff need to see that workflows ran, but not the secret. What should you do?

Turn on Secure outputs on the Key Vault action, and Secure inputs on the action that uses the value, so that it is hidden from run history. Give support staff Logic App Operator, or the Standard Reader role, rather than edit rights, and use a managed identity for the Key Vault connection.

Restricting run history by IP range would limit where it can be viewed, but anyone in that range would still see the secret. Moving the secret into a plain parameter would make matters worse. Deleting run history would remove the evidence that support staff need.

Check yourself

Why is Logic App Operator safer than Contributor for support staff?

Show answer

An Operator can view and enable workflows without editing them. Edit rights can abuse the managed identity.

Exam Tips

Remember for the exam

  • A trigger's callback URL is effectively a secret.
  • Workflow edit rights are effectively the rights of its managed identity.
  • Secure inputs and outputs hide data from run history.
  • Standard offers private endpoints and virtual network integration.