From fd78856c7b028756b4e8d9823e222fb60167c0ca Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Thu, 19 Sep 2024 13:13:24 -0500 Subject: [PATCH] Update IPA to use getcert instead of ipa-getcert, as it includes more certificates. --- config.go | 4 ++-- freeipa.go | 4 ++-- main.go | 2 +- test/{ipa-getcert => getcert} | 0 test/test_config.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename test/{ipa-getcert => getcert} (100%) diff --git a/config.go b/config.go index 2721f79..6187e72 100644 --- a/config.go +++ b/config.go @@ -37,7 +37,7 @@ type Config struct { HTTPDPKIProxyConf string `fig:"httpd_pki_proxy_conf"` KInitBin string `fig:"kinit_bin"` KListBin string `fig:"klist_bin"` - IPAGetCertBIN string `fig:"ipa_getcert_bin"` + GetCertBIN string `fig:"getcert_bin"` } const ( @@ -167,7 +167,7 @@ func (a *App) ReadConfig() { HTTPDPKIProxyConf: "/etc/httpd/conf.d/ipa-pki-proxy.conf", KInitBin: "/usr/bin/kinit", KListBin: "/usr/bin/klist", - IPAGetCertBIN: "/usr/bin/ipa-getcert", + GetCertBIN: "/usr/bin/getcert", } // Load configuration. diff --git a/freeipa.go b/freeipa.go index 340e1a5..dcf5af0 100644 --- a/freeipa.go +++ b/freeipa.go @@ -200,8 +200,8 @@ func (e *FreeIPAExporter) certMongerCerts() ([]*CertMongerCerts, error) { requestRX := regexp.MustCompile(`Request ID '([A-Za-z0-9]+)':`) keyValueRX := regexp.MustCompile(`\s([A-Za-z][A-Za-z- ]+): (.*)$`) - // Setup the ipa-getcert list command. - cmd := exec.Command(app.config.IPAGetCertBIN, "list") + // Setup the getcert list command. + cmd := exec.Command(app.config.GetCertBIN, "list") // Get the pipes. stdout, err := cmd.StdoutPipe() diff --git a/main.go b/main.go index 7127e5d..6d6073a 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ import ( const ( serviceName = "freeipa-health-metrics" serviceDescription = "Provides metrics of FreeIPA's health" - serviceVersion = "0.1" + serviceVersion = "0.4" namespace = "freeipa" ) diff --git a/test/ipa-getcert b/test/getcert similarity index 100% rename from test/ipa-getcert rename to test/getcert diff --git a/test/test_config.yaml b/test/test_config.yaml index bbb13e6..c3b3669 100644 --- a/test/test_config.yaml +++ b/test/test_config.yaml @@ -27,4 +27,4 @@ pki_tomcat_server_xml: test/server.xml httpd_pki_proxy_conf: test/ipa-pki-proxy.conf kinit_bin: test/kinit klist_bin: test/klist -ipa_getcert_bin: test/ipa-getcert +getcert_bin: test/getcert