-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Allow to use own certificate for metrics endpoint #10504
Changes from all commits
093db65
575a000
f27a3f5
670a78a
d76775e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,13 @@ var ( | |
grpcProxyListenAutoTLS bool | ||
grpcProxyListenCRL string | ||
|
||
// tls for clients connecting to proxy for metrics | ||
|
||
grpcProxyMetricsListenCA string | ||
grpcProxyMetricsListenCert string | ||
grpcProxyMetricsListenKey string | ||
grpcProxyMetricsListenCRL string | ||
|
||
grpcProxyAdvertiseClientURL string | ||
grpcProxyResolverPrefix string | ||
grpcProxyResolverTTL int | ||
|
@@ -150,6 +157,11 @@ func newGRPCProxyStartCommand() *cobra.Command { | |
cmd.Flags().BoolVar(&grpcProxyListenAutoTLS, "auto-tls", false, "proxy TLS using generated certificates") | ||
cmd.Flags().StringVar(&grpcProxyListenCRL, "client-crl-file", "", "proxy client certificate revocation list file.") | ||
|
||
cmd.Flags().StringVar(&grpcProxyMetricsListenCert, "metrics-cert-file", "", "identify secure connections to the /metrics endpoint using this TLS certificate file") | ||
cmd.Flags().StringVar(&grpcProxyMetricsListenKey, "metrics-key-file", "", "identify secure connections to the /metrics endpoint using this TLS key file") | ||
cmd.Flags().StringVar(&grpcProxyMetricsListenCA, "metrics-trusted-ca-file", "", "verify certificates of TLS-enabled secure /metrics endpoint using this CA bundle") | ||
cmd.Flags().StringVar(&grpcProxyMetricsListenCRL, "metrics-client-crl-file", "", "/metrics endpoint client certificate revocation list file.") | ||
|
||
// experimental flags | ||
cmd.Flags().BoolVar(&grpcProxyEnableOrdering, "experimental-serializable-ordering", false, "Ensure serializable reads have monotonically increasing store revisions across endpoints.") | ||
cmd.Flags().StringVar(&grpcProxyLeasing, "experimental-leasing-prefix", "", "leasing metadata prefix for disconnected linearized reads.") | ||
|
@@ -211,6 +223,12 @@ func startGRPCProxy(cmd *cobra.Command, args []string) { | |
go func() { errc <- srvhttp.Serve(httpl) }() | ||
go func() { errc <- m.Serve() }() | ||
if len(grpcProxyMetricsListenAddr) > 0 { | ||
if grpcProxyMetricsListenCert != "" && grpcProxyMetricsListenKey != "" { | ||
tlsinfo = newTLS(grpcProxyMetricsListenCA, grpcProxyMetricsListenCert, grpcProxyMetricsListenKey) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pr #12114 adds health handler for grpcproxy self, if grpcProxyMetricsListenAddr uses own certificate for metrics endpoint, we should also update healthcheck client certs, otherwise, it is failed to access '/proxy/health' handle. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ironcladlou said There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I already mentioned this before. Therefore, when using separate certificates for metrics, a warning is displayed.
Do you want the server to serve some endpoints without certificates? Theoretically, this is possible, but will require rewriting the server. To do this, you will need to make authorization optional and do it not at the TLS level. This is out of scope of this proposal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok. thanks. I will try to add --health-client-cert-auth flag in another PR. thanks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tangcong Can this PR be merged? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm. can you add changelog and doc in another pr? thanks. @hexfusion can you take a final look? thanks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tangcong sorry for delay yes I will take a look. |
||
if tlsinfo != nil { | ||
tlsinfo.CRLFile = grpcProxyMetricsListenCRL | ||
} | ||
} | ||
mhttpl := mustMetricsListener(lg, tlsinfo) | ||
go func() { | ||
mux := http.NewServeMux() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDrjCCApagAwIBAgIUOl7DCgSvqQKhiihYrZDiBKNpQX4wDQYJKoZIhvcNAQEL | ||
MIIDrjCCApagAwIBAgIUBI65ni82ZhKAq9U5g/7l+wKRhJ4wDQYJKoZIhvcNAQEL | ||
BQAwbzEMMAoGA1UEBhMDVVNBMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH | ||
Ew1TYW4gRnJhbmNpc2NvMQ0wCwYDVQQKEwRldGNkMRYwFAYDVQQLEw1ldGNkIFNl | ||
Y3VyaXR5MQswCQYDVQQDEwJjYTAeFw0xOTEwMDgyMTE5MDBaFw0yOTEwMDUyMTE5 | ||
Y3VyaXR5MQswCQYDVQQDEwJjYTAeFw0yMDA3MTMxNTM0MDBaFw0zMDA3MTExNTM0 | ||
MDBaMG8xDDAKBgNVBAYTA1VTQTETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE | ||
BxMNU2FuIEZyYW5jaXNjbzENMAsGA1UEChMEZXRjZDEWMBQGA1UECxMNZXRjZCBT | ||
ZWN1cml0eTELMAkGA1UEAxMCY2EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK | ||
AoIBAQDBNhwKD8oqOwNSDMZR+K6l6ocyXZzZPAIbv7co34xtjt25c8PPKz8FiBSU | ||
M4YeZpzsSp7n7WSSSzVWqFTRBZzvjIrBzLu4CfxMKuUrQX1/BPYgbSxQO+5YKPzO | ||
yaBMhIAEtW+WYsaa6PpWyL65L4giKpVoLS/UFTEBsf+lO6pwFpX2EJnIylLbpwEd | ||
pAXIgVFsodHlP9Zc2tR1TqYetmJ6/A/p5sSZpgLy1y2+Mg4VTMKvs2kNAoh/+lEu | ||
WPe204eMpkBXhukulOiJkVKNdhnCkLslt8ZaMWWqBvD9d94lXycMQ9wnGakPNc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DdKKOlJyYYjYDebKQ | ||
WzIr+7N11LwRzpLztgWAw+3ayoHwbfOlQv0KUagO5yQSByMiCwiy0CeJWow0qxri | ||
5lLRt8Ln3E9YsOcyccRpyWMfLURt17wSnikHxUVQ0l7uDLhq5E3YPAhivjPIwBGj | ||
pca1lO+gQZWHeiLu3npHdSAFHqNuD6v/dbcFf7ypxUUt/1IQqr+/cKeMGX0ak6RH | ||
X7Zd8xJ89j8heYc4mlmdWH/RSYuGEUl1FSmJV9O1OIz0z07PlGWFuQd44HKrbnYG | ||
CdtSQGWF7jwf0+U5Eix1X+m05/2gj8rXAFlk9tTu+fBK3g== | ||
-----END CERTIFICATE----- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"key": { | ||
"algo": "rsa", | ||
"size": 2048 | ||
}, | ||
"names": [ | ||
{ | ||
"O": "etcd", | ||
"OU": "etcd Monitoring", | ||
"L": "San Francisco", | ||
"ST": "California", | ||
"C": "USA" | ||
} | ||
], | ||
"CN": "ca", | ||
"hosts": [ | ||
"127.0.0.1", | ||
"localhost" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDRzCCAi+gAwIBAgIUKgQJ/CMaFxc4JcwwGyiT/7KpedIwDQYJKoZIhvcNAQEL | ||
MIIDRzCCAi+gAwIBAgIUG6bU78IkoRkkdGL00WW1JtC3OQEwDQYJKoZIhvcNAQEL | ||
BQAwbzEMMAoGA1UEBhMDVVNBMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH | ||
Ew1TYW4gRnJhbmNpc2NvMQ0wCwYDVQQKEwRldGNkMRYwFAYDVQQLEw1ldGNkIFNl | ||
Y3VyaXR5MQswCQYDVQQDEwJjYTAeFw0xOTEwMDgyMTE5MDBaFw0yOTEwMDUyMTE5 | ||
Y3VyaXR5MQswCQYDVQQDEwJjYTAeFw0yMDA3MT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qcXy16LbWmpvJmTHPsj | ||
HQ4EFgQUNBFaOeg3mNnzj9D7BcKBvpqjGo4wHwYDVR0jBBgwFoAUH6qe9i0Hd4yv | ||
nCTh8CFFuvjabO0wGgYDVR0RBBMwEYIJbG9jYWxob3N0hwR/AAABMA0GCSqGSIb3 | ||
DQEBCwUAA4IBAQCmYOxZCuRnbROlT2rVYFe89cBk73tf6zrft8YMx1Mc2upRzMG3 | ||
rLEZf52J40qsUJ++Vnt/62pMetlcdjhqNb3RyKlbQJ//RXRf3+zLmdqQq/E9N4LE | ||
m3MeRUQivkESdBBujVXXZfrSSrtN1i8TvkndrueELE8sWpI+8mWfW9tyGexE624x | ||
dvrnJZRGZzTxM3CoioAoHnF1b/QP3EhwjRtF7RJOY4Rt8OKhHaTQW0J5DNWRISNz | ||
hd0oDPj9kcrpXrYJhqcqQSnSXsFzo+nTs3Hfm5xSZYLnO+Ma9bw9XwR4+dK08acd | ||
gIQ/F8/Svn70fAIuuS61IGEleADKQnpq8CVl | ||
-----END CERTIFICATE----- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEIK3K2gimOw2P0pZ4soFAopriuORuqpRptllFXNRhCRV0oAoGCCqGSM49 | ||
AwEHoUQDQgAEV23PJ2ohWd2Ni7o65wwknFTUZLP00fmlz5p7jxow8W7h8UkmwvEN | ||
s4k7wpILCHLIn5lCBEHCOL9ym5I96jBdbA== | ||
MHcCAQEEIE8QEd6fkx4u6/P4ytaMlLJ9EFbQXAxl9TQy8Dc4U+8yoAoGCCqGSM49 | ||
AwEHoUQDQgAEYbY+/YiXSxn+kR7yp3fBjN5Zlo7nBtn62HblH9fWjFiqGf4bqGJ5 | ||
Qc7WSPEkK0yd60OS6vz3iE/yMLVLICEwFw== | ||
-----END EC PRIVATE KEY----- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
-----BEGIN CERTIFICATE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ps7TAPBgNVHREECDAGhwR/AAABMA0GCSqGSIb3 | ||
DQEBCwUAA4IBAQBOUznmyAgmURyDP/NF4XG+xLku9+pdqwxOIIZJdkyGL12IiurS | ||
jeQ6fr3zldoYYmfxvnbYVOFz0KKmK58zj+gT+kRXJKoWoCp5NMzgP9g3GV2+KDaL | ||
KvDNr9gHaF7R7RLsx6w28b7SgTa4Io49z3LcC4a4NCsjKghVeGIlrgr7htqkOO03 | ||
UlbnIsHkKYHqMR4Xo0plgMLP/IuK+b9S2K7/wqbrg1i1s227tt+Yc+osiAZfZPyg | ||
p7i98/+U4itp2iQUb2rYU1cWyTTQywR2OpVFvqW64uxUq0ejar8yxIMKgjEEGDRt | ||
pSh9TkXFTaMVHAA+pnQiZHkrVQBWKGIPJZXi | ||
-----END CERTIFICATE----- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEowIBAAKCAQEAu5iTosqln5jTOabUGdtqZaLVX4KAX/Xx08zMP2qdlZdP9OFd | ||
xhMmAnT7elfOxls4wUjvRgJpSEgUEMmzInmU2k5vCilttOuoiQyrHgQr/ZuJ0ph7 | ||
9KA6qd0h7GUNsR4rOJW4u8LNrYXaqZo8OA7/eklIgiVI4XAV+JATEXDhoJNURRDS | ||
DiJ00ipQIsDRdTUp4Y/MDDcO5o8PdI6QBgLj7rokO/gGByQSarU/ZkYpEfKacIrI | ||
xBOpLJQgoNkQuOQIheC1zaewO18Juj9+Fyek/TyVIf696WtMR0biNs0C2lvGf2+j | ||
WJFBjGx0ewGP/ticzn5550HEgfBGAvWx2nbx5wIDAQABAoIBAB0jBpM7TFwsfWov | ||
6jOV68Gbd+6cs1m0NnpCDdsvsQgh904+jrUMFlQ9XS3UY45Vbsw+isNh7n5Gi69L | ||
1KHfJmp90itO4fY+v++BYzaHSVnbhZ2LB32oQVROv00bKPRAjk/8mTO4fv+bkanU | ||
BdRjJ/UTWsq0BczV/uObZQr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lJMBxIJX1WA0DUDyBrrkkDhdMPrBZ9pi+JX4AU/1EJGqmusbBt5GB8b7+6n+n | ||
zb/4YY7EpEbcC9dWJisu9EVFxixqqIix6bxno1kCgYA+W91K54Ai8+wp5M9GpoCh | ||
EN6ZVpCP3UWEfF2XUVX/kRNvwFi7Te6iJi3fllIfH5QhV48d5fysCSOaFM2pj9is | ||
GelPFI4yrnBF9BKCiKCD1CDQ01tyqeWjVKaiJL2eJLegRZrZFaAh1XC5HjHtL54f | ||
zpT8Ebn5jCR/ARYrpA1ykQKBgHYMHZAs3zFKKYP3ovwLcXmK8uLOmR13QALscd9X | ||
SHiBGG8POo21Wp+wsDzvnp/+BsoctCkN9w9kdsRbMZmcBnLLwottAnCTXF7QSPsr | ||
HjMrq2BV96ag1p8Wjw4uuojD08uQHwb4XCzWfwot/gM+ltzF/dZb6Z91L5kYWCfy | ||
KYIxAoGBAM4kZQGFMBzK4ceA1lyM3n4XEWs2Hiexpf+TObQ1m3xvCe72SwHg/Ehe | ||
ilk2F666t0E2we+JjX91asLSv8XUJ4YE4zc397tjqZn+LQy11fzezSv9BBgFqQsU | ||
E0wFBZeOLbl6dhStF88egpy8YpYnlcK8vLfZGni/XjBmQBVNDZXD | ||
-----END RSA PRIVATE KEY----- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIEEzCCAvugAwIBAgIUYTkp3oUkde9wFRkJA1LlvwFrZ3MwDQYJKoZIhvcNAQEL | ||
MIIEEzCCAvugAwIBAgIUCCE37G6OMKVizSg9PRTMtsaqLKswDQYJKoZIhvcNAQEL | ||
BQAwbzEMMAoGA1UEBhMDVVNBMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH | ||
Ew1TYW4gRnJhbmNpc2NvMQ0wCwYDVQQKEwRldGNkMRYwFAYDVQQLEw1ldGNkIFNl | ||
Y3VyaXR5MQswCQYDVQQDEwJjYTAeFw0xOTEwM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
l7kfAs7RjnOnZxdLlyCImuTNa/CKz7d4m8M51WNZhkTqrCa0nlGMlxqQf94rpGN5 | ||
wkcJj4hRVxHHFkspWy6cM12xBCi6gMS5uctHhTTrJOhYYFNnLIqC | ||
-----END CERTIFICATE----- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we override tlsInfo, should we add a warning to log?
When MetricsTLSInfo is provided, client who has access to other APIs will not be able to access '/metrics' and '/health'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Theoretically, we can make both work (add them to
tls.Config.RootCAs
and totls.Config.ClientCAs
), but it will be much more difficult solution because it requires to extendtransport.TLSInfo
.This is not a hidden behavior (the admin must pass the options explicitly). I am not sure what message do I need to write to log ?
You specified other certificates for metrics. Access by client certificates will not be possible
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about the scenario where etcd clients with clientTLS (not metricsTLS) might try to access the metrics and health endpoint. Adding something like 'ignoring client certificates since metrics certificates given' would help them understand why the connection is rejected. I am not an expert in this area, please feel free to let me know if you think this is reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingyih That's reasonable. I added the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better or worse, warning messages are often noted by administrators and automated systems which analyze log output for anomalies. The proposed metrics TLS configuration when used in conjunction with client TLS configuration is a valid state. So in that regard it's not clear to me a preemptive warning makes sense. It seems possible that when using both TLS configurations (again, a valid state), this warning might be interpreted as a false negative alert of some kind.
So, I would suggest we consider changing this to INFO level or omitting it entirely.