Skip to content
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

Registering Owner group field #187

Open
Joan10 opened this issue Nov 29, 2022 · 1 comment
Open

Registering Owner group field #187

Joan10 opened this issue Nov 29, 2022 · 1 comment

Comments

@Joan10
Copy link

Joan10 commented Nov 29, 2022

Hello all,

We are trying to set up our first Nivlheim server and we are interested in registring the owner or contact information of hosts. Seems that the field Owner group is the way to go, but can't find anywhere how it gets populated or how we can configure it. I found this issue #107 but I still can't realise how ownership gets determined. Could someone give me a hand?

Thanks,
Joan

@oyvindhagberg
Copy link
Contributor

Hello Joan,

The code that determines the owner group for hosts is very company-specific for us, so we wanted to keep it outside of the Nivlheim codebase. We did this by having Nivlheim make a http call to (something external) for each host, supplying the hostname, and receiving back the name of the owner group, which then is stored in that field.

You configure the url in server.conf. Here's an example (this is how we do it):

HostOwnerPluginURL=http://127.0.0.1/owner.pl

Nivlheim makes a HTTP POST to that url, with the following parameters:
key = a temporary API key, if the plugin wants to make API calls back to Nivlheim
hostname = the hostname that Nivlheim wants to know the owner of
certfp = the certificate fingerprint of that host (useful if you want to make API calls back)

Nivlheim expects the plugin to answer with HTTP status 200 and one line of text, the name of the owner group.
Nivlheim will store that value in the "owner" field for that host.

Here's the code for the server side:
https://github.com/unioslo/nivlheim/blob/master/server/service/host_owner.go

Regards,
Øyvind Hagberg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants