Giter VIP home page Giter VIP logo

Comments (9)

wsobel avatar wsobel commented on June 21, 2024 1

It looks like there was a mistake in some of the code. The prefix is based on the identity of the adapter, which should be one of two versions based on SuppressIPAddress configuration variable:

  1. "_" + server + "_" + port example: _localhost_7878
  2. "_" + sha1digest("_" + server + "_" + port)[0..10]

The other option is to specify it directly using AdapterIdentity.

The reason was a security concern raised by some companies that didn't want the IP addresses of the adapter exposed. It was supposed to be optional and have effect all the way down. I'll add a fix in version 2.2.0.15 with the MQTT source changes.

from cppagent.

wsobel avatar wsobel commented on June 21, 2024 1

from cppagent.

robot-ranger avatar robot-ranger commented on June 21, 2024

Awesome.
I actually remember seeing that issue and the resolution about security, but i guess my keyword searching wasnt strong enough today.
AdapterIdentity is fine for me, just didnt know it existed.

ETA: i said i was going to close this, but ill keep it open and add more to the readme in my PR. these issues can close when the PR goes.

from cppagent.

robot-ranger avatar robot-ranger commented on June 21, 2024

It looks like there was a mistake in some of the code. The prefix is based on the identity of the adapter, which should be one of two versions based on SuppressIPAddress configuration variable:

1. `"_" + server + "_" + port` example: `_localhost_7878`

2. `"_" + sha1digest("_" + server + "_" + port)[0..10]`

The other option is to specify it directly using AdapterIdentity.

The reason was a security concern raised by some companies that didn't want the IP addresses of the adapter exposed. It was supposed to be optional and have effect all the way down. I'll add a fix in version 2.2.0.15 with the MQTT source changes.

Added to my PR : #367

from cppagent.

robot-ranger avatar robot-ranger commented on June 21, 2024

Maybe AdapterIdentity can be used to generate MqttClientId?

from cppagent.

wsobel avatar wsobel commented on June 21, 2024

from cppagent.

robot-ranger avatar robot-ranger commented on June 21, 2024

I still have a task to verify if a random client id is being generated if not specified. If it is not generated, why not. And what mqtt_cpp is using as its generator. I thought it used the machine ip and port (unique). I’ll get back once I investigate the code a bit more.

...oh? turns out, host:port for both my sink and source are the same (localhost:1883) !, so they are the same client id? go figure.

I suppose a remote broker is the same issue - host:port is the same for both sink and adapter

from cppagent.

rajwork9 avatar rajwork9 commented on June 21, 2024

AdapterIdentity: in Mqtt it creates like serverIp:MqttPort or serverIp:1883.

MqttClientId: you can declare in config file or Generates unique id.

from cppagent.

wsobel avatar wsobel commented on June 21, 2024

We need a better way of creating the ID. Unless we have one client per process (which we could do) we need to make each instance unique.

from cppagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.