Skip to content

cmd/pprof: add HTTPS support with client certificates #20939

@sorenmat

Description

@sorenmat

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8.3 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/smo/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dh/gykpvks552v4h7yfms86x3r80000gn/T/go-build191348200=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

Tried to connect to a HTTPS service in order to pull out pprof data

What did you expect to see?

The pprof data

What did you see instead?

http fetch https://192.168.99.100:32473/debug/pprof/profile?seconds=5: Get https://192.168.99.100:32473/debug/pprof/profile?seconds=5: remote error: tls: bad certificate

I think it would sort of nice to be able to connect via pprof to a server that runs SSL/TLS with client certificates. There
is a work-around this of cause, just put up and proxy that does SSL termination, but that might not always be feasible.
I assume the command would look something like.
go tool pprof -seconds 5 -caert cert.pem -key key.pem -ca.cert ca.pem https://192.168.99.100:32473/debug/pprof/profile

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions