diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ceded5b5c57..bc148a077217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,17 @@ Changes by Version #### Breaking Changes +* Remove deprecated TLS flags ([#2790](https://github.com/jaegertracing/jaeger/issues/2790), [@albertteoh](https://github.com/albertteoh)): + * `--cassandra.tls` is replaced by `--cassandra.tls.enabled` + * `--cassandra-archive.tls` is replaced by `--cassandra-archive.tls.enabled` + * `--collector.grpc.tls` is replaced by `--collector.grpc.tls.enabled` + * `--collector.grpc.tls.client.ca` is replaced by `--collector.grpc.tls.client-ca` + * `--es.tls` is replaced by `--es.tls.enabled` + * `--es-archive.tls` is replaced by `--es-archive.tls.enabled` + * `--kafka.consumer.tls` is replaced by `--kafka.consumer.tls.enabled` + * `--kafka.producer.tls` is replaced by `--kafka.producer.tls.enabled` + * `--reporter.grpc.tls` is replaced by `--reporter.grpc.tls.enabled` + * Remove deprecated flags of Query Server `--query.port` and `--query.host-port`, please use dedicated HTTP `--query.http-server.host-port` (defaults to `:16686`) and gRPC `--query.grpc-server.host-port` (defaults to `:16685`) host-ports flags instead ([#2772](https://github.com/jaegertracing/jaeger/pull/2772), [@rjs211](https://github.com/rjs211)) * By default, if no flags are set, the query server starts on the dedicated ports. To use common port for gRPC and HTTP endpoints, the host-port flags have to be explicitly set diff --git a/pkg/config/tlscfg/flags.go b/pkg/config/tlscfg/flags.go index 8ea42fc0105c..54b8f8a933d4 100644 --- a/pkg/config/tlscfg/flags.go +++ b/pkg/config/tlscfg/flags.go @@ -22,14 +22,12 @@ import ( const ( tlsPrefix = ".tls" - tlsEnabledOld = tlsPrefix tlsEnabled = tlsPrefix + ".enabled" tlsCA = tlsPrefix + ".ca" tlsCert = tlsPrefix + ".cert" tlsKey = tlsPrefix + ".key" tlsServerName = tlsPrefix + ".server-name" tlsClientCA = tlsPrefix + ".client-ca" - tlsClientCAOld = tlsPrefix + ".client.ca" tlsSkipHostVerify = tlsPrefix + ".skip-host-verify" ) @@ -51,7 +49,6 @@ type ServerFlagsConfig struct { func (c ClientFlagsConfig) AddFlags(flags *flag.FlagSet) { if c.ShowEnabled { flags.Bool(c.Prefix+tlsEnabled, false, "Enable TLS when talking to the remote server(s)") - flags.Bool(c.Prefix+tlsEnabledOld, false, "(deprecated) see --"+c.Prefix+tlsEnabled) } flags.String(c.Prefix+tlsCA, "", "Path to a TLS CA (Certification Authority) file used to verify the remote server(s) (by default will use the system truststore)") flags.String(c.Prefix+tlsCert, "", "Path to a TLS Certificate file, used to identify this process to the remote server(s)") @@ -66,12 +63,10 @@ func (c ClientFlagsConfig) AddFlags(flags *flag.FlagSet) { func (c ServerFlagsConfig) AddFlags(flags *flag.FlagSet) { if c.ShowEnabled { flags.Bool(c.Prefix+tlsEnabled, false, "Enable TLS on the server") - flags.Bool(c.Prefix+tlsEnabledOld, false, "(deprecated) see --"+c.Prefix+tlsEnabled) } flags.String(c.Prefix+tlsCert, "", "Path to a TLS Certificate file, used to identify this server to clients") flags.String(c.Prefix+tlsKey, "", "Path to a TLS Private Key file, used to identify this server to clients") flags.String(c.Prefix+tlsClientCA, "", "Path to a TLS CA (Certification Authority) file used to verify certificates presented by clients (if unset, all clients are permitted)") - flags.String(c.Prefix+tlsClientCAOld, "", "(deprecated) see --"+c.Prefix+tlsClientCA) } // InitFromViper creates tls.Config populated with values retrieved from Viper. @@ -79,10 +74,6 @@ func (c ClientFlagsConfig) InitFromViper(v *viper.Viper) Options { var p Options if c.ShowEnabled { p.Enabled = v.GetBool(c.Prefix + tlsEnabled) - - if !p.Enabled { - p.Enabled = v.GetBool(c.Prefix + tlsEnabledOld) - } } p.CAPath = v.GetString(c.Prefix + tlsCA) p.CertPath = v.GetString(c.Prefix + tlsCert) @@ -99,19 +90,11 @@ func (c ServerFlagsConfig) InitFromViper(v *viper.Viper) Options { var p Options if c.ShowEnabled { p.Enabled = v.GetBool(c.Prefix + tlsEnabled) - - if !p.Enabled { - p.Enabled = v.GetBool(c.Prefix + tlsEnabledOld) - } } p.CertPath = v.GetString(c.Prefix + tlsCert) p.KeyPath = v.GetString(c.Prefix + tlsKey) if c.ShowClientCA { p.ClientCAPath = v.GetString(c.Prefix + tlsClientCA) - if s := v.GetString(c.Prefix + tlsClientCAOld); s != "" { - // using legacy flag - p.ClientCAPath = s - } } return p } diff --git a/pkg/config/tlscfg/flags_test.go b/pkg/config/tlscfg/flags_test.go index f55ecbd819f2..6bd5d3b357c0 100644 --- a/pkg/config/tlscfg/flags_test.go +++ b/pkg/config/tlscfg/flags_test.go @@ -36,9 +36,6 @@ func TestClientFlags(t *testing.T) { tests := []struct { option string }{ - { - option: "--prefix.tls=true", - }, { option: "--prefix.tls.enabled=true", }, @@ -76,7 +73,7 @@ func TestClientFlags(t *testing.T) { func TestServerFlags(t *testing.T) { cmdLine := []string{ "##placeholder##", // replaced in each test below - "--prefix.tls=true", + "--prefix.tls.enabled=true", "--prefix.tls.cert=cert-file", "--prefix.tls.key=key-file", } @@ -89,10 +86,6 @@ func TestServerFlags(t *testing.T) { option: "--prefix.tls.client-ca=client-ca-file", file: "client-ca-file", }, - { - option: "--prefix.tls.client.ca=legacy-client-ca-file", - file: "legacy-client-ca-file", - }, } for _, test := range tests { diff --git a/plugin/storage/es/mappings/gen_assets.go b/plugin/storage/es/mappings/gen_assets.go index 02e4fce3eced..88b6e1ae9b4a 100644 --- a/plugin/storage/es/mappings/gen_assets.go +++ b/plugin/storage/es/mappings/gen_assets.go @@ -213,7 +213,7 @@ var _escData = map[string]*_escFile{ name: ".nocover", local: "plugin/storage/es/mappings/.nocover", size: 43, - modtime: 1608397661, + modtime: 1612002346, compressed: ` H4sIAAAAAAAC/youSSzJzFYoSEzOTkxPVcjILy4pVkgsLcnXTU/NSy1KLElNUUjLzEkt1uMCBAAA//8y IKK1KwAAAA== @@ -223,100 +223,96 @@ IKK1KwAAAA== "/jaeger-dependencies-7.json": { name: "jaeger-dependencies-7.json", local: "plugin/storage/es/mappings/jaeger-dependencies-7.json", - size: 279, - modtime: 1610693565, + size: 283, + modtime: 1612134474, compressed: ` -H4sIAAAAAAAC/2yPQWrDMBBF9z6FmGVIRDfd+BAttAcwivTtTJGnqmYMBaO7F5l00dDt478Hfx+cI5aE -76kEM1RRGh2dPgIW1EtCgSRIZOjlROe+VpixLEpjl391L9t6RZ0+50lvoaae2XfnXw78Or8f0LV2/l+q -KJljeNTe7vhRXEMpLIsXqCFNMyMn9ZlXNhqfn/5sK742qKmPId7gIeGaQaPVDYNzR5fuvX6qDW34CQAA -//8AfUo/FwEAAA== +H4sIAAAAAAAC/2zPz0vDQBDF8Xv+imXxVNrFi5fcqlYU/EWK52GbfU1HknHdmYBQ8r9LRA/S3t/nC+9Y +OedZEr4oRzMUUV87v3iP6FBWCRmSIC1DVwu/nNcKM5ZOfT3jPx5kHHYo9LEnPcSS5szFkej57el609DL +HW3v183tlmhanmcFuec2nsJm8/r4cLM+oUPMmaULAjUk2jP6pKHngc3XV5f/tgWfI9Q0tLE9IEDiroev +rYyonPvp+t/efGyqpuo7AAD//66cHf8bAQAA `, }, "/jaeger-dependencies.json": { name: "jaeger-dependencies.json", local: "plugin/storage/es/mappings/jaeger-dependencies.json", - size: 273, - modtime: 1610693565, + size: 277, + modtime: 1612134474, compressed: ` -H4sIAAAAAAAC/2yPQWrDMBBF9z7FMMuQiG660SFaaA9gFOvbmSJPVc0YCsZ3LzbZNGT7+O/BXzsidsy1 -JAdH4tNXwoR2yajQDB0Edjnxed8Z3EUn47hrRCya8Rt0ma9o/ffY2y21bBxpXSm8Hfh9/Dwgbdv5udRQ -iwzpUfu440dxTrWKTkFhjtyPgpItFJnFOb6+/Ns2/CwwtzCk4YYATdcCjt4WdERHl++9/dTWbd1fAAAA -//8zWep3EQEAAA== +H4sIAAAAAAAC/2zPzUoDMRTF8f08Rbi4Km1w4ya7qhUFv5ji+pJOTqeRTIy5d0Ao8+4y4kbG/fn94Zwb +Y0gxlOQV5Ayt3j161E1AQQ7IXYRsVrSedwLVmHshNzNjKOaAL5vH4YDKH0eWk69ByJmLM/Pz29P1ruWX +O97fb9vbPfO0/p9VlBQ7v4Tt7vXx4Wa7oIMvJebeZogi8DEiBbEpDlHJXV3+2VZ8jhAV2/nuBIvsDwnk +tI5ojPnp0m9vPjY1U/MdAAD//5ZQx/QVAQAA `, }, "/jaeger-service-7.json": { name: "jaeger-service-7.json", local: "plugin/storage/es/mappings/jaeger-service-7.json", - size: 1148, - modtime: 1610634921, + size: 878, + modtime: 1612134474, compressed: ` -H4sIAAAAAAAC/8ySQY/TMBCF7/kVozmuWgshLYfcOSDBglhxQsiaOpPU4NjGdrsbRf7vKMbbZgvdEwdO -kWbmvXzzPHMDgNp2/Cg9pcTBRmwBb+YZxNv7T4F7/Qg5fyceOGwjh6NWvL3BTQMwz1vQPYgvkd+9/wA5 -L15kNEVeTBZrAHzZKTB1CC3Mizg/ubLtql3klLQdIrbVrrAKexh3HKTrZdxT6MrvZhB3pfyxvy9FyMXw -L6LA3mhFVXbWfa71S+VI3ms7CMsxcSd7zaaLwuhRJ2xvXz2bDfzzwDFFoUjtWbClnWFsUzhw2e6PyAA2 -aHTPalLLYM2tOFoalwrW0LQZt94ZrSbcnIeCM8YdOcgS/TL+cuQPQSfGos+XeZe1sa57Dr2bLI1aycSj -N5SW5/1aAVa00ZOViYYoR/JP2tqrls+rAJgmz9jiD54eXOhWa/1OdLAusKSdOzK2r2/frNp5PYue0l6O -lNQeW0w0iBs8tXNzoVgx++AUx/hfYFcWcQ2/fL/VY/PBeQ5JczzDYX3iu3I2qy2v4l5FPWHi8htK2tl/ -4Xq6utzk5lcAAAD//16uKiV8BAAA +H4sIAAAAAAAC/8ySwW7aQBCG736K1agnBFZViR72RluqVmppBcopikaDPdibeNeb3YEEIb97ZGTAhHDL +IReP5H++35/t3SVKgXE5P6MnEQ4uglYwuCcuOIwih43JeDSAYbsYWcS4IoJuuQOZurVdcsB6hbGkkLcN +n3aIs5u/36Zz/PcTF78m8x8LxGb4NhbYVyajS3A+/f/n9/fJBWrJe+OK1HEUznFluMpjWhlrBPT489lu +4Mc1R4lpRlnJKTtaVgxawpoTpfa90PWdXizfOrImQ2HrKxKOoG/3iVK7brbfw5NDoSKiJX9gu6yrPL+r +FMjWM2h44O1THXIYnqemcHVgpGW9YdBfxl97cdPfBU9SoiXJStAgVKQDOMZN8oroOftQZxzjh9DuXNJr ++vt51/1NH2rPQQzHkxx0B3RGlvvK13Wvqh41oX0Miande7Qmh2uTNMlLAAAA//8YcMrbbgMAAA== `, }, "/jaeger-service.json": { name: "jaeger-service.json", local: "plugin/storage/es/mappings/jaeger-service.json", - size: 1056, - modtime: 1610693565, + size: 1060, + modtime: 1612134474, compressed: ` -H4sIAAAAAAAC/8xTy47bIBTd+yvQXUYJqiqlCz4ildplVaEbc23TAqaA00aR/73CQ8aPibKaxXjhx+E8 -OBhuFWOQyHqDiUAw2P1CaikcIoWLrumwg32mREpJuzaCyArGQDtF/7gb7JmC7BsZOwwqgmC3G+OnCf7a -fJ9ANo77x6JA3ugat7JvBd4KLXqvXcsdxURKNpqMitxoqxOI46cVN9CfgWKKvMa6I04Oz4ZApDDQG08K -XF0dWl2DaNBEqhibkqEkzrWlogYHk+QdyRgaM38yBi9hajbLV6nCGJQseV/2COLHq3i2yavu0cmEbZQW -/TJiGi2T2+L5h149gYDfdP3bBwX77bhuXR9I4rm/EIjPxy8rwrjmg8fUSYup7kBAwpbvYEEYqwe6VQsf -+ppi/GBFyqz4s0Ll7We1cINyMhYbwIfeU0ia4mobFOIJLa2rPav1pNKiDuRATLp37+deLZ/5PlZj9T8A -AP//IuFOPCAEAAA= +H4sIAAAAAAAC/8yTT2/UMBDF7/kU1ojTamshpHLwrUARSFDQVpwQGs3Gs1mD7RjbKayqfHfk4pKkW+2J +Q3PIn/F78/xz7NtGCMjsgqXMoASsvhN3HM8SxxvT8tkK1kWSOGfjuwSqOIQA4zX/ln5wW47Y7zDtKeoE +Sjy7Rbz68vHV5QY/vcXrdxebN9eI4/pxW+RgTUvHxs3l5w/vX18cWR2FYHwnPafMGneGrU7SGmcyqPPn +C23knwOnnGRL7Z4le9paBpXjwEc9OUp98ORMC2pHNnEjxF0y1MQJHTXvaLAZ7yulRtZOn0LA3zA9NStX +RRECahbeL30C9fWfeWpTVj6Qx0xdQkdhHnE3Wif3sF5+6iEwKPjBh1991LB+OG4630dG2vY3DOrF+cuF +YFzqIVDeo6Pc7kFBpk6uYCYYm0d8C4oQ+5ZTemIgdVbyFFB9+9bMukE9HbMNEGIfOGbDabENqvCKHC/R +TmGdQJrhQAmkbHr//7o382e5j83Y/AkAAP//qd2MzCQEAAA= `, }, "/jaeger-span-7.json": { name: "jaeger-span-7.json", local: "plugin/storage/es/mappings/jaeger-span-7.json", - size: 3680, - modtime: 1610634921, + size: 3420, + modtime: 1612134474, compressed: ` -H4sIAAAAAAAC/+xXwW7bMAy95ysEHovEGAZ0B5+3Q4G1G9buNAwGY9OOWlnSJCZtYPjfBytO6sR2OmDu -MAw7BZb4nh4pPsauZkKA1Bk9JRaZyWkPsYCLqhLRh9vPjnL5JOr6Hqkgt/AW9eIC5jMhqmohZC6ir56u -Pl6Lum6IUEn01DA0vELAGRpHmDWBDbDeM5LOWipPzFIXHuKWKoiM9LpckktMnvgVuiwcVYnoJix/ym/D -oqgD4QDIkVUyxVPYl3b5FFiitVIXkSbPlCW5JJX5SMlSMsSXb45iHf1Yk2cfpZiuKCKNS0UQs1tTCKuq -Xr2EmIOSOaXbtAltiyYEaCybZ2jrJVW5sEbJdAvzfYgzSpkNuSTUvAk+U+tHJ5kgQOu9mEOpQ8rQpvpc -72yrsZRpwlRahdzc6rf28L3O5pos6oSx8EmJdo9t91rK41UhgLeWIIYH2j4alx1SandloY2jBJdmQxC/ -vXzX2a67sWCRV0mJnK4gBsYiuoDDdj07QXQ0W2dS8v6vkN1qicbkh9/vbaNZZyw5luSfxQE7TOnqfVfu -uNRRmQeJYNGR5luLekJSPy1dUwZkafRNMMpUIhkd38lhRmV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0d9N2fQzT1xE5+s9W8VVdHPAAAA//+SuQbQXA0AAA== `, }, "/jaeger-span.json": { name: "jaeger-span.json", local: "plugin/storage/es/mappings/jaeger-span.json", - size: 3826, - modtime: 1610693565, + size: 3830, + modtime: 1612134474, compressed: ` -H4sIAAAAAAAC/+xWTW/bPAy++1cIPBap8eIFuoPPu+ywDlh7GwaDsWlHrb4mMd2Cwv998EeX2JWdDYiH -AVsOSUzpIfmI5GM9J0IAk3YKmSATcPWAVJO/Dg7N9RVs2vVAzNLUAbJ2uxAgTUnfUrPXW/K5rfKwQ18G -yMTzs0hvO/OH6q4ziqbZxEGenJIFTmEfB/MUqNE5aerUUGAq80qSKkOqpJYM2c1/o72evuwpcEgLLHaU -ksGtIsjY7+mVT/JpeTCoZQFZhSpQIkQXGYaIR9p5SRXuFecvltaGSh0fhYA+WHl01n4GKkLAECt/OfMA -2acf4KOb9tQdmpyxDrlGdxqiWx2Sm9rbah4cQQaPdPhqfQmb6bqsjfWU49Y+EWT/37wZbWjG+8Eh73KN -XOwgA8Y6vYKTDU0SwY1YOG8LCuEPIzJklS4RGv59Tk68dUU5qb7z1pFnSWHUA+yxoHdvx5yW+CxwOeEB -Dj0ZvnNoVnAe1nHbHhCytOYWNV0+aUbP93LOs7KmhmXge6mUDHF42YriKKvKeo0MGZCzxS7XPTgaodz3 -vH81s0phPZOPNNyKcxyn7Bysl8wxkbHmbSYjG2nq3qHUFBi1mx/XMbHYJPbSPe8hku6ZlM+k3S0/0iFm -P68zP6E1EZYd6gnVnn57VMb6vnO+Ztxk6bk594p4EeBJvy50XiD/JAt6LSIrvCoYF15HdvtABcM5B//6 -+6/ub08VeTIFrS7Jnqr4aVx6KGJ3mhXixK4hlwhztmSvpn5u4ieg1SscnewLn/rMJF9eWNfp1cUbfP/b -fjdJk3wPAAD//5ROSoHyDgAA +H4sIAAAAAAAC/+xW0W/TPhB+z18RnX5PUxf9hDQe8jbYEJPYQNt4Qsi6JpfUm2Mb+zqopv7vKE1Lm9ZJ +QGoQEvShbWx/391n333xcxTHwFRZhUyQxnDygFSSO/UW9ekJTOp5T8xSlx7Senkcg9Q5fUv0vJqSE6YQ +foYu95DG/z0LcfPx+tXlrXj/Rty9Pb+9uBNiOQnDHFklMzwE3l5+eHf1+vwAWqG1UpeJJs+Ui0KSyn2i +ZCUZ0rP/W2sdfZmTZ59kmM0oIY1TRZCym9MBJ7kkX2isZAZpgcpTFMeryLCOuJUucipwrlhsRuoxVGr7 +GMfQBMu3ZPVnLSWOYR1LbPbdQ/rpB3hLU++8RS0YSy8qtLshVrPr5PbH6xNdWIIUHmnx1bgcJvvzstTG +kcCpeSJIX5y9bC1YtteDRZ6JCjmbQQqMZXICOwuWUQDXUmGdycj7P0zIOqukT9D63+doh211KDunb52x +5FiSb9UAO8zo6qKtqU9Pj5YdHWDRkeY7i3oEcj8Obb1ByNLoG6zo+EkzOr6XXczK6BL6gddSKenD8Lw2 +xlZWhXEVMqRA1mQzUTXgYIR83uj+1cwKhWVHPlJzbdBhnDJdsMYy20LanjfZa9lAUTeEsiLPWNnudm0L +C3ViY93dDIF0B1IeSHs1/UiL0Piwz/yE1wRUrlBPqOb026Mylvcr8jHjRn3Py6FXxMaA9+q1p/I8uSeZ +0aGJjPCqYOx5HZnpA2UMQwT/6vuvrm9HBTnSGY1uyY6K8G4cuylCd5oR4oSuIccIM3hkB13f1fF7oNFP +ONjZR971jk4+vrGOU6u9N/jmt/5eRsvoewAAAP//W45CgfYOAAA= `, }, diff --git a/scripts/travis/es-integration-test.sh b/scripts/travis/es-integration-test.sh index 0f7551cfe0fb..8514cf68d82f 100755 --- a/scripts/travis/es-integration-test.sh +++ b/scripts/travis/es-integration-test.sh @@ -33,7 +33,7 @@ setup_es() { setup_query() { local arch=$(go env GOARCH) local params=( - --es.tls=false + --es.tls.enabled=false --es.version=7 --es.server-urls=http://127.0.0.1:9200 --query.bearer-token-propagation=true