Provision Devices Over the Internet with Azure

Provision and Azure you can build devices over the internet starting from a USB boot device and placing the Provision infrastructure behind Entra ID authentication.

There is often a need to (re)build devices away from the corporate network, where there is no local office or corporate network connection. By using Azure and Entra services you can build (including joining to the corporate active directory) over the internet without having a direct connection to the corporate network.

This example in this article allows the following:

  • A device to be booted from a Provision USB drive

  • An authentication challenge to take place against Entra ID (including any configured MFA)

  • Selection and configuration of Provision bundle

  • Deployment of the bundle including the Tanium client, allowing the build to be completed including third party applications in the usual way.

Reference architecture

In this example the following configuration is used:

  • Provision endpoint located in the corporate network

  • Entra ID application proxy deployed and configured to provide authenticated access to the Provision endpoint

  • Azure blob storage for content distribution

  • Application registration in Entra ID, used for authentication challenge

Building the configuration

You should have a working Provision deployment in place before implementing this configuration. See Provision Quick Start: Install, Configure, and Test to help you build a Provision endpoint, configure active directory join, create a bundle and test the configuration.

Application registration

To authenticate users using Entra ID (including federated identity providers configured in an Entra ID tenant), create an application in Entra ID and grant it the necessary rights for this activity.

To create an application registration that can be used to authenticate users to the Provision service complete the following steps:

  1. Navigate to https://entra.microsoft.com and sign in with an account that has the ability to create enterprise applications.

  2. In the left hand navigation bar select Applications > App registrations


    A white background with black text AI-generated content may be incorrect.
  1. Select New registration in the menu bar at the top of the page

  2. Complete the form as follows:

    1. Name – Descriptive name for the application, for example Tanium Provision App registration

    2. Who can use this application or access this API? Accounts in this organizational directory only.

    3. Redirect URI.

      1. Platform: Single-page application (SPA)

      2. URI: http://localhost:8888/auth-azure.html


        A screenshot of a computer AI-generated content may be incorrect.
  3. Click Register.

  4. Select API Permissions in the left hand menu bar.


    Tanium Provision over the
  5. Click Add a permission.

  6. Select Azure Storage.


    Tanium Provision over the
  7. Select the user_impersonation option and click Add permissions.


    Tanium Provision over the
  8. Click Grant admin consent for <Tenant name> and confirm.


    Tanium Provision over the
  9. Select the overview link in the left hand menu and copy the Application ID for later use.


    A screenshot of a computer AI-generated content may be incorrect.
  10. Select the Home button in the upper left hand corner, copy the Tenant ID for later use.


    A screenshot of a computer AI-generated content may be incorrect.

    The application registration is now completed and ready for use with Provision.

DNS

The Provision endpoint must have a reliable DNS entry that can be resolved internally by the endpoint which is going to run the Entra ID application proxy (it is not supported to configure a connection in the application proxy using an IP address), if this is not already in place create one before progressing further.

Entra ID application proxy

The Entra ID application proxy (https://learn.microsoft.com/en-us/entra/identity/app-proxy/overview-what-is-app-proxy) is a service provided to organisations which have at least an Entra ID P1 license. It allows internal services to be made available to the internet without the need to expose them directly to the internet, an agent is deployed within your corporate network which forms an outbound connection to Entra, once configured internal applications can be made externally available through this connection, additionally authentication can be implemented using Entra ID, before any access to the internal service is provided.

If you do not already have a connector setup, follow these instructions to download and install the connector on a device which is both able to reach the Entra ID service (proxy servers are supported) and the Provision endpoint: https://learn.microsoft.com/en-us/entra/identity/domain-services/deploy-azure-app-proxy.

Once the connector is configured and working the application proxy can be configured for the Provision , to do this follow these steps:

  1. Navigate to https://entra.microsoft.com and sign in with an account that has the ability to create enterprise applications.

  2. In the left hand navigation bar select Applications > Enterprise applications.


    Tanium Provision over the
  3. Select New application in the menu bar at the top of the page.


    Tanium Provision over the
  4. On the page displayed choose the Add an on-premises application option.


    A screenshot of a computer application AI-generated content may be incorrect.
  5. Complete the form as follows:

    1. Name – Display name for the application, for example Provision App Proxy.

    2. Internal URL – the internal URL for the Provision endpoint (this must be a DNS name) and by default is listening on port 17530. The default, self signed certificate can be used in this configuration. For example https://provision.corp.com:17530.

    3. External URL – this is created automatically based on the name provided, this can be changed if required, in this example https://provisionappproxy-rmbt.msappproxy.net.

    4. Pre Authentication – Microsoft Entra ID, this setting enforces authentication before access to the service is allowed.

    5. Connector group – Select the group created when installing and configuring the connector.

    6. Select the Advanced tab, ensure Backend application timeout is set to default, Http-only cookie, Translate URLs in application body and Validate backend SSL certificate are de-selected and Use persistent cookie and Translate URLs in headers are selected.

    7. Click create.


      A screenshot of a computer AI-generated content may be incorrect.

      A screenshot of a computer AI-generated content may be incorrect.
  6. Now that the application proxy has been created, navigate to Users and Groups within the application proxy configuration, click the ‘Add user/group’ button and add any user accounts which should be able to be used to build a device using the application proxy, likely a single account for testing at this point, with the ability to add more later as needed.

    The application proxy is now configured ready for use with Provision.

Azure blob storage

Azure blob storage is a low cost storage option available as part of Azure, it is ideal for serving files over HTTP, and can use authentication. While it is possible to use the App proxy to serve bundle content to machines being built the service is not designed for that type of use and limits are likely to be hit, the connection speed available also makes it unsuitable for use in this way. Serving bundle content from Azure blob storage with configuration, signalling and domain join workloads being provided by the proxy is the recommended approach for remote builds.

Azure blob storage does have a cost associated with it, albeit low and likely insignificant for the intended use with Provision, however you should use the costs estimator to understand the likely costs for your use case.

To create the storage required for this example complete the following steps:

  1. Navigate to https://portal.azure.com and sign in with an account that has the ability to create and manage storage accounts and containers.

  2. Select Create a resource from the menu buttons at the top of the page.


    Tanium Provision over the

    Select Storage from the list of categories shown on the left.


    Tanium Provision over the
  3. Select Storage account from the list shown.


    Tanium Provision over the
  4. Complete the form as follows:

    1. Subscription – select an appropriate subscription for the storage to be created in.

    2. Resource group - select an appropriate resource group for the storage to be created in.

    3. Storage account name – name for the storage account.

    4. Region – select a region to locate the storage in, different regions have different costs, a region close to the devices you’re building may result in faster speeds.

    5. Primary service – Azure blob storage or Azure Data Lake Storage Gen 2.

    6. Performance – Standard.

    7. Redundancy – Locally-redundant storage (LRS).

    8. Click review + create.

    9. Click create.


      A screenshot of a computer AI-generated content may be incorrect.
  5. Expand Data storage on the left, and then Containers.

  6. Click + Container.


    Tanium Provision over the
  7. Provide a name for the container and ensure Anonymous access level is set to private, click create.


    Tanium Provision over the
  8. To control the user accounts which can upload content to the container (likely an administrator who is managing Provision) and which users can download content (this should be the same as those configured for the App proxy previously created) click into the newly created container and select Access control (IAM) on the left:


    Tanium Provision over the
  9. Click Role assignments.

  10. Add role assignments for Storage blob reader for any accounts to be used to download content (building devices) and Storage blob contributor for any accounts to be used to upload content to the container.


    A white background with black text AI-generated content may be incorrect.
  11. Once all required permissions have been added expand Settings on the left menu and then Properties, copy the URL displayed and store for later use.


    A screenshot of a computer AI-generated content may be incorrect.

The storage blob container is now configured ready for use with Provision.

Populating Azure blob storage

Now that the Blob storage account has been created it can be populated with Provision bundle content for use by devices being built. To do this the Upload.ps1 script from the utility zip file is required (https://help.tanium.com/bundle/ug_provision_cloud/page/provision/preparing_content.html#download_files).

Launch an administrative PowerShell prompt on the Provision endpoint. Run the script in the following way:

  1. If the machine used does not have the az.storage module available, install it:

    1. Install-Module az.storage

  2. If the machine used does not have the Microsoft.identity.client module available, install it:

    1. Install-Module Microsoft.identity.client

  3. Ensure TLS 1.2 can be used.

     
    1. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

  4. Now run the script to start the process, where the following values should be configured.

     
    1. storageAccountName should be set to the name of the storage account created.

    2. resourceGroupName should be set to the name of the resource group used.

    3. containerName should be set to the name of the storage blob container which was created.

       
      1. .\Upload.ps1 -storageAccountName provisioncontent -resourceGroupName ProvisionBlob -containerName provision.


        Tanium Provision over the
  5. You will be prompted to authenticate via a standard modern authentication dialog.

  6. Once complete you will be prompted to select a subscription.

  7. You will then be prompted to select which bundle(s) to upload, use ctrl + click, then click enter to select which bundles should be uploaded to blob storage.


    A screenshot of a computer program AI-generated content may be incorrect.

    Tanium Provision over the
  8. The script will then upload any missing or changed files to blob storage.


    A blue screen with white text AI-generated content may be incorrect.

The storage blob container is now populated with content ready for use.

Create the USB boot drive

To boot from the USB drive and consume the application proxy and blob storage  the USBKey.ps1 script should be used with additional parameters, the script is contained in the utility zip file which can be downloaded from the workbench: (https://help.tanium.com/bundle/ug_provision_cloud/page/provision/preparing_content.html#download_files).

Launch an administrative PowerShell prompt on a device which can access the provision endpoint, has a USB drive attached and has the USBKey script available. Run the script in the following way:

  1. Run the script to start the process, where the following values should be configured, note the TaniumSettings attributes are case sensitive and must be configured as shown.

    1. TPXEHost should be set to the address of a provision endpoint to copy content from (it is only used for creation of the USBKey, not during the build of a device).

    2. Destination – the drive letter of the USB drive to build as a provision USB Key.

    3. AnchorHost – the name of the provision app proxy as configured in the external URL (without https://).

    4. AnchorPort – should be set to 443.

    5. ClientId – should be set to the GUID of the application ID from the application registration created.

    6. TenantId - should be set to the GUID of the tenant ID from the application registration created.

    7. AzureBlob – should be set to the URL from the blob storage location captured in the blob storage setup step.

  2. .\USBKey.ps1 -TPXEHost 10.187.1.3 -Destination h: -AnchorHost provisionappproxy-rmbt.msappproxy.net -AnchorPort 443 -TaniumSettings '{"ClientId": "6017423f-1603-44ec-ad5e-115275c31c6c", "TenantId": "0ba18ea5-deaa-4357-8d91-b6b756b7bfc2", "AzureBlob": "https://provisioncontent.blob.core.windows.net/provision"}'

Build process

Now that the USB Key has been built the device can boot from it in the usual way, at the point that the device forms an internet connection a modern authentication dialog will be presented before bundles can be selected, at this point the build continues as normal, with the ODJ portion being proxied through the app proxy connection.