Discovering Microsoft Azure - Documentation for Bmc Discovery Content Reference

Microsoft Azure is a cloud service provided by Microsoft. Microsoft Azure enables you to have virtualized computing platforms accessible through the internet. It is divided into a number of regulatory domains around the world so that organizations can store and manage data in countries with particular regulations regarding data in compliance with local laws. 

The model for Cloud Regions and Cloud Services is segregated by account. If you discover more than one AWS Account, more than one Azure Subscription or more than one GCP Project, all the data from Cloud Region through to individual nodes within services will be clearly separated, where before it was intermingled. As a result, the keys of all CloudRegion and CloudService nodes, and many contained nodes will change, even if you only discover a single account. If you synchronize to a CMDB, the identities of the corresponding CIs will also change.

The existing nodes are not deleted automatically with the application of the TKU. To remove the old nodes from the BMC Helix Discovery model, you can delete the patterns that were deactivated by the new patterns in the TKU. However, the old CIs in the CMDB will not be deleted automatically. The simplest way to remove them is to perform a resynchronization.

Services and regulatory domains discovered

You can access and configure all your services in the Azure Public cloud using the Microsoft Azure portal and the other clouds using the appropriate portals.

The following regulatory domains can be discovered with the latest product content update:

  • Azure China 21Vianet
  • Azure France
  • Azure Germany
  • Azure GovCloud
  • Azure Public

BMC Helix Discovery enables you to discover your cloud services running in Microsoft Azure. The following set of Microsoft Azure services can be discovered with the latest product content update:

More detailed information on the discovery of Microsoft Azure services is contained in the following documentation:

BMC Helix Discovery enables you to discover your cloud services running in these regions. To do so, you must provide an application ID and authentication key (credential) with which BMC Helix Discovery can access the cloud, you create the access key using the Microsoft Azure portal or the Microsoft Azure Germany portal.

Creating a credential

Creating a credential is a two stage process. In the Microsoft Azure Portal you obtain a Directory ID, Application ID, and authentication key. Then in BMC Helix Discovery, you use this information to add the cloud discovery credential. These two steps are mandatory for setting the Microsoft Azure discovery. 

Finding the Directory ID, Application ID and Authentication Key in the Microsoft Azure Portal

The procedure is outlined here, though the steps to do this are described fully on this Microsoft Azure web page.

  1. Use the Microsoft Azure Portal to find a Directory ID for your Microsoft Azure account.
    1. Directory ID—find the Directory ID for your Microsoft Azure account under Azure Active Directory>Properties in the Microsoft Azure Portal.
      The Directory ID is a GUID, also known as the Tenant ID.
  2. Find the Application ID and Authentication Key.
    1. Continuing in the Microsoft Azure Portal, add an "App registration" for your BMC Helix Discovery appliance in the Azure Active Directory>App registrations section. You must provide a name, for example, "BMC Discovery", an application type, "Web app / API", and a sign-on URL for the appliance. The URL is mandatory, but is not used. Once you have created the application registration for BMC Helix Discovery, obtain the following information for the application.
    2. Application ID–It is shown in the Properties for the application in Azure Active Directory > App registrations in the Microsoft Azure Portal.  The Application ID is a GUID. Ensure that you select the Application ID and not the Object ID.
    3. Application Key–Create the Application Key (press +New client secret) in the Certificates & secrets for the application in Azure Active Directory>App registrations in the Microsoft Azure Portal. You can only copy the key when creating it, so keep it safe.

      Note

      If you lose the Application Key, you cannot retrieve it from the Microsoft Azure Portal. You must create a new application key and use the new key in the BMC Helix Discovery cloud credential. It would help if you kept a note of the application key until you have successfully tested the cloud credential.

Assigning the required permissions for the BMC Helix Discovery application registration in the Microsoft Azure Portal

The built-in Reader the role is sufficient to discover everything except size and encryption (D@RE) values for VHDs used by VMs. To discover size and encryption (D@RE) values for VHDs used by VMs, you need the  permission. If you only need to discover Managed Disks, the built-in Reader role is sufficient.

Grant the application permissions (roles) to your subscriptions.

  1. Under More services > Subscriptions, select Access Control (IAM).
  2. In the Role Assignments, click +Add and select Add role assignments from the drop-down list.
  3. From the Role drop-down list, select Reader.
  4. From the Select drop-down list, choose your newly created application.


  5. For each additional Subscription you want to be discovered, navigate to More services>Subscriptions, choose the needed subscription, and repeat steps 1-4.

Note

BMC Helix Discovery will not be able to discover resources in the target subscriptions without permission granted to your application.

When the main configuration is done, you can set the optional settings.

Discovering Microsoft Azure storage (Optional)

If you need to discover Microsoft Azure storage, you also need to grant the a role for a complete discovery of Azure Storage. You do not need this permission if you are only using managed disks. A JSON template is available here, which is used with the Microsoft Azure command line tools to create a Discovery role that gives the correct permissions. Custom roles are described in the Microsoft Azure documentation. Click the link below to download the JSON template:

BMC Helix Discovery (on-premises) customers can also download the JSON template from the Manage>Discovery Tools page.

  1. Edit the JSON file to set the subscription scope. Add your subscription id in the field <SUBSCRIPTION ID HERE>.
  2. Rename the template file to azure_discovery_role.json.
  3. Run the following command, depending on your Azure cli version:

    az role definition create --role-definition <PATH>azure_discovery_role.json

    or
    az role create --config <PATH>azure_discovery_role.json
  4. Ensure the role is created and appears in the Azure Portal roles list.
  5. Assign a recently created custom 'Discovery' role to the application registration you used for BMC Helix Discovery. 

Creating an Azure cloud credential in BMC Helix Discovery

Create the Azure cloud credential in the same way as any other credential. The Azure cloud credential uses the Directory ID, Application ID, and Application Key as the equivalent of a username and password combination.

  1. From the BMC Helix Discovery Device Credentials page, click Add.
    The Add Credential page is displayed.
  2. Click add more to add the cloud provider type. Select Microsoft Azure from the drop-down list.
  3. Add the usual credential information:
    • Label
    • Description
  4. Add the additional fields with the information that you copied from the Microsoft Azure Portal:
    1. Directory ID
    2. Application ID
    3. Application Key
    4. CyberArk–If the CyberArk integration is enabled, do not enter a key ID and secret, rather, enter a CyberArk search string in this field to extract a CyberArk credential. An example search string is:
      Object=Cloud Service-Azure-keys-fc2636b7-426d-42df-a13f-f45b903bd40a
      See Integrating with CyberArk Enterprise Password Vault for more information on the integration.

      Note

      The Directory ID and Application ID are both GUIDs, 32 hex digits grouped 8-4-4-4-12. They are easy to transpose; if you do so, your credential will never work, and the problem will be difficult to diagnose.

  5. Optionally specify a proxy to use to access. To use a proxy you must specify the following:
    • Hostname
    • Port
    • Username (only for authenticating proxies)
    • Password (only for authenticating proxies)
  6. 'TLS Certificate Check' option can be disabled if your proxy uses self-signed certificates. 

    Warning

    If you disable the certificate check, your credentials could be intercepted by a man-in-the-middle attack.

  7. Click Apply.

Testing the credential

Once you have created the credential, you should test it to ensure it works.

  1. From the credentials page, click Devices.

  2. Filter the list to show cloud credentials.
  3. Click Actions for the Microsoft Azure cloud credential you added, and then click Test.
  4. Select Microsoft Azure from the list.
  5. For the Regulatory Domain, select Azure Public or Azure Germany.
  6. Click Test.
    The screen below shows a successful test.

If the credential test was unsuccessful, ensure you copied the Directory ID and Application ID correctly.

Note

The BMC Helix Discovery appliance must be able to access Microsoft Azure using https (port 443).

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest