The firewall identity mapper Docker container (fw-id-mapper)

In this topic, you will learn what the fw-id-mapper Docker container does, its requirements, as well as how to deploy and configure it.

Overview

A user’s IP address changes as they move between Wi-Fi, wired, VPN, hot desk, and DHCP-assigned connections, which makes it difficult or even impossible to apply firewall rules correctly. The fw-id-mapper Docker container tracks these changes and reports them to the firewall, covering authentication, IP changes, DHCP changes, roaming, VPN transitions, disconnects, deauthentication, and session expiration.

The container supports Palo Alto Networks, Fortinet FortiGate, and Check Point firewalls.

The container is available in the public Docker repository as portnox/fw-id-mapper. It has no virtual machine equivalent.

Examples:

  • Policy:

    • Without identity mapping:

      Allow 10.10.20.0/24 to Salesforce

    • With identity mapping:

      Allow Finance users to Salesforce

      Allow Domain Administrators to SSH to servers

  • Log:

    • Without identity mapping:

      10.22.45.18 downloaded malware

    • With identity mapping:

      kosh@vorlon.com downloaded malware

Requirements

  • The container can run on Linux, or on Windows or macOS via Docker Desktop. If running in a VM environment, we recommend Linux for the best results, since Windows and macOS would require double virtualization.

  • The Docker host needs outbound HTTPS (TCP port 443) connectivity to Portnox Cloud and the Portnox firewall integration gateway. Follow the general firewall rules in the following topic: How to set up the firewall for Portnox Docker containers to connect to Portnox Cloud.

  • The Docker host also needs connectivity to each firewall:

    • Palo Alto Networks: HTTPS (TCP 443 by default) to the management interface
    • Fortinet FortiGate: RADIUS accounting (UDP 1813 by default) to the RSSO agent interface
    • Check Point: HTTPS (TCP 443 by default) to the Identity Web API on the gateway
  • You need a Portnox organization ID, a Portnox connector instance ID, and a Portnox connector API key. Portnox Cloud supplies all of these values when you add the integration.

  • Each firewall vendor has its own configuration requirements. For details, see the following section below: Firewall connections.

Deployment

We recommend getting the deployment command from Portnox Cloud rather than copying the example below. In Portnox Cloud, go to Settings > Integration Services > Firewall Integration Service and click on the Add Docker container button. Portnox Cloud generates the complete command for you, already containing your organization ID, instance ID, and API key, along with the API token that authenticates the container.

Note:
You can only generate this token in the Add Docker container window. It doesn’t work with tokens you generate on the CLEAR API TOKENS screen, and that screen doesn’t list it.
Warning:
When you generate a new token, the current one becomes invalid, so any container already running with it stops working until you redeploy it with the new token. The token itself never expires.
  • Run the container in Docker:
    docker run -d \
      --name portnox-fw-id-mapper --restart=on-failure --pull always \
      -e OrgId=org_id \
      -e InstanceId=instance_id \
      -e ApiKey=api_key \
      portnox/fw-id-mapper:latest
    Note:
    This command is an example only, with placeholder values that won’t work as-is. Replace them with your Portnox organization ID, instance ID, and API key, or use the complete command that Portnox Cloud generated for you. If you build the command manually and use Docker Desktop for Windows, remove the backslashes from the command. On Linux and macOS, you may also need to add sudo at the start of the command if your environment requires superuser privileges to run Docker.
  • Optional: Alternatively, deploy the container with Docker Compose:
    services:
      fw-id-mapper:
        image: portnox/fw-id-mapper:latest
        container_name: portnox-fw-id-mapper
        restart: on-failure
        pull_policy: always
        environment:
          OrgId: "org_id"
          InstanceId: "instance_id"
          ApiKey: "api_key"
    docker compose up -d

After deployment, we recommend that you monitor the container’s logs to confirm it registered and authenticated with the Portnox gateway:

  • Docker:

    docker logs -f portnox-fw-id-mapper
  • Docker Compose:

    docker compose logs -f fw-id-mapper

Configuration

Configure the container using either environment variables or a configuration file, appsettings.json, inside the container. If you use both methods, environment variables take priority.

Environment variable

Config file setting

Default

Description

OrgId

Required

Portnox organization ID

InstanceId

Required

Unique identifier for this connector instance

ApiKey

Required

API key used to authenticate with the Portnox gateway

GatewayUrl

https://extfwint-local-gw.portnox.com

Portnox firewall identity mapping gateway URL. Set this only if Portnox Cloud gave you a separate test environment URL, for example https://extfwint-local-gw-test.portnox.com.

SyncInterval

00:00:30

Interval at which the connector polls the gateway for firewall connection changes

FwReachabilityCheckTimeout

00:00:10

TCP timeout used when checking firewall reachability

SbListener__MinRetryDelay

SbListener:MinRetryDelay

00:00:02

Minimum service bus listener retry delay

SbListener__MaxRetryDelay

SbListener:MaxRetryDelay

00:01:00

Maximum service bus listener retry delay

SbListener__SettingsPollInterval

SbListener:SettingsPollInterval

00:00:02

Interval used to poll service bus listener settings

SbListener__TokenExpiryMargin

SbListener:TokenExpiryMargin

00:05:00

Margin used when handling service bus authentication token expiration

PaloAltoUserId__MaxAttempts

PaloAltoUserId:MaxAttempts

3

Maximum attempts for Palo Alto User-ID operations

PaloAltoUserId__RetryBaseDelay

PaloAltoUserId:RetryBaseDelay

00:00:00.250

Initial retry delay for Palo Alto User-ID operations. Doubles after each retry.

MappingEventAggregation__Window

MappingEventAggregation:Window

00:00:05

Time window used to aggregate mapping events that occur in rapid succession, such as during roaming or reconnects

TLS and certificate configuration

The container communicates with Palo Alto Networks and Check Point firewalls over HTTPS. By default, it validates the firewall’s certificate against the standard system trust store. You only need the settings below if your firewall’s certificate comes from a private or internal CA that isn’t in that trust store.

These settings don’t apply to Fortinet FortiGate. The container sends RADIUS accounting messages to FortiGate, which use a shared secret instead of TLS.

Note:
To disable validation entirely, set IgnoreFwRemoteCertificateValidation="true". Use this for development and testing, not production.

Variable

Description

FwCaCertificatePaths

One or more certificate file paths, separated by semicolons

FwCaCertificatesBase64

One or more Base64-encoded certificates, separated by semicolons

FwCaCertificatesDir

A directory inside the container containing .pem, .crt, or .cer files. Recommended for container deployments. Mount your host’s certificate directory to this path, for example: -v /opt/portnox/fw-id-mapper/certs:/certs/ca:ro, then set FwCaCertificatesDir="/certs/ca" to match.

If IgnoreFwRemoteCertificateValidation is true, the container ignores any CA certificate configuration, since validation is already disabled. Keep validation enabled in production and provide the CA certificate instead.

Firewall connections

The container supports the following firewalls:

  • Palo Alto Networks, through the User-ID XML API
  • Fortinet FortiGate, through the RADIUS Single Sign-On (RSSO) agent
  • Check Point, through the Identity Awareness Web API

Currently, the only available integration type for all vendors is User ID.

Palo Alto Networks

The container sends user-to-IP mappings to Palo Alto Networks User-ID through the Palo Alto XML API rather than syslog parsing. Each mapping gets an explicit accept or reject response. This avoids problems that syslog-based integrations commonly have: incorrect message formatting, parser changes, username or IP address extraction errors, messages sent but not accepted, and silent synchronization failures.

  1. On the Palo Alto firewall, create an administrator account with the User-ID agent permission, then generate a key from that account’s /api/?type=keygen endpoint. Save the key in a temporary file. You will need it in the next step.
  2. In Portnox Cloud, go to Settings > Integration Services > Firewall Integration Service, find your container, and click on the Add firewall connection button. Then, fill in the details:
    • Connection name: Enter a name for this connection.

    • Vendor: Select Palo Alto.

    • Integration type: Select User ID.

    • IP address/hostname and Port: Enter the values to connect to the firewall (default port: 443). Use the firewall’s own port if the Palo Alto User-ID API is configured on a non-standard HTTPS port.

    • Vsys: Enter a value only if the firewall runs multiple virtual systems. Otherwise, leave this field blank to use the firewall’s default vsys1.

    • Keygen API key: Paste the key that you generated in the previous step.

    • Automatically unregister IP address-to-tag mapping (minutes): Time after which the firewall removes a mapping if it receives no new updates. Enter a value or leave the default value 60.

  3. Click on the Test connection button to confirm Portnox Cloud can reach the firewall, then click on the Save connection button.

The Palo Alto User-ID API supports login and logout operations. A login operation creates a user-to-IP mapping, and a logout operation removes it. The container issues these based on Portnox authentication and accounting events, so the firewall’s identity state tracks users as they connect and disconnect.

Fortinet FortiGate

The container sends user-to-IP mappings to the FortiGate RADIUS Single Sign-On (RSSO) agent as RADIUS accounting messages. A Start message adds the user to the FortiGate list of authenticated firewall users. A Stop message removes the user from that list.

Each message carries the user’s Portnox Cloud group name in the Class attribute. FortiGate matches this name to an RSSO user group. FortiGate policies can use RSSO groups but not individual users.

Before you add the connection, configure the following on the FortiGate:

  • RADIUS accounting access: In Network > Interfaces, edit the interface closest to the Docker host. In the Administrative Access section, enable RADIUS Accounting.

  • RSSO agent: In Security Fabric > External Connectors, create a RADIUS Single Sign-On Agent connector. Enable Use RADIUS Shared Secret, define a shared secret, and enable Send RADIUS Responses.

  • Username attribute: From the FortiGate CLI, set the RSSO agent to read the username from the User-Name attribute:

    config user radius
        edit "rsso_agent_name"
            set rsso-endpoint-attribute User-Name
        next
    end
  • RSSO user groups: In User & Authentication > User Groups, create a group of type RADIUS Single-Sign-On (RSSO) for each Portnox Cloud group that you want to use in policies. In the RADIUS Attribute Value field, enter the group name exactly as it appears in Portnox Cloud.

  1. In Portnox Cloud, go to Settings > Integration Services > Firewall Integration Service, find your container, and click on the Add firewall connection button. Then, fill in the details:
    • Connection name: Enter a name for this connection.

    • Vendor: Select Fortinet.

    • Integration type: Select User ID.

    • RSSO Agent IP address: Enter the IP address of the FortiGate interface with RADIUS accounting access.

    • Port: Enter the UDP port on which the FortiGate listens for RADIUS accounting, or leave the default value 1813.

    • Shared secret: Enter the shared secret that you defined for the RSSO agent.

  2. Click on the Test connection button to confirm Portnox Cloud can reach the firewall, then click on the Save connection button.

Check Point

The container sends user-to-IP mappings to the Check Point Identity Awareness Web API over HTTPS. Check Point matches the user’s Portnox Cloud group name to a user group with the same name.

Before you add the connection, configure the following in Check Point SmartConsole:

  • Docker host object: Create a host object with the IP address of the Docker host.

  • Identity Web API: In the gateway object, enable Identity Awareness and the Identity Web API identity source. In the Identity Web API Settings window, add the Docker host object as an authorized client and copy the Selected Client Secret.

  • User groups and access roles: Create a user group for each Portnox Cloud group that you want to use in policies, with the name exactly as it appears in Portnox Cloud. Create access roles that contain these groups, then use the access roles in policy rules.

  • Policy: Install the policy on the gateway.

  1. In Portnox Cloud, go to Settings > Integration Services > Firewall Integration Service, find your container, and click on the Add firewall connection button. Then, fill in the details:
    • Connection name: Enter a name for this connection.

    • Vendor: Select Check Point.

    • Integration type: Select User ID.

    • IDA Web API IP address: Enter the IP address of the gateway.

    • Port: Enter the TCP port of the Identity Web API, or leave the default value 443.

    • Shared secret: Paste the Selected Client Secret from Check Point SmartConsole.

    • Session timeout (minutes): Time after which the firewall removes a mapping if it receives no new updates. Enter a value or leave the default value 60.

  2. Click on the Test connection button to confirm Portnox Cloud can reach the firewall, then click on the Save connection button.

Troubleshooting

To collect Docker container logs for troubleshooting, see the following topic: How to collect Portnox Docker container logs for support.

  • Check container status:
    docker ps

    If you deployed with Docker Compose, use instead:

    docker compose ps
  • Verify gateway connectivity from the Docker host:
    curl -v https://extfwint-local-gw.portnox.com

    A successful TCP/TLS connection confirms basic network connectivity. It does not confirm the connector is registered or authenticated.

  • Verify firewall connectivity from the Docker host:
    • Palo Alto Networks: Check that the port is open, then verify the TLS handshake:

      nc -vz firewall_ip 443
      curl -vk https://firewall_ip/

      Use the firewall’s actual port instead of 443 if the User-ID API is configured on a non-standard HTTPS port.

    • Fortinet FortiGate: Install the FreeRADIUS utilities (for example, apt-get install freeradius-utils) and send a test accounting message:

      echo "Acct-Status-Type=Stop" | radclient -x fortigate_ip acct shared_secret

      The output includes a received Accounting-Response packet.

    • Check Point: Send a test mapping to the Identity Web API:

      curl -k -sS -w '\nHTTP Status: %{http_code}\n' \
        -X POST "https://firewall_ip/_IA_API/v1.0/add-identity" \
        -H "Content-Type: application/json" \
        -d '{"ip-address": "test_ip", "user": "test_user", "session-timeout": 300,
             "shared-secret": "shared_secret", "fetch-user-groups": 0,
             "fetch-machine-groups": 0, "calculate-roles": 0}'

      The output includes HTTP Status: 200. The test mapping expires after 300 seconds.

  • Check for common configuration problems:
    • Container starts but doesn’t connect: check the logs and verify OrgId, InstanceId, ApiKey, GatewayUrl (if set), and outbound TCP 443 connectivity.

    • Portnox Cloud reports the firewall as unreachable: verify the firewall address, port, routing, ACLs, management interface access, and TLS certificate configuration.

    • Palo Alto User-ID updates fail: verify the firewall connection in Portnox Cloud, the API key and its permissions, firewall reachability, the configured vsys, and the container logs for the specific API operation and response.

    • FortiGate doesn’t list users: verify that RADIUS Accounting is enabled on the interface, the shared secret matches, and rsso-endpoint-attribute is set to User-Name.

    • Check Point updates fail: verify that the Docker host is an authorized client, the shared secret matches, and the policy is installed.

    • Users don’t match group-based rules on FortiGate or Check Point: verify that the group names on the firewall match the Portnox Cloud group names exactly.

  • Verify a mapping on the firewall by running the following command from the firewall CLI:
    • Palo Alto Networks:

      show user ip-user-mapping all
    • Fortinet FortiGate:

      diagnose firewall auth list
    • Check Point (all mappings, or one IP address):

      pdp monitor all
      pdp monitor ip ip_address

    The output includes the user-to-IP mapping that Portnox reported.

Updates

  • If you use a Docker container running on a local Docker host, it does not update automatically, unless you also use the autoupdate container. The autoupdate container updates all Portnox Docker containers when new versions are available. Updating requires recreating the Docker container, so there may be a short service interruption.

  • If you deploy the Docker container in a cloud environment, you cannot use the autoupdate container, because it requires direct access to the local Docker engine, which these managed cloud services do not expose. You must update containers deployed this way manually by redeploying them with the latest image.