%3CLINGO-SUB%20id%3D%22lingo-sub-2101782%22%20slang%3D%22en-US%22%3EEvent%20Trigger%20-%20Permission%20and%20RBAC%20setting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2101782%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fdata-factory%2Fhow-to-create-event-trigger%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EEvent%20Trigger%3C%2FA%3E%20in%20Azure%20Data%20Factory%20is%20the%20building%20block%20to%20build%20an%20event-driven%20ETL%2FELT%20architecture%20(%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEvent-driven_architecture%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EEDA%3C%2FA%3E).%20Data%20Factory's%20native%20integration%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Fevent-grid%2F%22%20target%3D%22_self%22%20data-linktype%3D%22external%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Event%20Grid%3C%2FA%3E%26nbsp%3Blet%20you%20trigger%20processing%20pipeline%20based%20upon%20certain%20events.%20Currently%2C%20Event%20Triggers%20support%20events%20with%20%3CSPAN%3EAzure%20Data%20Lake%20Storage%20Gen2%20and%20General%20Purpose%20version%202%20storage%20accounts%2C%20including%20%3CEM%3EBlob%20Created%3C%2FEM%3E%20and%20%3CEM%3EBlob%20Deleted%3C%2FEM%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAs%20with%20any%20architecture%2C%20it's%20sometimes%20critical%20to%20enforce%20Role%20Based%20Access%20Control%20(RBAC)%20to%20ensure%20that%20only%20certain%20members%26nbsp%3Bon%20the%20team%20can%20access%20certain%20sensitive%20information.%20Unauthorized%20access%20to%20listen%20to%2C%20subscribe%20to%20updates%20from%2C%20and%20trigger%20pipelines%20linked%20to%20blob%20accounts%20should%20be%20strictly%20prohibited.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAzure%20Data%20Factory%20make%20it%20really%20easy%20for%20you%20and%20enforce%20the%20following%20rules%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSPAN%3ETo%20successfully%20create%20a%20new%20or%20update%20an%20existing%20Event%20Trigger%2C%20the%20Azure%20account%20signed%20into%20the%20Data%20Factory%20needs%20to%20have%20%3CSTRONG%3Eowner%26nbsp%3B%3C%2FSTRONG%3Eaccess%20to%20the%20relevant%26nbsp%3Bstorage%20account.%20Otherwise%2C%20the%20operation%20with%20fail%20with%20%3CEM%3EAccess%20Denied%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EData%20Factory%20needs%20no%20special%20permission%20to%20your%20Event%20Grid%2C%20and%20you%20do%20%3CSTRONG%3Enot%26nbsp%3B%3C%2FSTRONG%3Eneed%20to%20assign%20special%20RBAC%20permission%20to%20Data%20Factory%20service%20principal%20for%20the%20operation.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIn%20order%20to%20understand%20how%20Azure%20Data%20Factory%20delivers%20the%20two%20promises%2C%20let's%20take%20a%20step%20back%20and%20take%20a%20sneak%20peek%20behind%20the%20scene.%20These%20are%20the%20high%20level%20architecture%20for%20integration%20among%20Data%20Factory%2C%20Storage%2C%20and%20Event%20Grid.%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSPAN%3ECreate%20a%20new%20Event%20Trigger%3C%2FSPAN%3E%3CSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Event%20Trigger%20-%2001%20Create%20Subscription.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F249787iD27A7C587AF17CC4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Event%20Trigger%20-%2001%20Create%20Subscription.png%22%20alt%3D%22Event%20Trigger%20-%2001%20Create%20Subscription.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3ETwo%20noticeable%20callouts%20from%20the%20flows%20are%3A%3C%2FSPAN%3E%3COL%20class%3D%22lia-list-style-type-lower-alpha%22%3E%0A%3CLI%3E%3CSPAN%3EAzure%20Data%20Factory%20makes%20no%20direct%20contact%20with%20Storage%20account.%20Request%20to%20create%20a%20subscription%20is%20instead%20relayed%20and%20processed%20by%20Event%20Grid.%20Hence%2C%20your%20Data%20Factory%20needs%20%3CSTRONG%3Eno%3C%2FSTRONG%3E%20permission%20to%20Storage%20account%20in%20this%20stage%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EAccess%20control%20and%20permission%20checking%20happens%20on%20Azure%20Data%20Factory%20side.%20Before%20ADF%20issues%20a%20request%20to%20subscribe%20to%20Storage%20event%2C%20it%20checks%20the%20permission%20for%20the%20user.%20More%20specifically%2C%20it%20checks%20whether%20the%20Azure%20account%20%3CEM%3Esigned%20in%3C%2FEM%3E%20and%20attempting%20to%20create%20the%20Event%20trigger%20have%26nbsp%3B%3CEM%3Eowner%3C%2FEM%3E%20access%20to%20the%20relevant%20Storage%20account.%20If%20the%20permission%20check%20fails%2C%20trigger%20creation%20also%20fails%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3EStorage%20event%20trigger%20Data%20Factory%20pipeline%20run%3CBR%20%2F%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Event%20Trigger%20-%2002%20Trigger%20Pipeline.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F249796iE41B64B10A821ABD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Event%20Trigger%20-%2002%20Trigger%20Pipeline.png%22%20alt%3D%22Event%20Trigger%20-%2002%20Trigger%20Pipeline.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20it%20comes%20to%20Event%20triggering%20pipeline%20in%20Data%20Factory%2C%20two%20noticeable%20call%20outs%20in%20the%20workflow%3A%3C%2FP%3E%0A%3COL%20class%3D%22lia-list-style-type-lower-alpha%22%3E%0A%3CLI%3EEvent%20Grid%20uses%20a%20Push%20model%20that%20it%20relays%20the%20message%20as%20soon%20as%20possible%20when%20storage%20drops%20the%20message%20into%20the%20system.%20This%20is%20different%20from%20messaging%20system%2C%20such%20as%20Kafka%20where%20a%20Pull%20system%20is%20used.%3C%2FLI%3E%0A%3CLI%3EEvent%20Trigger%20on%20Azure%20Data%20Factory%20serves%20as%20an%20active%20listener%20to%20the%20incoming%20message%20and%20it%20properly%20triggers%20the%20associated%20pipeline.%3C%2FLI%3E%0A%3CLI%3EEvent%20Trigger%20itself%20makes%20no%20direct%20contact%20with%20Storage%20account%3COL%3E%0A%3CLI%3EThat%20said%2C%20if%20you%20have%20a%20Copy%20or%20other%20activity%20inside%20the%20pipeline%20to%20process%20the%20data%20in%20Storage%20account%2C%20Data%20Factory%20will%20make%20direct%20contact%20with%20Storage%2C%20using%20the%20credentials%20stored%20in%20the%20Linked%20Service.%20Please%20ensure%20that%20Linked%20Service%20is%20set%20up%20appropriately%3C%2FLI%3E%0A%3CLI%3EHowever%2C%20if%20you%20make%20no%20reference%20to%20the%20Storage%20account%20in%20the%20pipeline%2C%20you%20do%20not%20need%20to%20grant%20permission%20to%20Data%20Factory%20to%20access%20Storage%20account%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3E%3CBR%20%2F%3EWhat's%20in%20the%20bag%20for%20the%20future%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20team%20is%20currently%20in%20the%20process%20of%20expanding%20functionalities%20for%20Event%20Trigger.%20Soon%2C%20we%20will%20support%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fevent-grid%2Fcustom-event-quickstart%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ECustom%20Event%20in%20Event%20Grid%3C%2FA%3E%26nbsp%3Bto%20give%20customers%20even%20more%20flexibilities%20in%20defining%20the%20Event%20Driven%20Architecture.%20Please%20keep%20an%20eye%20out%20for%20the%20exciting%20announcement%2C%20as%20we%20test%20the%20functionality%20thoroughly%20and%20gradually%20roll%20it%20out%20to%20General%20Availability.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2101782%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fdata-factory%2Fhow-to-create-event-trigger%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EEvent%20Trigger%3C%2FA%3E%20in%20Azure%20Data%20Factory%20is%20the%20building%20block%20to%20build%20an%20event%20driven%20ETL%2FELT%20solution.%20In%20this%20blog%2C%20we%20will%20deep%20dive%20into%20permissions%20settings%20for%20Event%20Trigger%2C%20and%20properly%20understand%20how%20to%20enforce%20access%20control%20in%20this%20architecture.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2101782%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Data%20Factory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20ETL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EBig%20Data%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

Event Trigger in Azure Data Factory is the building block to build an event-driven ETL/ELT architecture (EDA). Data Factory's native integration with Azure Event Grid let you trigger processing pipeline based upon certain events. Currently, Event Triggers support events with Azure Data Lake Storage Gen2 and General Purpose version 2 storage accounts, including Blob Created and Blob Deleted.

 

As with any architecture, it's sometimes critical to enforce Role Based Access Control (RBAC) to ensure that only certain members on the team can access certain sensitive information. Unauthorized access to listen to, subscribe to updates from, and trigger pipelines linked to blob accounts should be strictly prohibited. 

 

Azure Data Factory make it really easy for you and enforce the following rules:

  1. To successfully create a new or update an existing Event Trigger, the Azure account signed into the Data Factory needs to have owner access to the relevant storage account. Otherwise, the operation with fail with Access Denied
  2. Data Factory needs no special permission to your Event Grid, and you do not need to assign special RBAC permission to Data Factory service principal for the operation.

 

In order to understand how Azure Data Factory delivers the two promises, let's take a step back and take a sneak peek behind the scene. These are the high level architecture for integration among Data Factory, Storage, and Event Grid.

  1. Create a new Event Trigger
    Event Trigger - 01 Create Subscription.png
    Two noticeable callouts from the flows are:
    1. Azure Data Factory makes no direct contact with Storage account. Request to create a subscription is instead relayed and processed by Event Grid. Hence, your Data Factory needs no permission to Storage account in this stage
    2. Access control and permission checking happens on Azure Data Factory side. Before ADF issues a request to subscribe to Storage event, it checks the permission for the user. More specifically, it checks whether the Azure account signed in and attempting to create the Event trigger have owner access to the relevant Storage account. If the permission check fails, trigger creation also fails
  2. Storage event trigger Data Factory pipeline run

     

     


    Event Trigger - 02 Trigger Pipeline.png

     

    When it comes to Event triggering pipeline in Data Factory, two noticeable call outs in the workflow:

    1. Event Grid uses a Push model that it relays the message as soon as possible when storage drops the message into the system. This is different from messaging system, such as Kafka where a Pull system is used.
    2. Event Trigger on Azure Data Factory serves as an active listener to the incoming message and it properly triggers the associated pipeline.
    3. Event Trigger itself makes no direct contact with Storage account
      1. That said, if you have a Copy or other activity inside the pipeline to process the data in Storage account, Data Factory will make direct contact with Storage, using the credentials stored in the Linked Service. Please ensure that Linked Service is set up appropriately
      2. However, if you make no reference to the Storage account in the pipeline, you do not need to grant permission to Data Factory to access Storage account


What's in the bag for the future?

The team is currently in the process of expanding functionalities for Event Trigger. Soon, we will support Custom Event in Event Grid to give customers even more flexibilities in defining the Event Driven Architecture. Please keep an eye out for the exciting announcement, as we test the functionality thoroughly and gradually roll it out to General Availability.