microsoft / microsoft/AzureTRE

Field "email" is not populated during Airlock Import creation

Open
#3,506 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

airlock bug
Dominant language
Python
Stars
235
Forks
192
Avg merge
1d 23h
Merged PRs (30d)
13

Description

Describe the bug

I'm working with a deployment of AzureTRE and have installed Airlock Notifier. I was reviewing the JSON data used as input for Airlock Notifier. I could check that the structure is populated the following way:

{
  "event_type": "status_changed",
  "recipient_emails_by_role": {
    "workspace_researcher": [
      "researcher_1@domain.com",
      "researcher_2@domain.com",
      ...
      "researcher_N@domain.com"
    ],
    "workspace_owner": [
      "owner_1@domain.com",
      "owner_2@domain.com",
      ...
      "owner_N@domain.com"
    ],
    "airlock_manager": [
      "manager_1@domain.com",
      "manager_2@domain.com",
      ...
      "manager_N@domain.com"
    ]
  },
  "request": {
    "id": "11111111-2222-3333-4444-555555555555",
    "created_when": 1684400625.173648,
    "created_by": {
      "name": "Miguel Dasilva",
      "email": ""
    },
    "updated_when": 1684400746.058016,
    "updated_by": {
      "name": "Airlock Admin User",
      "email": ""
    },
    "request_type": "import",
    "files": [
      {
        "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/random_text_file.txt",
        "size": 0
      }
    ],
    "status": "approved",
    "business_justification": "Testing import"
  },
  "workspace": {
    "id": "kkkkkkkk-2323-5454-7777-1234567890ab",
    "display_name": "My workspace name",
    "description": "My workspace description"
  }
}

Checking the JSON returned, is it not expected that the email fields in created_byand updated_by should store the emails of the given users. I supposed that this email (just like the real name) is stored and retrieved from AAD.

I have been reviewing the code for the Airlock Notifier, and Airlock Processor, but couldn't find the code responsible for generating the JSON data. I could verify that messages are correctly sent through the Service Bus' topics (theses messages are generated by the Airlock Notifier).

Are those fields supposed to be empty? Or should they really store email addresses?

Steps to reproduce

  1. Create an import request
  2. Check the workflow runs for the Logic App responsible for sending notifications

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the Airlock Notifier/Processor path and the Logic App workflow that produces the JSON, then compare created_by and updated_by with the corresponding AAD user data. Confirm whether empty email fields are intended; if not, identify the responsible lookup or serialization point and verify the import-creation notification payload.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.