How to determine client identifier?

  • Hello-

    I am attempting to write an application using the OpenDXL Python Client.

    I would like to send an event that is targeted at a set of endpoints. To accomplish this, it looks like the client_ids property of the event message should be set. I have done this in my code, but I don't have a good way to test this.

    To run my test, I would like to know what the identifiers for each client that is connecting to the fabric. How can I determine what that client identifier is for an instance of the OpenDXL Python Client that is connected to the fabric?

  • The OpenDXL Python Client does not currently provide a method to directly determine the identifier of the client. For "open" clients it is actually the DXL broker that assigns the identifier.

    With that said, it is pretty simple to determine what the identifier is. This information is included in the response message received for any request that is sent by the client. The client identifier is located in the client_ids property of the response message.

    The following code attempts to invoke a service that does not exist. The response from the broker will include the client's identifier (as it is set to route directly back to the client).

    Python: Determine Client Identifier
    1. req = Request("/service/does/not/exist")
    2. res = client.sync_request(req)
    3. client_id = res.client_ids[0]

    Hope this helps,


  • Another option here, without knowing the full use case, could be to use a unique TOPIC to associate with the systems in question. Topics can be ephemeral, so setting them up based on a particular situation, related to only the systems in question is lightweight and easy to do ;)

    Jesse Netz, CISSP, C|EH, ITIL

    McAfee Systems Engineer, Pre-Sales Engineering East

    M: 302.608.4758