Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Azure AD" references to "Microsoft Entra ID" #3873

Merged
merged 30 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e7f8564
rename Azure AD to Microsoft Entra Workforce ID
wojciechcloudkubed Mar 13, 2024
8fc130a
update Azure Active Directory to Microsoft Entra Workforce ID
wojciechcloudkubed Mar 15, 2024
4ba9df7
replace
wojciechcloudkubed Mar 15, 2024
3900ef7
update version
wojciechcloudkubed Mar 18, 2024
5879f21
change stale version
wojciechcloudkubed Mar 18, 2024
7fd193b
update from stale
wojciechcloudkubed Mar 18, 2024
efc350e
update version
wojciechcloudkubed Mar 18, 2024
1f2a1d7
update readme
wojciechcloudkubed Mar 19, 2024
fb833ee
Microsoft Entra Workforce ID -> Microsoft Entra ID
wojciechcloudkubed Mar 19, 2024
805cafa
AAD -> Microsoft Entra ID
wojciechcloudkubed Mar 19, 2024
5dd6d5c
Delete .devcontainer/devcontainer.json
wojciechcloudkubed Mar 22, 2024
79b8bd9
Revert "Delete .devcontainer/devcontainer.json"
wojciechcloudkubed Mar 22, 2024
41f9e61
revert code changes
wojciechcloudkubed Mar 22, 2024
c3d32d0
remove double names
wojciechcloudkubed Mar 25, 2024
e4255a8
update version
wojciechcloudkubed Mar 25, 2024
90bccc3
go back version
wojciechcloudkubed Mar 25, 2024
a59b06b
api update version
wojciechcloudkubed Mar 26, 2024
f4ec8ab
revert for linting
wojciechcloudkubed Mar 26, 2024
24661ba
revert test linting
wojciechcloudkubed Mar 26, 2024
637e6c6
fix linting
wojciechcloudkubed Apr 3, 2024
8900c92
roll back linting
wojciechcloudkubed Apr 3, 2024
9049259
increase line length
wojciechcloudkubed Apr 3, 2024
1c1f3ba
fix linting
wojciechcloudkubed Apr 3, 2024
3c7b80e
fix formatting
wojciechcloudkubed Apr 3, 2024
a493670
fix lintin 3
wojciechcloudkubed Apr 3, 2024
3943c6f
Merge branch 'main' into hotfix/MAT-32
tim-allen-ck Apr 5, 2024
61217d6
Merge branch 'main' into hotfix/MAT-32
tim-allen-ck Apr 8, 2024
9e19f84
Merge branch 'main' into hotfix/MAT-32
tim-allen-ck Apr 11, 2024
ba93552
update urls
tim-allen-ck Apr 11, 2024
80d829b
update aad urls
tim-allen-ck Apr 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Core features include:
- Self-service provisioning of research tooling for research teams
- Package and repository mirroring - PyPi, R-CRAN, Apt and more.
- Extensible architecture - build your own service templates as required
- Azure Active Directory integration
- Microsoft Entra ID integration
- Airlock - import and export
- Cost reporting
- Ready to workspace templates including:
Expand Down
4 changes: 2 additions & 2 deletions api_app/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
# LOGGING_LEVEL can be set to DEBUG, INFO, WARNING, ERROR or CRITICAL
LOGGING_LEVEL="INFO"

# OAUTH information - client ids etc. for the AAD Apps
# OAUTH information - client ids etc. for the Microsoft Entra ID Apps
# ----------------------------------------------------
# The AppId for the API service principal (TRE API)
API_CLIENT_ID=__CHANGE_ME__
# The Client secret fo the TRE API application
API_CLIENT_SECRET=__CHANGE_ME__
# The AppId for the Swagger service principal (TRE Swagger UI)
SWAGGER_UI_CLIENT_ID=__CHANGE_ME__
# The Azure AD tenant
# The Microsoft Entra Workforce tenant
AAD_TENANT_ID=__CHANGE_ME__

# API parameters
Expand Down
2 changes: 1 addition & 1 deletion api_app/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.18.5"
__version__ = "0.18.6"
2 changes: 1 addition & 1 deletion core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.6"
__version__ = "0.9.7"
2 changes: 1 addition & 1 deletion docs/azure-tre-overview/airlock.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Whenever the airlock process changes to a state of **Draft**, **Submitted**, **A
When the state changes to `In-progress` the Workspace Owner (Airlock Manager) gets notified.

> * The Notification mechanism is also data-driven, allowing an organization to extend the notifications behavior. The mechanism is exemplified with a Logic App determining the notifications logic.
> * Notifications will work with All TRE users being AAD users (guests or not), with email defined – if not, notifications will not be sent.
> * Notifications will work with All TRE users being Microsoft Entra ID users (guests or not), with email defined – if not, notifications will not be sent.

## Architecture

Expand Down
2 changes: 1 addition & 1 deletion docs/azure-tre-overview/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All traffic has to be explicitly allowed by the Application Gateway or the Firew

[![Architecture overview](../assets/archtecture-overview.png)](../assets/archtecture-overview.png)

The Azure resources outside the network boundries of the Azure TRE are Azure Active Directory, Microsoft Graph and TRE Management. TRE Management are resources used during deployment.
The Azure resources outside the network boundries of the Azure TRE are Microsoft Entra ID, Microsoft Graph and TRE Management. TRE Management are resources used during deployment.

The Azure TRE core plane consists of two groups of components:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Core features include:
- Self-service for research teams – research tooling creation and administration
- Package and repository mirroring
- Extensible architecture - build your own service templates as required
- Azure Active Directory integration
- Microsoft Entra ID integration
- Airlock
- Cost reporting
- Ready to workspace templates including:
Expand Down
42 changes: 21 additions & 21 deletions docs/tre-admins/auth.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Introduction to Authentication and Authorization

[Azure Active Directory (AAD)](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-whatis) is the backbone of Authentication and Authorization in the Trusted Research Environment. AAD holds the identities of all the TRE/workspace users, including administrators, and connects the identities with applications which define the permissions for each user role.
[Microsoft Entra ID](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-whatis) is the backbone of Authentication and Authorization in the Trusted Research Environment. Microsoft Entra ID holds the identities of all the TRE/workspace users, including administrators, and connects the identities with applications which define the permissions for each user role.

It is common that the Azure Administrator is not necessarily the Azure Active Directory Administrator. Due to this, this step may have to be carried out by a different individual/team. We have automated this into a simple command, but should you wish, you can run these steps manually.
It is common that the Azure Administrator is not necessarily the Microsoft Entra ID Administrator. Due to this, this step may have to be carried out by a different individual/team. We have automated this into a simple command, but should you wish, you can run these steps manually.

This page describes the automated Auth setup for TRE.

## Pre-requisites
The automation utilises a `make` command, which reads a few environment variables and creates the AAD assets. The following values are needed to be in place before you run the creation process. (`/config.yaml`)
The automation utilises a `make` command, which reads a few environment variables and creates the Microsoft Entra ID assets. The following values are needed to be in place before you run the creation process. (`/config.yaml`)

| Key | Description |
| ----------- | ----------- |
|TRE_ID|This is used to build up the name of the identities|
|AAD_TENANT_ID|The tenant id of where your AAD identities will be placed. This can be different to the tenant where your Azure resources are created.|
| LOCATION | Where your Azure assets will be provisioned (eg. westeurope). This is used to add a redirect URI from the Swagger UI to the API Application.
|AUTO_WORKSPACE_APP_REGISTRATION| Default of `false`. Setting this to true grants the `Application.ReadWrite.All` and `Directory.Read.All` permission to the *Application Admin* identity. This identity is used to manage other AAD applications that it owns, e.g. Workspaces. If you do not set this, the identity will have `Application.ReadWrite.OwnedBy`. Further information can be found [here](./identities/application_admin.md).
|AUTO_WORKSPACE_GROUP_CREATION| Default of `false`. Setting this to true grants the `Group.ReadWrite.All` permission to the *Application Admin* identity. This identity can then create security groups aligned to each applciation role. Active Directory licencing implications need to be considered as Group assignment is a [premium feature](https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles#roles-using-azure-ad-app-roles).
|AAD_TENANT_ID|The tenant id of where your Microsoft Entra ID identities will be placed. This can be different to the tenant where your Azure resources are created.|
| LOCATION | Where your Azure assets will be provisioned (eg. westeurope). This is used to add a redirect URI from the Swagger UI to the API Application.|
|AUTO_WORKSPACE_APP_REGISTRATION| Default of `false`. Setting this to true grants the `Application.ReadWrite.All` and `Directory.Read.All` permission to the *Application Admin* identity. This identity is used to manage other Microsoft Entra ID applications that it owns, e.g. Workspaces. If you do not set this, the identity will have `Application.ReadWrite.OwnedBy`. Further information can be found [here](./identities/application_admin.md).|
|AUTO_WORKSPACE_GROUP_CREATION| Default of `false`. Setting this to true grants the `Group.ReadWrite.All` permission to the *Application Admin* identity. This identity can then create security groups aligned to each applciation role. Microsoft Entra ID licencing implications need to be considered as Group assignment is a [premium feature](https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles#roles-using-azure-ad-app-roles).|

## Create Authentication assets
You can build all of the Identity assets by running the following at the command line
Expand All @@ -28,8 +28,8 @@ The contents of your authentication section in `config.yaml` file should contain

| Variable | Description |
| -------- | ----------- |
| `APPLICATION_ADMIN_CLIENT_ID`| This client will administer AAD Applications for TRE |
| `APPLICATION_ADMIN_CLIENT_SECRET`| This client will administer AAD Applications for TRE |
| `APPLICATION_ADMIN_CLIENT_ID`| This client will administer Microsoft Entra ID Applications for TRE |
| `APPLICATION_ADMIN_CLIENT_SECRET`| This client will administer Microsoft Entra ID Applications for TRE |
| `TEST_ACCOUNT_CLIENT_ID`| This will be created by default, but can be disabled by editing `/devops/scripts/create_aad_assets.sh`. This is the user that will run the tests for you |
| `TEST_ACCOUNT_CLIENT_SECRET` | This will be created by default, but can be disabled by editing `/devops/scripts/create_aad_assets.sh`. This is the user that will run the tests for you |
| `API_CLIENT_ID` | API application (client) ID. |
Expand All @@ -38,16 +38,16 @@ The contents of your authentication section in `config.yaml` file should contain
| `WORKSPACE_API_CLIENT_ID` | Each workspace is secured behind it's own AD Application|
| `WORKSPACE_API_CLIENT_SECRET` | Each workspace is secured behind it's own AD Application. This is the secret for that application.|

### Using a separate Azure Active Directory tenant
### Using a separate Microsoft Entra ID tenant

!!! caution
This section is only relevant it you are setting up a separate Azure Active Directory tenant for use.
This is only recommended for development environments when you don't have the required permissions to register applications in Azure Active Directory.
Using a separate Azure Active Directory tenant will prevent you from using certain Azure Active Directory integrated services.
For production deployments, work with your Azure Active Directory administrator to perform the required registration
This section is only relevant it you are setting up a separate Microsoft Entra ID tenant for use.
This is only recommended for development environments when you don't have the required permissions to register applications in Microsoft Entra ID.
Using a separate Microsoft Entra ID tenant will prevent you from using certain Microsoft Entra ID integrated services.
For production deployments, work with your Microsoft Entra ID administrator to perform the required registration

1. Create an Azure Active Directory tenant
To create a new Azure Active Directory tenant, [follow the steps here](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant)
1. Create an Microsoft Entra ID tenant
To create a new Microsoft Entra ID tenant, [follow the steps here](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant)

1. Follow the steps outlined above. `make auth` should logon to the correct tenant. Make sure you logon back to the correct tenant before running `make all`.

Expand All @@ -56,23 +56,23 @@ The contents of your authentication section in `config.yaml` file should contain

App registrations (represented by service principals) define the various access permissions to the TRE system. There are a total of five main Applications of interest.

| AAD Application | Description |
| Microsoft Entra ID Application | Description |
| ----------- | ----------- |
| TRE API application | This is the main application and used to secure access to the [TRE API](../tre-developers/api.md). |
| TRE UX | This is the client application that will authenticate to the TRE/Workspace APIs. |
| Application Admin | There are times when workspace services need to update the AAD Application. For example, Guacamole needs to add a redirect URI to the Workspace AAD Application. This identity is used to manage AAD Applications.
| Application Admin | There are times when workspace services need to update the Microsoft Entra ID Application. For example, Guacamole needs to add a redirect URI to the Workspace Microsoft Entra ID Application. This identity is used to manage Microsoft Entra ID Applications. |
| Automation App | This application is created so that you can run the tests or any CI/CD capability without the need to divulge a user password. This is particularly important if your tenant is MFA enabled. |
| Workspace API | Typically you would have an application securing one or more workspaces that are created by TRE. |

Some of the applications require **admin consent** to allow them to validate users against the AAD. Check the Microsoft Docs on [Configure the admin consent workflow](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-admin-consent-workflow) on how to request admin consent and handle admin consent requests.
Some of the applications require **admin consent** to allow them to validate users against the Microsoft Entra ID. Check the Microsoft Docs on [Configure the admin consent workflow](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-admin-consent-workflow) on how to request admin consent and handle admin consent requests.

We strongly recommend that you use `make auth` to create the AAD assets as this has been tested extensively. Should you wish to create these manually via the [Azure Portal](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app); more information can be found [here](./identities/auth-manual.md).
We strongly recommend that you use `make auth` to create the Microsoft Entra ID assets as this has been tested extensively. Should you wish to create these manually via the [Azure Portal](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app); more information can be found [here](./identities/auth-manual.md).

### Enabling users

For a user to gain access to the system, they have to:

1. Have an identity in Azure AD
1. Have an identity in Microsoft Entra ID
1. Be linked with an app registration and assigned a role

When these requirements are met, the user can sign-in using their credentials and use their privileges to use the API, login to workspace environment etc. based on their specific roles.
Expand Down
6 changes: 3 additions & 3 deletions docs/tre-admins/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
| `ARM_SUBSCRIPTION_ID` | *Optional for manual deployment. If not specified the `az cli` selected subscription will be used.* The Azure subscription ID for all resources. |
| `ARM_CLIENT_ID` | *Optional for manual deployment without logged-in credentials.* The client whose azure identity will be used to deploy the solution. |
| `ARM_CLIENT_SECRET` | *Optional for manual deployment without logged-in credentials.* The password of the client defined in `ARM_CLIENT_ID`. |
| `ARM_TENANT_ID` | *Optional for manual deployment. If not specified the `az cli` selected subscription will be used.* The AAD tenant of the client defined in `ARM_CLIENT_ID`. |
| `ARM_TENANT_ID` | *Optional for manual deployment. If not specified the `az cli` selected subscription will be used.* The Microsoft Entra ID tenant of the client defined in `ARM_CLIENT_ID`. |

## For Azure TRE instance in `/config.yaml`

Expand Down Expand Up @@ -43,8 +43,8 @@

| Variable | Description |
| -------- | ----------- |
| `APPLICATION_ADMIN_CLIENT_ID`| This client will administer AAD Applications for TRE |
| `APPLICATION_ADMIN_CLIENT_SECRET`| This client will administer AAD Applications for TRE |
| `APPLICATION_ADMIN_CLIENT_ID`| This client will administer Microsoft Entra ID Applications for TRE |
| `APPLICATION_ADMIN_CLIENT_SECRET`| This client will administer Microsoft Entra ID Applications for TRE |
| `TEST_ACCOUNT_CLIENT_ID`| This will be created by default, but can be disabled by editing `/devops/scripts/create_aad_assets.sh`. This is the user that will run the tests for you |
| `TEST_ACCOUNT_CLIENT_SECRET` | This will be created by default, but can be disabled by editing `/devops/scripts/create_aad_assets.sh`. This is the user that will run the tests for you |
| `API_CLIENT_ID` | API application (client) ID. |
Expand Down
8 changes: 4 additions & 4 deletions docs/tre-admins/identities/api.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# The API Identity

## Name
The API Identity is typically called `<TRE_ID> API` within the AAD Portal.
The API Identity is typically called `<TRE_ID> API` within the Microsoft Entra ID Portal.

## Purpose
This identity's credentials are stored in the `core` Key Vault and mandatory for the running of the Trusted Research Environment (TRE). It is required for the API Application, hosted in Azure App Service, to authenticate to Azure Active Directory and authorize the various operations.
This identity's credentials are stored in the `core` Key Vault and mandatory for the running of the Trusted Research Environment (TRE). It is required for the API Application, hosted in Azure App Service, to authenticate to Microsoft Entra ID and authorize the various operations.

## Application Roles

Expand Down Expand Up @@ -49,7 +49,7 @@ Below is a sample where `TRE_ID` has value `mytre`:
| -------- | ----------- |
| `--name` | The prefix of the name of the app registrations. `TRE` will give you `TRE API`. |
| `--tre-url` | Used to construct auth redirection URLs for the UI and Swagger app. Use the values of the [environment variables](../environment-variables.md) `TRE_ID` and `LOCATION` in the URL. Reply URL for the localhost, `http://localhost:8000/api/docs/oauth2-redirect`, will be added by default. |
| `--admin-consent` | Grants admin consent for the app registrations. This is required for them to function properly, but requires AAD admin privileges. |
| `--admin-consent` | Grants admin consent for the app registrations. This is required for them to function properly, but requires Microsoft Entra ID admin privileges. |
| `--automation-clientid` | This is an optional parameter but will grant TREAdmin permission to the Service Principal of the Automation Admin.|
| `--reset-password` | Optional, default is 0. When run in a headless fashion, 1 is passed in to always reset the password. |

Expand All @@ -60,7 +60,7 @@ Below is a sample where `TRE_ID` has value `mytre`:

You can create an automation account which will aid your development flow, if you don't want to do this you can omit the `--automation-clientid` switch.

You can run the script without the `--admin-consent` and ask your admin to grant consent. If you don't have permissions and just want to create a development environment then skip this step and see the steps in the "Using a separate Azure Active Directory tenant) below.
You can run the script without the `--admin-consent` and ask your admin to grant consent. If you don't have permissions and just want to create a development environment then skip this step and see the steps in the "Using a separate Microsoft Entra ID tenant) below.

## Environment Variables
| Variable | Description | Location |
Expand Down
Loading
Loading