<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Agent authentication]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm using agent authentication feature but there is something that I'm unable to understand.</p>
<p dir="auto">I encoded 1234567890 using nxencpasswd tool and I got kc23yKtK4oq+OxuoSFDBCcKmCn7xK8e4wqYKfvErx7g= as value. I put 1234567890 in the agent parameter on console (see attachment <strong>agent_params_1</strong>) and kc23yKtK4oq+OxuoSFDBCcKmCn7xK8e4wqYKfvErx7g= in the agent configuration file (see attachments <strong>agent_config_1</strong>). Everything works fine, I'm able to communicate with the agent.</p>
<p dir="auto">Then I did another test: I put the SHA1 value of 1234567890 (that is 01b307acba4f54f55aafc33bb06bbbf6ca803e9a) on both side, agent configuration file (see attachment <strong>agent_config_2</strong>) and agent parameter in the console (see attachment <strong>agent_params_2</strong>) and it works fine.</p>
<p dir="auto">Finally, I did the third test putting directly 1234567890 in both places (agent config file and agent params, I avoided to attach this screenshot) and even in this case it works fine. So, seems that whatever I put works...</p>
<p dir="auto">As per this post:</p>
<p dir="auto"><a href="https://www.netxms.org/forum/configuration/agent-authentication/" rel="nofollow ugc">https://www.netxms.org/forum/configuration/agent-authentication/</a></p>
<p dir="auto">I have to encrypt the password using nxencrpasswd to use the EncryptedSharedSecret! But as per my tests seems that it works even using it as it is <img
      src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=72b86a538fc"
      class="not-responsive emoji emoji-android emoji--confused"
      style="height: 1.4em; width: auto; vertical-align: middle;"
      title=":-\"
      alt="😕"
    /></p>
<p dir="auto">Please not that I have always restarted the agent after changing the shared secret.</p>
<p dir="auto">Regards,<br />
Marco</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003504-agent_config_1.PNG" alt="agent_config_1.PNG" class="img-markdown  img-fluid" width="595" height="169" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003506-agent_params_1.PNG" alt="agent_params_1.PNG" class="img-markdown  img-fluid" width="441" height="322" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003508-agent_config_2.PNG" alt="agent_config_2.PNG" class="img-markdown  img-fluid" width="579" height="160" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003510-agent_params_2.PNG" alt="agent_params_2.PNG" class="img-markdown  img-fluid" width="428" height="312" /></p>
]]></description><link>https://forum.netxms.org/topic/4976/agent-authentication</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:24:52 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4976.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Mar 2017 17:20:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Agent authentication on Tue, 28 Mar 2017 15:48:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/22030">Agent authentication</a>:</p>
<blockquote>
<p dir="auto">You can encrypt the cleartext key in Agent, or on Server, thats OK.<br />
Or you can only encrypt the key on one side, thats also OK.</p>
</blockquote>
<p dir="auto">Yes, this is what I found myself with the three different tests, and this is why I said that from the documentation I wasn't able to understand that you can have all the combination, since for the clear text on the agent side there is the field SharedSecret <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto"> <br />
Regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/22031</link><guid isPermaLink="true">https://forum.netxms.org/post/22031</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Tue, 28 Mar 2017 15:48:33 GMT</pubDate></item><item><title><![CDATA[Reply to Agent authentication on Tue, 28 Mar 2017 12:46:31 GMT]]></title><description><![CDATA[<p dir="auto">As mentioned previously, agent and server need cleartext key to communicate.</p>
<p dir="auto">You can encrypt the cleartext key in Agent, or on Server, thats OK.<br />
Or you can only encrypt the key on one side, thats also OK.</p>
<p dir="auto">Since encryption is a reversable process, as long as both parties can get the cleartext key (either have it input directly, or decrypt it when provided as encrypted using nxencpasswd), then communication can happen.</p>
<p dir="auto">After both parties have the cleartext key, they can use hashing crypto functions to assure that communication is authenticated and secured.</p>
<p dir="auto">I hope that better explains it <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Maybe its best to exactly describe a scenario that you think should not work, and we can see whats happening <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.netxms.org/post/22030</link><guid isPermaLink="true">https://forum.netxms.org/post/22030</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Tue, 28 Mar 2017 12:46:31 GMT</pubDate></item><item><title><![CDATA[Reply to Agent authentication on Tue, 28 Mar 2017 12:33:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/22026">Agent authentication</a>:</p>
<blockquote>
<p dir="auto">In which case should communication not be possible?</p>
<p dir="auto">As I posted above, even if you put a secret that is a hash itself into the configs, NetXMS doesnt treat it as a hash, but as a clear-text shared secret.</p>
<blockquote>
<p dir="auto">n your example 2, its actually the same, but the shared secret '01b307acba4f54f55aafc33bb06bbbf6ca803e9a' is hashed using SHA1.<br />
That means, that while you input a shared secret that is theoretically a SHA1 hash in itself, Agent and server still hashed it.</p>
</blockquote>
</blockquote>
<p dir="auto">According to documentation I understand that I have to put encrypted value (with nxencpasswd) into the EncryptedSharedSecret parameter but in my 2nd and 3rd example I didn't encrypt anything:</p>
<p dir="auto"><a href="https://wiki.netxms.org/wiki/Agent_Configuration_File" rel="nofollow ugc">https://wiki.netxms.org/wiki/Agent_Configuration_File</a><br />
<em>EncryptedSharedSecret<br />
Agent's shared secret used for remote peer authentication, encrypted using "nxencpasswd -a". If RequireAuthentication set to no, this parameter has no effect.</em></p>
<p dir="auto">I'm aware that technically I can just compare the two values and if they don't match I can try to decrypt one then check again if they match (and so on...), but honestly to me doesn't seems so clear reading the doc, this is the reason for the question <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/22028</link><guid isPermaLink="true">https://forum.netxms.org/post/22028</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Tue, 28 Mar 2017 12:33:26 GMT</pubDate></item><item><title><![CDATA[Reply to Agent authentication on Tue, 28 Mar 2017 09:30:51 GMT]]></title><description><![CDATA[<p dir="auto">In which case should communication not be possible?</p>
<p dir="auto">As I posted above, even if you put a secret that is a hash itself into the configs, NetXMS doesnt treat it as a hash, but as a clear-text shared secret.</p>
<blockquote>
<p dir="auto">n your example 2, its actually the same, but the shared secret '01b307acba4f54f55aafc33bb06bbbf6ca803e9a' is hashed using SHA1.<br />
That means, that while you input a shared secret that is theoretically a SHA1 hash in itself, Agent and server still hashed it.</p>
</blockquote>
]]></description><link>https://forum.netxms.org/post/22026</link><guid isPermaLink="true">https://forum.netxms.org/post/22026</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Tue, 28 Mar 2017 09:30:51 GMT</pubDate></item><item><title><![CDATA[Reply to Agent authentication on Tue, 28 Mar 2017 09:27:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi Tomaskis,</p>
<p dir="auto">I'm still not understanding <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/22021">Agent authentication</a>:</p>
<blockquote>
<p dir="auto">You dont put a hash into the config, you put the shared secret in there.<br />
The agent and server then hash it internally to communicate.</p>
</blockquote>
<p dir="auto">my point is that I'm able to successfully communicate with the agent in all the three cases and, as per your explanation, sounds differently:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/22021">Agent authentication</a>:</p>
<blockquote>
<p dir="auto">Communication would not be possible if both sides only knew the hash, thats not how cryptography works.<br />
Both sides need to know the clear-text secret in order to create hashes and validate the payload.</p>
</blockquote>
<p dir="auto">and I should'n be able to communicate in all cases I shown.</p>
<p dir="auto">Regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/22025</link><guid isPermaLink="true">https://forum.netxms.org/post/22025</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Tue, 28 Mar 2017 09:27:56 GMT</pubDate></item><item><title><![CDATA[Reply to Agent authentication on Mon, 27 Mar 2017 20:47:35 GMT]]></title><description><![CDATA[<p dir="auto">You dont put a hash into the config, you put the shared secret in there.<br />
The agent and server then hash it internally to communicate.</p>
<p dir="auto">So in your example 1, agent hashed '1234567890' into a SHA1 hash, sent data to server.<br />
Server checked data by checking if its configured secret matches the SHA1 hash.</p>
<p dir="auto">In your example 2, its actually the same, but the shared secret '01b307acba4f54f55aafc33bb06bbbf6ca803e9a' is hashed using SHA1.<br />
That means, that while you input a shared secret that is theoretically a SHA1 hash in itself, Agent and server still hashed it.</p>
<p dir="auto">Communication would not be possible if both sides only knew the hash, thats not how cryptography works.<br />
Both sides need to know the clear-text secret in order to create hashes and validate the payload.</p>
<p dir="auto">In case 3, you input an encrypted shared key.<br />
Agent decrypts it, then hashes the cleartext value and sends data to server.<br />
Server also decrypts the shared key, and again checks if the hash of the received data matches its cleartext shared secret.</p>
<p dir="auto">The encryption only serves the purpose of both parties not exposing the shared secret directly in cleartext in configuration files / database.</p>
]]></description><link>https://forum.netxms.org/post/22021</link><guid isPermaLink="true">https://forum.netxms.org/post/22021</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Mon, 27 Mar 2017 20:47:35 GMT</pubDate></item></channel></rss>