Adding LDAP Certificates automatically

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Adding LDAP Certificates automatically

Post by optionstechnology »

I can add auth servers via the API easily enough

But I cant add the certificate

Is there any way to do this programmatically?


Also is there a way of setting other admin area settings - like system settings, email setttings, backups etc
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding LDAP Certificates automatically

Post by ssax »

It's not currently possible to do that through the API. Does your automation tool have the ability to add files/run commands/restart services at the OS level? If so, what OS/version are you running?

Code: Select all

uname -a
cat /etc/*release
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: Adding LDAP Certificates automatically

Post by optionstechnology »

Yeah we can change the config files directly and run commands/restart services

running centos 7.9
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding LDAP Certificates automatically

Post by ssax »

You should be able to add the entire CA cert chain in individual pem format files into:

Code: Select all

/etc/pki/ca-trust/source/anchors/
Then run:

Code: Select all

update-ca-trust extract
systemctl restart httpd
If that doesn't work you should be able to put your entire CA certificate chain in pem encoded format in a file in:

Code: Select all

/etc/openldap/certs
I'm using /etc/openldap/certs/ca.pem in the example below.

Then run these commands against it:

Code: Select all

chown apache.nagios /etc/openldap/certs/ca.pem
echo 'TLS_CACERT /etc/openldap/certs/ca.pem' >> /etc/openldap/ldap.conf
systemctl restart httpd
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: Adding LDAP Certificates automatically

Post by optionstechnology »

yup this worked perfectly, thanks

for the other settings-

We need to check: Allow HTML Tags in Host/Service Status

uncheck: Sticky Acknowledgement

change the "send from" address in mail settings

For backups check the 'Enable Local Backups' checkbox

Set it to run Daily at 18:00 to /store/backups/nagiosxi

Set a backup limit of 5


are all these things also possible by changing the settings in config files?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding LDAP Certificates automatically

Post by ssax »

Those are not currently modifiable like that because you need to be logged in to do it to pull the other information that is submitted with them.
Locked