<div dir="ltr"><p>Hi Ben,</p>
<p>Thanks for the clarification. I did some additional testing today and can now provide complete examples of what I’m seeing.</p>
<p>Environment details:</p>
<ol>
<li>
<p>Debian 12</p>
</li>
<li>
<p>Kea installed from official ISC packages (<code>isc-kea-admin</code>, <code>isc-kea-dhcp4</code>, etc.)</p>
</li>
<li>
<p><code>kea-shell</code> located at <code>/usr/sbin/kea-shell</code></p>
</li>
<li>
<p><code>kea-shell --help</code> shows support for HTTP, authentication and Control Agent parameters, including:</p>
<ul>
<li>
<p><code>--host</code></p>
</li>
<li>
<p><code>--port</code></p>
</li>
<li>
<p><code>--service</code></p>
</li>
<li>
<p><code>--auth-user</code></p>
</li>
<li>
<p><code>--auth-password-file</code></p>
</li>
</ul>
</li>
</ol>
<p>The issue is that <code>kea-shell</code> appears to ignore these parameters at runtime.</p>
<p>Examples:</p>
<ol>
<li>
<p>This command hangs indefinitely and produces no output until I press Ctrl-C:</p>
</li>
</ol>
<pre class="gmail-overflow-visible!"><div class="gmail-contain-inline-size gmail-rounded-2xl gmail-corner-superellipse/1.1 gmail-relative gmail-bg-token-sidebar-surface-primary"><div class="gmail-sticky gmail-top-9"><div class="gmail-absolute end-0 gmail-bottom-0 gmail-flex gmail-h-9 gmail-items-center gmail-pe-2"><div class="gmail-bg-token-bg-elevated-secondary gmail-text-token-text-secondary gmail-flex gmail-items-center gmail-gap-4 gmail-rounded-sm gmail-px-2 gmail-font-sans gmail-text-xs"></div></div></div><div class="gmail-overflow-y-auto gmail-p-4" dir="ltr"><code class="gmail-whitespace-pre!">echo <span class="gmail-hljs-string">'{ "command": "list-commands" }'</span> | \
kea-shell <span class="gmail-hljs-comment">--host 127.0.0.1 --port 8000 \</span>
<span class="gmail-hljs-comment">--auth-user xxx \</span>
<span class="gmail-hljs-comment">--auth-password-file /etc/kea/kea-api-password \</span>
<span class="gmail-hljs-comment">--service dhcp4</span>
</code></div></div></pre>
<ol start="2">
<li>
<p>This also hangs with no output:</p>
</li>
</ol>
<pre class="gmail-overflow-visible!"><div class="gmail-contain-inline-size gmail-rounded-2xl gmail-corner-superellipse/1.1 gmail-relative gmail-bg-token-sidebar-surface-primary"><div class="gmail-sticky gmail-top-9"><div class="gmail-absolute end-0 gmail-bottom-0 gmail-flex gmail-h-9 gmail-items-center gmail-pe-2"><div class="gmail-bg-token-bg-elevated-secondary gmail-text-token-text-secondary gmail-flex gmail-items-center gmail-gap-4 gmail-rounded-sm gmail-px-2 gmail-font-sans gmail-text-xs"></div></div></div><div class="gmail-overflow-y-auto gmail-p-4" dir="ltr"><code class="gmail-whitespace-pre!">kea-shell <span class="gmail-hljs-attr">--host</span> <span class="gmail-hljs-number">127.0</span>.<span class="gmail-hljs-number">0.1</span> <span class="gmail-hljs-attr">--port</span> <span class="gmail-hljs-number">8000</span> \
<span class="gmail-hljs-attr">--service</span> dhcp4 \
list-commands
</code></div></div></pre>
<ol start="3">
<li>
<p>Even running the simplest possible HTTP-based invocation results in the same hanging behavior.</p>
</li>
</ol>
<p>In contrast, using <code>curl</code> with the same Control Agent, host/port and authentication works perfectly. For example:</p>
<pre class="gmail-overflow-visible!"><div class="gmail-contain-inline-size gmail-rounded-2xl gmail-corner-superellipse/1.1 gmail-relative gmail-bg-token-sidebar-surface-primary"><div class="gmail-sticky gmail-top-9"><div class="gmail-absolute end-0 gmail-bottom-0 gmail-flex gmail-h-9 gmail-items-center gmail-pe-2"><div class="gmail-bg-token-bg-elevated-secondary gmail-text-token-text-secondary gmail-flex gmail-items-center gmail-gap-4 gmail-rounded-sm gmail-px-2 gmail-font-sans gmail-text-xs"></div></div></div><div class="gmail-overflow-y-auto gmail-p-4" dir="ltr"><code class="gmail-whitespace-pre!">curl -u xxx:<span class="gmail-hljs-string">"$(cat /etc/kea/kea-api-password)"</span> \
-H <span class="gmail-hljs-string">"Content-Type: application/json"</span> \
-X POST \
-d '{ <span class="gmail-hljs-string">"command"</span>: <span class="gmail-hljs-string">"version-get"</span>, <span class="gmail-hljs-string">"service"</span>: [ <span class="gmail-hljs-string">"dhcp4"</span> ] }' \
http:<span class="gmail-hljs-comment">//<a href="http://127.0.0.1:8000/">127.0.0.1:8000/</a></span>
</code></div></div></pre>
<p>returns the expected JSON response immediately.</p>
<p>This leads me to wonder:</p>
<ol>
<li>
<p>Is it expected behavior that <code>kea-shell</code> ignores HTTP/authentication parameters in the ISC Debian packages?</p>
</li>
<li>
<p>Should <code>kea-shell</code> be able to communicate with an authenticated Control Agent, or is this a known limitation?</p>
</li>
<li>
<p>Is <code>kea-shell</code> still supposed to use the UNIX control socket even when HTTP parameters are explicitly provided?</p>
</li>
</ol>
<p>Any clarification would be appreciated.</p>
<p>Thanks again for the guidance.</p>
<p>Oliver</p><p><br></p></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">El vie, 5 dic 2025 a las 22:15, Ben Scott (<<a href="mailto:bscott@isc.org">bscott@isc.org</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
On 12/5/25 07:01, Oliver wrote:<br>
> kea-shell --auth-user ... lease4-del ... <br>
<br>
That above, of course, not a valid kea-shell command. It is *part* <br>
of a command. The parts you omitted are likely necessary for us to <br>
understand what is going on. By all means, substitute placeholders for <br>
things like passwords and names and such, but please provide complete <br>
information. We cannot diagnose a partial command. We need to know all <br>
the kea-shell options you used, and the API content you fed into it.<br>
<br>
A complete invocation of kea-shell, with HTTP authentication, is <br>
generally going to look something like this (all one line):<br>
<br>
echo ' "ip-address": "192.0.2.202" ' | kea-shell --service dhcp4 <br>
--auth-user bscott --auth-pass drowssap<br>
<br>
> I also noticed that the Control Agent rejects attempts to use absolute<br>
> paths (e.g., /run/kea/kea4-ctrl-socket) with the error:> “invalid <br>
path specified, supported path is /etc/kea”<br>
> so I cannot use explicit absolute socket paths.<br>
<br>
Well, you can use absolute paths, but they are restricted to the <br>
directory acceptable for the type of file in question. These and other <br>
restrictions were introduced in Kea 2.6.3, 2.7.8, and 3.0.0, in an <br>
effort to harden Kea against abuse. The acceptable directories are set <br>
at build time, but can be overridden with environment variables. See <br>
the release notes for more information.<br>
<br>
For example, see the following page, starting at item #32:<br>
<br>
<a href="https://gitlab.isc.org/isc-projects/kea/-/wikis/Release-Notes/release-notes-3.0.0" rel="noreferrer" target="_blank">https://gitlab.isc.org/isc-projects/kea/-/wikis/Release-Notes/release-notes-3.0.0</a><br>
<br>
Hope this helps,<br>
<br>
-- Ben<br>
<br>
-- <br>
Any opinions expressed in this message are those of the author alone.<br>
All information is provided without warranty of any kind.<br>
<br>
-- <br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users.Kea-users@lists.isc.org" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users.<br>
Kea-users@lists.isc.org</a><br>
</blockquote></div>