Skip to main content

Configuración de mapas interactivos

Puede habilitar la visualización de mapas interactivos en la interfaz web de tu instancia de GitHub Enterprise Server.

¿Quién puede utilizar esta característica?

People with access to the Consola de administración can configure interactive maps.

About interactive maps

You can allow users of your GitHub Enterprise Server instance to create interactive maps using GeoJSON or TopoJSON syntax. For more information about creation of interactive maps, see "Creating diagrams."

To enable interactive maps, you must provide authentication credentials for Azure Maps.

Warning

Authentication with Azure Maps using an API token is sunset in GitHub Enterprise Server 3.11.1 and later. If you upgrade to the latest release of GitHub Enterprise Server on an instance already configured to authenticate with an API token, interactive maps will be disabled. You must reconfigure authentication using role-based access control (RBAC) for an application on a Microsoft Entra ID (previously known as Azure AD) tenant. For more information, see the "Deprecations" section in the release notes.

Prerequisites

The following prerequisites apply if your instance runs GitHub Enterprise Server 3.11.1 or later.

If your instance runs GitHub Enterprise Server 3.11.0, you must provide an API token for Azure Maps instead.

Warning

GitHub does not recommend the use of an Azure Maps API token for authentication. To improve security, upgrade to the latest patch release of GitHub Enterprise Server and reconfigure Azure Maps authentication. After you upgrade, interactive maps will be disabled for your instance until you reconfigure authentication. For more information, see the "Deprecations" section in the release notes.

Generating credentials for Azure Maps

To configure authentication for Azure Maps using RBAC, your instance must run GitHub Enterprise Server 3.11.1 or later.

To generate credentials for Azure Maps, you must create an application for your tenant in Entra ID, provide the application access to an Azure Maps account, and configure role-based access control (RBAC).

  1. Register a new application on your Entra ID tenant. For more information, see Quickstart: Register an application with the Microsoft identity platform on Microsoft Learn.

    • When you specify supported account types, select Accounts in this organizational directory only.
  2. Add a client secret. For more information, see Quickstart: Register an application with the Microsoft identity platform on Microsoft Learn.

  3. Store the value of the secret in a secure location that you can reference when you configure authentication on your GitHub Enterprise Server instance. Entra will never display the value after you leave the page.

  4. Configure access to the secret by Azure Maps.

    1. While viewing the details for the application you configured on your Entra ID tenant, in the left-hand sidebar, click API permissions.
    2. Click Add a permission.
    3. Click Azure Maps.
    4. Select Delegated permissions.
    5. Under "Select permissions", select "user_impersonation".
    6. To save the permissions, click Add permissions.
  5. Sign into an Azure Maps account. If you don't have an account, you can create one. For more information, see the Azure Maps Account website.

  6. Configure RBAC for Azure Maps. For more information, see Authentication with Azure Maps and Assign Azure roles using the Azure portal on Microsoft Learn.

    • On your Entra ID tenant, from Access control (IAM), you must assign the role of "Azure Maps Data Reader" to "User, group, or service principal", select the application you created earlier in these instructions, and complete the form.

Enabling interactive maps

After you create an application on your Entra ID tenant and generate a secret for the use of Azure Maps, you can configure interactive maps on your GitHub Enterprise Server instance.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the "Settings" sidebar, click Privacy and uncheck Privacy mode.

  5. To enable interactive maps, select "Enable GeoJSON rendering".

  6. Generate a 32-character string to use as a secret to prevent cross-site request forgery (CSRF). For example, you can access the administrative shell and use openssl on your GitHub Enterprise Server instance to generate a string. For more information, see "Accessing the administrative shell (SSH)."

    Shell
    openssl rand -hex 32
    

    Store the string in a secure location that you can reference in the next step.

  7. Enter your authentication details for Azure Maps.

  8. Under the "Settings" sidebar, click Save settings.

    Note

    Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  9. Wait for the configuration run to complete.

Disabling interactive maps

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the "Settings" sidebar, click Privacy and uncheck Privacy mode.

  5. To disable interactive maps, deselect "Enable GeoJSON rendering".

  6. Under the "Settings" sidebar, click Save settings.

    Note

    Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  7. Wait for the configuration run to complete.