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

Ability to connect to an endpoint that is protected by HTTP authentication and/or SSL Client Certificates #39

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixing indentation
Erion Elmasllari committed Dec 25, 2019
commit cb3e3988920bb508f80af4260c298dc89d2a87ee
2 changes: 1 addition & 1 deletion cmd/php-fpm-exporter/main.go
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import (
"go.uber.org/zap"
kingpin "gopkg.in/alecthomas/kingpin.v2"

exporter "github.com/eelmasllari/php-fpm-exporter"
exporter "github.com/bakins/php-fpm-exporter"
)

func main() {
8 changes: 4 additions & 4 deletions exporter.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import (
"syscall"
"time"
"gopkg.in/yaml.v2"
"io/ioutil"
"io/ioutil"

"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
@@ -21,11 +21,11 @@ import (

// AuthenticationConfiguration is the in-memory, decoded representation of the authentication configuration file
type AuthenticationConfiguration struct {
ClientCert string `yaml:"clientcert"`
ClientCert string `yaml:"clientcert"`
ClientKey string `yaml:"clientkey"`
AllowInsecureServerCert bool `yaml:"allow_insecure_server_cert"`
AuthUser string `yaml:"authuser"`
AuthPass string `yaml:"authpass"`
AuthUser string `yaml:"authuser"`
AuthPass string `yaml:"authpass"`
}

// Exporter handles serving the metrics
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/eelmasllari/php-fpm-exporter
module github.com/bakins/php-fpm-exporter

go 1.12

4 changes: 3 additions & 1 deletion test/README.ssl
Original file line number Diff line number Diff line change
@@ -2,19 +2,21 @@
#and here for the crl: https://blog.didierstevens.com/2013/05/08/howto-make-your-own-cert-and-revocation-list-with-openssl/

#generate CA
#openssl req -newkey rsa:4096 -keyform PEM -keyout ca.key -x509 -days 3650 -outform PEM -out ca.cer
openssl req -newkey rsa:4096 -keyform PEM -keyout ca.key -x509 -days 3650 -outform PEM -out ca.cer

#generate CRL
mkdir demoCA
touch demoCA/index.txt
echo 01 > demoCA/crlnumber
openssl ca -gencrl -keyfile ca.key -cert ca.cer -out ca.crl.pem

#generate server cert
openssl genrsa -out server.key 4096
openssl req -new -key server.key -out server.req -sha256
openssl x509 -req -in server.req -CA ca.cer -CAkey ca.key -set_serial 100 -extensions server -days 1460 -outform PEM -out server.cer -sha256
rm server.req

#generate client cert
openssl genrsa -out client.key 4096
openssl req -new -key client.key -out client.req
openssl x509 -req -in client.req -CA ca.cer -CAkey ca.key -set_serial 101 -extensions client -days 365 -outform PEM -out client.cer