-
-
Notifications
You must be signed in to change notification settings - Fork 407
First attempt at kea dhcp support #1636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+630
−0
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b290d3c
First attempt at kea dhcp support
void-spark 608686e
Add list with settings to readme
void-spark 7273899
Use single quote consistently
void-spark 76612e5
Change default timeout to 10 seconds,
void-spark 957c779
Add KEALSS to plugin list
void-spark 39068e9
And 'notes' to README.md
void-spark 6d661dd
I did add a ';' from habit, removed again, must please the bunny :)
void-spark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| ## Overview | ||
|
|
||
| A plugin allowing for importing devices from the Kea DHCP API. | ||
| https://www.isc.org/kea/ | ||
|
|
||
| And specifically: | ||
| https://kea.readthedocs.io/en/kea-2.6.3/api.html#lease4-get-all | ||
|
|
||
|
|
||
| ### Usage | ||
|
|
||
| To enable the API, first you want to add something like this to your main kea configuration (this is for debian 13): | ||
|
|
||
| ```json | ||
| "control-socket": { | ||
| "socket-type": "unix", | ||
| "socket-name": "/run/kea/kea4-ctrl-socket" | ||
| }, | ||
|
|
||
| "hooks-libraries": [ | ||
| { | ||
| "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so" | ||
| } | ||
| ], | ||
| ``` | ||
|
|
||
|
|
||
| And you need to install kea-ctrl-agent, with a config that looks something like this: | ||
|
|
||
| ```json | ||
| { | ||
| "Control-agent": { | ||
| "http-host": "127.0.0.1", | ||
| "http-port": 8000, | ||
|
|
||
| "authentication": { | ||
| "type": "basic", | ||
| "realm": "Kea Control Agent", | ||
| "directory": "/etc/kea", | ||
| "clients": [ | ||
| { | ||
| "user": "kea-api", | ||
| "password-file": "kea-api-password" | ||
| } | ||
| ] | ||
| }, | ||
| "control-sockets": { | ||
| "dhcp4": { | ||
| "socket-type": "unix", | ||
| "socket-name": "/run/kea/kea4-ctrl-socket" | ||
| } | ||
| }, | ||
| "loggers": [ | ||
| { | ||
| "name": "kea-ctrl-agent", | ||
| "output-options": [ | ||
| { | ||
| "output": "stdout", | ||
| "pattern": "%-5p %m\n" | ||
| } | ||
| ], | ||
| "severity": "INFO", | ||
| "debuglevel": 0 | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| You will need to configure the plugin with the URL to the API, and the username and password configured above (from kea-api-password file in the example) | ||
|
void-spark marked this conversation as resolved.
|
||
|
|
||
|
|
||
| #### Required Settings | ||
|
|
||
| These settings are required, besides the common device scanner settings: | ||
|
|
||
| - **Kea Control Agent URL** (`KEALSS_URL`): The full URL, including port number, to the Kea API. | ||
| - Default: `http://127.0.0.1:8000` | ||
| - This mirrors what you set up in the kea-ctrl-agent configuration. | ||
|
|
||
| - **Basic Auth Username** (`KEALSS_USER`): The user to use for authenticating with the Kea API. | ||
| - Default: `kea-api` | ||
| - This mirrors what you set up in the kea-ctrl-agent configuration. | ||
|
|
||
| - **Basic Auth Password** (`KEALSS_PASS`): The password to use for authenticating with the Kea API. | ||
| - This mirrors what you set up in the kea-ctrl-agent configuration. | ||
| - When using a password file, it should be the content of the password file. | ||
|
|
||
|
|
||
| ### Notes | ||
|
|
||
| - This was tested on a basic Debian 13 install. | ||
| - When you install kea-ctrl-agent, it should ask you about creating a password. | ||
| - It's possible to run kea-ctrl-agent without password, but it's not recommended and at the moment we don't support that. | ||
| - I may provide some minimal support, if you ask nicely :) | ||
|
|
||
| - Version: 1.0.0 | ||
| - Author: `void-spark` | ||
| - Release Date: `11/05/2026` | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.