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

[Enhancement](http)Add http authentication to all API interfaces under be 8040. #39577

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

hubgeter
Copy link
Contributor

@hubgeter hubgeter commented Aug 19, 2024

Proposed changes

Add http authentication to all API interfaces under be 8040
The enable_all_http_auth parameter in be.conf can control the switch.

Issue Number: close #xxx

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 38235 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit cc923dc275206d338f3fc13f9ae359c44a13b3d1, data reload: false

------ Round 1 ----------------------------------
q1	17855	4410	4298	4298
q2	2059	210	212	210
q3	10414	1126	1030	1030
q4	10170	859	707	707
q5	7782	2830	2739	2739
q6	263	161	160	160
q7	1020	663	654	654
q8	9388	2112	2083	2083
q9	7117	6562	6505	6505
q10	7112	2326	2201	2201
q11	487	274	277	274
q12	457	266	263	263
q13	17788	2993	2969	2969
q14	299	270	255	255
q15	572	525	530	525
q16	526	421	434	421
q17	976	681	698	681
q18	7643	7008	6895	6895
q19	6994	1040	1018	1018
q20	680	345	345	345
q21	3892	2974	3143	2974
q22	1136	1028	1043	1028
Total cold run time: 114630 ms
Total hot run time: 38235 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4465	4312	4334	4312
q2	395	313	300	300
q3	2882	2666	2626	2626
q4	1998	1840	1776	1776
q5	5645	5414	5403	5403
q6	238	145	144	144
q7	2086	1725	1728	1725
q8	3214	3353	3311	3311
q9	8432	8347	8341	8341
q10	3453	3182	3172	3172
q11	626	511	506	506
q12	830	628	636	628
q13	17262	3033	3007	3007
q14	325	294	308	294
q15	556	510	520	510
q16	483	446	450	446
q17	1788	1528	1483	1483
q18	7810	7919	7526	7526
q19	1731	1674	1520	1520
q20	2066	1822	1840	1822
q21	5271	5196	5163	5163
q22	1130	1061	1031	1031
Total cold run time: 72686 ms
Total hot run time: 55046 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 190943 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit cc923dc275206d338f3fc13f9ae359c44a13b3d1, data reload: false

query1	1001	403	402	402
query2	6713	2086	1986	1986
query3	6661	226	244	226
query4	33717	23226	23329	23226
query5	4448	727	707	707
query6	306	217	208	208
query7	4617	318	310	310
query8	409	369	374	369
query9	8687	2473	2479	2473
query10	494	322	312	312
query11	17637	15138	15211	15138
query12	187	143	138	138
query13	1709	454	462	454
query14	9566	6876	7387	6876
query15	270	197	192	192
query16	8098	495	473	473
query17	1594	595	576	576
query18	2167	341	340	340
query19	220	171	166	166
query20	144	136	138	136
query21	245	146	144	144
query22	4301	4000	4159	4000
query23	34168	33428	33682	33428
query24	11547	2851	2870	2851
query25	664	419	418	418
query26	1391	177	180	177
query27	2819	308	296	296
query28	7422	2141	2148	2141
query29	901	475	439	439
query30	326	191	190	190
query31	1055	812	834	812
query32	117	80	84	80
query33	824	349	344	344
query34	905	501	498	498
query35	866	769	773	769
query36	1104	988	971	971
query37	181	105	103	103
query38	3954	3861	3891	3861
query39	1666	1454	1476	1454
query40	306	155	154	154
query41	147	144	141	141
query42	142	118	120	118
query43	561	527	516	516
query44	1255	798	832	798
query45	267	197	201	197
query46	1128	762	768	762
query47	1912	1861	1824	1824
query48	439	343	342	342
query49	1251	583	582	582
query50	887	465	459	459
query51	6884	6682	6766	6682
query52	127	112	107	107
query53	299	233	223	223
query54	942	506	496	496
query55	94	91	95	91
query56	321	311	305	305
query57	1224	1149	1127	1127
query58	327	320	358	320
query59	3014	2926	3046	2926
query60	353	331	324	324
query61	149	150	148	148
query62	883	720	704	704
query63	265	226	224	224
query64	5373	2401	1823	1823
query65	3242	3188	3205	3188
query66	1299	710	852	710
query67	15362	14886	14829	14829
query68	6617	578	579	578
query69	769	421	346	346
query70	1268	1160	1166	1160
query71	553	317	315	315
query72	7675	2293	2088	2088
query73	847	355	353	353
query74	9206	9046	8876	8876
query75	4845	2784	2786	2784
query76	4643	1020	1032	1020
query77	916	474	470	470
query78	9623	9424	8992	8992
query79	8030	598	554	554
query80	2459	610	611	610
query81	643	269	270	269
query82	843	166	160	160
query83	356	219	218	218
query84	295	100	97	97
query85	1544	358	356	356
query86	481	290	314	290
query87	4439	4280	4290	4280
query88	5247	2498	2516	2498
query89	493	335	330	330
query90	1954	235	241	235
query91	161	135	135	135
query92	96	76	79	76
query93	6276	553	550	550
query94	909	318	311	311
query95	390	290	295	290
query96	617	281	286	281
query97	3272	3089	3137	3089
query98	243	230	221	221
query99	1636	1307	1329	1307
Total cold run time: 318900 ms
Total hot run time: 190943 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 32.02 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit cc923dc275206d338f3fc13f9ae359c44a13b3d1, data reload: false

query1	0.05	0.04	0.03
query2	0.08	0.04	0.04
query3	0.22	0.06	0.05
query4	1.66	0.09	0.10
query5	0.54	0.49	0.50
query6	1.13	0.73	0.73
query7	0.02	0.02	0.01
query8	0.05	0.05	0.06
query9	0.55	0.50	0.50
query10	0.55	0.55	0.55
query11	0.16	0.13	0.12
query12	0.16	0.13	0.13
query13	0.62	0.61	0.58
query14	0.78	0.81	0.79
query15	0.86	0.83	0.81
query16	0.35	0.38	0.37
query17	1.07	1.06	0.97
query18	0.23	0.21	0.20
query19	1.78	1.86	1.81
query20	0.01	0.02	0.01
query21	15.40	0.67	0.67
query22	3.91	7.01	2.70
query23	18.26	1.29	1.28
query24	2.18	0.22	0.25
query25	0.15	0.10	0.09
query26	0.27	0.19	0.19
query27	0.09	0.08	0.08
query28	13.16	1.04	1.02
query29	12.61	3.35	3.36
query30	0.47	0.25	0.24
query31	3.09	0.41	0.40
query32	3.24	0.48	0.49
query33	2.98	2.94	3.03
query34	17.18	4.40	4.36
query35	4.41	4.45	4.44
query36	0.68	0.50	0.48
query37	0.21	0.18	0.17
query38	0.18	0.18	0.17
query39	0.06	0.06	0.06
query40	0.18	0.15	0.15
query41	0.11	0.07	0.07
query42	0.08	0.07	0.08
query43	0.08	0.06	0.07
Total cold run time: 109.85 s
Total hot run time: 32.02 s

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 38549 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 88969e7329201bcbeef50f28ff59c510f26d1aff, data reload: false

------ Round 1 ----------------------------------
q1	18257	4668	4419	4419
q2	2264	204	203	203
q3	10434	1149	1124	1124
q4	10154	827	797	797
q5	7769	2874	2850	2850
q6	264	156	156	156
q7	1015	659	654	654
q8	9391	2101	2072	2072
q9	7093	6659	6623	6623
q10	7031	2230	2271	2230
q11	473	263	271	263
q12	420	250	242	242
q13	17775	3061	3048	3048
q14	289	248	254	248
q15	564	537	538	537
q16	499	408	407	407
q17	1004	786	678	678
q18	7455	6818	6743	6743
q19	7439	1041	1108	1041
q20	721	350	349	349
q21	3866	2837	2951	2837
q22	1145	1054	1028	1028
Total cold run time: 115322 ms
Total hot run time: 38549 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4543	4289	4281	4281
q2	397	306	308	306
q3	2901	2618	2647	2618
q4	1931	1584	1587	1584
q5	5359	5388	5387	5387
q6	238	144	141	141
q7	2107	1725	1782	1725
q8	3177	3374	3335	3335
q9	8549	8402	8449	8402
q10	3422	3159	3167	3159
q11	627	520	525	520
q12	797	622	609	609
q13	17520	3007	3016	3007
q14	334	292	304	292
q15	562	525	518	518
q16	497	445	444	444
q17	1867	1492	1498	1492
q18	7819	7549	7545	7545
q19	1683	1624	1551	1551
q20	2061	1813	1847	1813
q21	5257	5056	5228	5056
q22	1131	1015	1010	1010
Total cold run time: 72779 ms
Total hot run time: 54795 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191411 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 88969e7329201bcbeef50f28ff59c510f26d1aff, data reload: false

query1	978	394	391	391
query2	6784	2079	2061	2061
query3	6673	232	239	232
query4	34063	23392	23323	23323
query5	4371	732	695	695
query6	311	211	209	209
query7	4630	329	316	316
query8	479	432	435	432
query9	8673	2533	2507	2507
query10	506	336	331	331
query11	16069	15101	15032	15032
query12	179	125	123	123
query13	1674	423	415	415
query14	9378	7297	7147	7147
query15	303	194	190	190
query16	7984	497	530	497
query17	1630	604	609	604
query18	2048	325	330	325
query19	271	166	162	162
query20	143	137	143	137
query21	245	142	140	140
query22	4165	4139	3971	3971
query23	34029	33372	33327	33327
query24	11577	2929	2834	2834
query25	661	409	428	409
query26	1194	177	183	177
query27	2740	297	299	297
query28	7527	2131	2091	2091
query29	861	456	454	454
query30	329	184	181	181
query31	1048	834	809	809
query32	123	79	80	79
query33	822	334	335	334
query34	903	497	500	497
query35	886	768	732	732
query36	1120	943	909	909
query37	169	100	105	100
query38	3900	3797	3895	3797
query39	1555	1470	1497	1470
query40	263	174	170	170
query41	177	176	176	176
query42	140	123	129	123
query43	574	542	529	529
query44	1352	781	799	781
query45	225	197	195	195
query46	1136	751	756	751
query47	1888	1817	1873	1817
query48	421	327	332	327
query49	1247	577	580	577
query50	874	467	454	454
query51	6903	6665	6799	6665
query52	122	108	109	108
query53	297	229	227	227
query54	963	504	486	486
query55	89	92	88	88
query56	328	317	315	315
query57	1244	1131	1098	1098
query58	341	302	325	302
query59	3053	2849	2918	2849
query60	351	341	325	325
query61	152	165	147	147
query62	873	683	682	682
query63	257	226	222	222
query64	5454	2351	1822	1822
query65	3242	3212	3170	3170
query66	1282	681	709	681
query67	15682	15021	14976	14976
query68	6382	586	582	582
query69	720	439	339	339
query70	1238	1154	1173	1154
query71	556	314	310	310
query72	7540	2276	2054	2054
query73	851	355	353	353
query74	9275	8842	9035	8842
query75	4860	2709	2754	2709
query76	4759	1092	1038	1038
query77	914	436	485	436
query78	9681	9760	10382	9760
query79	8964	558	555	555
query80	951	613	604	604
query81	621	257	262	257
query82	1026	165	158	158
query83	370	216	212	212
query84	287	95	97	95
query85	1528	367	351	351
query86	335	322	323	322
query87	4344	4210	4267	4210
query88	4803	2472	2491	2472
query89	463	329	327	327
query90	1854	238	234	234
query91	189	128	131	128
query92	91	74	75	74
query93	5016	565	559	559
query94	698	317	327	317
query95	392	296	291	291
query96	628	284	286	284
query97	3250	3087	3090	3087
query98	263	229	223	223
query99	1547	1312	1274	1274
Total cold run time: 314327 ms
Total hot run time: 191411 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.7 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 88969e7329201bcbeef50f28ff59c510f26d1aff, data reload: false

query1	0.05	0.04	0.04
query2	0.09	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.07	0.07
query5	0.50	0.53	0.48
query6	1.15	0.72	0.73
query7	0.02	0.02	0.02
query8	0.05	0.05	0.05
query9	0.56	0.49	0.49
query10	0.56	0.55	0.55
query11	0.16	0.12	0.12
query12	0.16	0.12	0.12
query13	0.62	0.60	0.59
query14	0.78	0.79	0.80
query15	0.86	0.82	0.82
query16	0.37	0.37	0.37
query17	1.03	1.06	1.04
query18	0.21	0.20	0.21
query19	1.92	1.78	1.81
query20	0.02	0.01	0.01
query21	15.40	0.67	0.66
query22	4.26	6.53	2.55
query23	18.30	1.41	1.24
query24	2.07	0.25	0.21
query25	0.15	0.09	0.08
query26	0.27	0.18	0.18
query27	0.08	0.08	0.08
query28	13.25	1.03	1.01
query29	12.63	3.30	3.29
query30	0.43	0.25	0.24
query31	2.82	0.40	0.40
query32	3.24	0.49	0.50
query33	2.97	2.99	2.91
query34	16.90	4.42	4.42
query35	4.42	4.42	4.44
query36	0.67	0.48	0.48
query37	0.21	0.17	0.17
query38	0.18	0.16	0.17
query39	0.07	0.05	0.05
query40	0.18	0.14	0.14
query41	0.11	0.06	0.06
query42	0.06	0.06	0.07
query43	0.06	0.05	0.06
Total cold run time: 109.75 s
Total hot run time: 31.7 s

@hubgeter hubgeter force-pushed the enable_be_http_auth branch from 88969e7 to 7557f21 Compare August 20, 2024 13:59
@hubgeter hubgeter force-pushed the enable_be_http_auth branch from 7557f21 to 9877411 Compare August 20, 2024 14:06
@hubgeter
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hubgeter hubgeter changed the title enable be api http auth [Enhancement](http)Add http authentication to all API interfaces under be 8040. Aug 20, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -341,4 +345,200 @@ TEST_F(HttpClientTest, escape_url) {
ASSERT_TRUE(check_result(input_G, output_G));
}

TEST_F(HttpClientTest, enable_http_auth) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'TEST_F' exceeds recommended size/complexity thresholds [readability-function-size]

TEST_F(HttpClientTest, enable_http_auth) {
^
Additional context

be/test/http/http_client_test.cpp:347: 194 lines including whitespace and comments (threshold 80)

TEST_F(HttpClientTest, enable_http_auth) {
^

@doris-robot
Copy link

TPC-H: Total hot run time: 38288 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 987741164e8ca1f08d3d8ed8e721031ff6ac447a, data reload: false

------ Round 1 ----------------------------------
q1	17868	4341	4339	4339
q2	2058	213	237	213
q3	10390	1123	1212	1123
q4	10172	683	809	683
q5	7761	2859	2779	2779
q6	265	158	163	158
q7	1014	656	648	648
q8	9383	2086	2075	2075
q9	7240	6536	6553	6536
q10	7046	2222	2317	2222
q11	510	281	284	281
q12	434	259	261	259
q13	17817	2987	3025	2987
q14	312	259	258	258
q15	570	528	535	528
q16	530	424	415	415
q17	989	673	699	673
q18	7443	6960	6796	6796
q19	7459	1143	1077	1077
q20	740	366	364	364
q21	3831	2898	2834	2834
q22	1126	1040	1056	1040
Total cold run time: 114958 ms
Total hot run time: 38288 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4479	4376	4324	4324
q2	418	326	313	313
q3	2835	2607	2666	2607
q4	1866	1707	1632	1632
q5	5343	5372	5336	5336
q6	238	155	152	152
q7	2109	1755	1729	1729
q8	3193	3343	3357	3343
q9	8400	8499	8425	8425
q10	3396	3171	3182	3171
q11	645	564	539	539
q12	801	607	605	605
q13	17547	3024	2984	2984
q14	325	315	288	288
q15	550	531	507	507
q16	491	452	441	441
q17	1805	1535	1516	1516
q18	7858	7683	7385	7385
q19	4590	1601	1537	1537
q20	2097	1835	1781	1781
q21	14937	5006	5084	5006
q22	1127	1053	1008	1008
Total cold run time: 85050 ms
Total hot run time: 54629 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191574 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 987741164e8ca1f08d3d8ed8e721031ff6ac447a, data reload: false

query1	988	412	395	395
query2	6745	2048	1917	1917
query3	6663	236	242	236
query4	29313	23207	23285	23207
query5	4319	662	636	636
query6	289	197	203	197
query7	4618	330	326	326
query8	486	442	432	432
query9	8581	2526	2519	2519
query10	541	352	360	352
query11	16674	15017	14999	14999
query12	193	142	139	139
query13	1715	461	453	453
query14	9801	8101	7371	7371
query15	298	199	187	187
query16	7343	483	482	482
query17	1624	613	582	582
query18	1307	340	340	340
query19	270	174	173	173
query20	147	142	140	140
query21	250	146	145	145
query22	4248	4024	4008	4008
query23	34147	33391	33170	33170
query24	11225	2914	2898	2898
query25	617	420	409	409
query26	724	183	183	183
query27	2052	311	305	305
query28	5909	2145	2139	2139
query29	676	459	445	445
query30	335	190	185	185
query31	1069	804	829	804
query32	121	80	81	80
query33	728	336	335	335
query34	895	529	496	496
query35	885	754	762	754
query36	1126	942	957	942
query37	159	104	103	103
query38	3994	3908	3856	3856
query39	1553	1501	1537	1501
query40	235	156	158	156
query41	144	137	139	137
query42	140	118	120	118
query43	547	501	505	501
query44	1167	791	815	791
query45	228	199	198	198
query46	1134	768	783	768
query47	1905	1856	1851	1851
query48	422	339	333	333
query49	1219	584	591	584
query50	859	470	462	462
query51	7148	7166	7068	7068
query52	127	108	110	108
query53	302	231	225	225
query54	1006	524	497	497
query55	90	88	92	88
query56	330	312	308	308
query57	1192	1115	1134	1115
query58	314	315	314	314
query59	3145	2823	2789	2789
query60	355	325	335	325
query61	154	146	150	146
query62	878	702	712	702
query63	261	226	224	224
query64	4888	2387	1865	1865
query65	3247	3154	3207	3154
query66	1213	684	676	676
query67	15720	15024	14984	14984
query68	8415	606	607	606
query69	760	435	352	352
query70	1249	1081	1171	1081
query71	551	316	309	309
query72	7615	2312	2078	2078
query73	1687	358	358	358
query74	9190	8798	8909	8798
query75	4734	2752	2783	2752
query76	4794	1101	1007	1007
query77	950	437	443	437
query78	9703	9264	9450	9264
query79	7469	547	554	547
query80	1853	614	610	610
query81	645	256	261	256
query82	315	157	160	157
query83	346	218	221	218
query84	291	97	100	97
query85	947	373	352	352
query86	349	326	327	326
query87	4399	4375	4317	4317
query88	4874	2540	2570	2540
query89	530	325	329	325
query90	1776	235	229	229
query91	155	128	127	127
query92	86	77	75	75
query93	5143	564	561	561
query94	664	328	314	314
query95	389	297	287	287
query96	629	282	289	282
query97	3251	3093	3060	3060
query98	247	230	227	227
query99	1532	1301	1297	1297
Total cold run time: 306536 ms
Total hot run time: 191574 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.75 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 987741164e8ca1f08d3d8ed8e721031ff6ac447a, data reload: false

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.23	0.05	0.06
query4	1.68	0.08	0.07
query5	0.49	0.50	0.49
query6	1.14	0.73	0.72
query7	0.02	0.01	0.02
query8	0.06	0.06	0.05
query9	0.55	0.49	0.48
query10	0.55	0.56	0.55
query11	0.15	0.12	0.12
query12	0.16	0.13	0.13
query13	0.63	0.60	0.59
query14	0.78	0.79	0.78
query15	0.84	0.83	0.84
query16	0.36	0.38	0.38
query17	1.05	0.97	1.06
query18	0.22	0.22	0.22
query19	1.86	1.73	1.74
query20	0.02	0.02	0.01
query21	15.43	0.66	0.66
query22	4.02	7.75	1.46
query23	18.31	1.41	1.42
query24	2.07	0.22	0.24
query25	0.16	0.10	0.08
query26	0.28	0.18	0.19
query27	0.08	0.09	0.08
query28	13.28	1.03	1.02
query29	12.61	3.40	3.38
query30	0.40	0.20	0.19
query31	2.81	0.39	0.39
query32	3.26	0.51	0.48
query33	2.92	2.98	2.99
query34	16.96	4.35	4.35
query35	4.44	4.39	4.46
query36	0.68	0.48	0.48
query37	0.21	0.17	0.18
query38	0.17	0.17	0.17
query39	0.07	0.06	0.05
query40	0.19	0.16	0.15
query41	0.11	0.07	0.07
query42	0.08	0.07	0.07
query43	0.07	0.06	0.06
Total cold run time: 109.53 s
Total hot run time: 30.75 s

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 38190 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit e12f0aaf41a3494869f3ea331c0c31bc90703da6, data reload: false

------ Round 1 ----------------------------------
q1	18249	4320	4301	4301
q2	2058	211	226	211
q3	10366	1170	1120	1120
q4	10183	755	795	755
q5	7756	2812	2797	2797
q6	262	161	162	161
q7	1003	667	654	654
q8	9384	2132	2046	2046
q9	7238	6548	6515	6515
q10	7084	2219	2219	2219
q11	486	277	280	277
q12	442	269	267	267
q13	18036	2977	3015	2977
q14	311	275	256	256
q15	552	514	508	508
q16	533	413	407	407
q17	993	767	777	767
q18	7535	6827	6751	6751
q19	6088	1106	1056	1056
q20	686	355	348	348
q21	3934	2860	2754	2754
q22	1138	1043	1064	1043
Total cold run time: 114317 ms
Total hot run time: 38190 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4544	4297	4274	4274
q2	397	312	300	300
q3	2849	2589	2624	2589
q4	1892	1646	1656	1646
q5	5368	5380	5372	5372
q6	242	146	147	146
q7	2085	1694	1742	1694
q8	3185	3353	3316	3316
q9	8402	8380	8317	8317
q10	3416	3171	3179	3171
q11	637	534	530	530
q12	798	626	638	626
q13	17381	3014	3045	3014
q14	342	300	305	300
q15	578	531	522	522
q16	523	465	475	465
q17	1775	1486	1468	1468
q18	7601	7720	7349	7349
q19	1712	1567	1655	1567
q20	2024	1825	1827	1825
q21	7381	5203	5078	5078
q22	1164	1068	1035	1035
Total cold run time: 74296 ms
Total hot run time: 54604 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191161 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit e12f0aaf41a3494869f3ea331c0c31bc90703da6, data reload: false

query1	983	397	392	392
query2	6780	2024	1946	1946
query3	6686	232	253	232
query4	26945	23674	23258	23258
query5	4363	670	648	648
query6	296	200	214	200
query7	4620	330	324	324
query8	480	435	439	435
query9	8727	2529	2514	2514
query10	521	357	354	354
query11	17584	15082	15117	15082
query12	188	140	138	138
query13	1723	453	451	451
query14	9636	7185	7337	7185
query15	272	196	187	187
query16	8179	503	504	503
query17	1685	613	582	582
query18	2186	341	355	341
query19	365	176	172	172
query20	144	140	141	140
query21	283	147	146	146
query22	4306	4006	3951	3951
query23	34052	33278	33268	33268
query24	11291	2943	2924	2924
query25	660	426	419	419
query26	1171	188	184	184
query27	2268	311	305	305
query28	7174	2159	2109	2109
query29	870	461	445	445
query30	326	189	204	189
query31	1037	831	848	831
query32	122	83	82	82
query33	820	346	348	346
query34	903	515	519	515
query35	890	774	760	760
query36	1103	998	936	936
query37	174	104	106	104
query38	3920	3807	3839	3807
query39	1518	1477	1501	1477
query40	236	160	155	155
query41	144	140	141	140
query42	135	118	122	118
query43	549	495	510	495
query44	1317	790	818	790
query45	237	195	196	195
query46	1123	765	779	765
query47	1914	1843	1837	1837
query48	415	347	343	343
query49	1185	585	585	585
query50	862	489	478	478
query51	7148	7181	7193	7181
query52	128	110	111	110
query53	307	233	225	225
query54	952	516	511	511
query55	94	91	92	91
query56	340	307	308	307
query57	1200	1089	1120	1089
query58	330	304	328	304
query59	2971	2672	2668	2668
query60	352	332	341	332
query61	152	152	148	148
query62	874	710	688	688
query63	266	235	230	230
query64	5342	2357	1820	1820
query65	3326	3164	3161	3161
query66	1084	682	684	682
query67	15633	14838	15244	14838
query68	7851	598	596	596
query69	735	441	375	375
query70	1223	1159	1172	1159
query71	542	325	311	311
query72	7268	2306	2036	2036
query73	903	364	368	364
query74	9318	8804	8812	8804
query75	4401	2716	2742	2716
query76	4845	1025	994	994
query77	871	440	443	440
query78	9736	9086	9366	9086
query79	8333	562	559	559
query80	1250	635	621	621
query81	627	271	262	262
query82	308	163	158	158
query83	350	221	216	216
query84	289	100	101	100
query85	1042	378	357	357
query86	334	326	338	326
query87	4392	4172	4238	4172
query88	4417	2608	2545	2545
query89	530	335	324	324
query90	1767	236	241	236
query91	157	132	132	132
query92	89	76	78	76
query93	6012	568	561	561
query94	649	320	328	320
query95	396	299	297	297
query96	612	283	291	283
query97	3208	3072	3055	3055
query98	248	226	223	223
query99	1585	1310	1289	1289
Total cold run time: 308155 ms
Total hot run time: 191161 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.73 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit e12f0aaf41a3494869f3ea331c0c31bc90703da6, data reload: false

query1	0.05	0.06	0.04
query2	0.09	0.04	0.05
query3	0.23	0.06	0.06
query4	1.66	0.08	0.07
query5	0.53	0.50	0.49
query6	1.14	0.73	0.73
query7	0.02	0.02	0.02
query8	0.05	0.05	0.06
query9	0.55	0.46	0.49
query10	0.53	0.53	0.55
query11	0.16	0.12	0.12
query12	0.16	0.13	0.13
query13	0.62	0.60	0.60
query14	0.76	0.79	0.80
query15	0.83	0.83	0.83
query16	0.37	0.36	0.38
query17	0.97	1.03	1.04
query18	0.22	0.21	0.21
query19	1.80	1.67	1.73
query20	0.01	0.01	0.02
query21	15.41	0.67	0.66
query22	3.93	7.69	1.60
query23	18.25	1.37	1.25
query24	2.11	0.23	0.22
query25	0.15	0.09	0.09
query26	0.28	0.18	0.18
query27	0.09	0.09	0.08
query28	13.22	1.03	1.01
query29	12.65	3.30	3.28
query30	0.42	0.25	0.24
query31	2.80	0.40	0.40
query32	3.26	0.48	0.50
query33	2.98	3.01	3.00
query34	17.34	4.38	4.36
query35	4.57	4.45	4.42
query36	0.67	0.50	0.49
query37	0.20	0.18	0.18
query38	0.18	0.17	0.16
query39	0.07	0.05	0.06
query40	0.19	0.15	0.15
query41	0.12	0.07	0.07
query42	0.07	0.06	0.07
query43	0.06	0.06	0.06
Total cold run time: 109.77 s
Total hot run time: 30.73 s

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 22, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman merged commit 355620b into apache:master Aug 23, 2024
27 of 30 checks passed
dataroaring pushed a commit that referenced this pull request Aug 26, 2024
…r be 8040. (#39577)

Add http authentication to all API interfaces under be 8040
The `enable_all_http_auth parameter` in be.conf can control the switch.
morningman pushed a commit that referenced this pull request Aug 29, 2024
hubgeter added a commit to hubgeter/doris that referenced this pull request Aug 29, 2024
yiguolei pushed a commit that referenced this pull request Aug 29, 2024
dataroaring pushed a commit that referenced this pull request Sep 3, 2024
morningman added a commit that referenced this pull request Nov 12, 2024
### What problem does this PR solve?
Related PR: #39577

Problem Summary:
In #39577, we added the auth check for all HTTP API on FE side.
But it introduced an issue that when `enable_all_http_auth`, the
internal http request
will fail due to lack of authentication info.
For example, when cloning replica from one BE to another, it use HTTP
API.

This PR mainly changes:

1. Unify the token generation and checking logic

	Move `TokenManager` from `load` package to `Env`, as a global mgr.

	It is responsible for generating tokens at fix interval.
	And the token will be sent to BE via heartbeat.

	BE will save last 2 tokens, and use the latest token in HTTP request.

	All HTTP request sent by BE will add a header `Auth-Token`,
and BE's HTTP server will check if this token in header is same as token
	from FE heartbeat.

2. Add a new class `ClusterInfo` on BE side to replace `TMasterInfo`.

	`TMasterInfo` is a thrift object used to save master info and pass them
	from FE to BE via heartbeat.
	So it should only be a message payload, we should get info from it and
	save it in another structure: `ClusterInfo`.

Co-authored-by: morningman <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 12, 2024
### What problem does this PR solve?
Related PR: #39577

Problem Summary:
In #39577, we added the auth check for all HTTP API on FE side.
But it introduced an issue that when `enable_all_http_auth`, the
internal http request
will fail due to lack of authentication info.
For example, when cloning replica from one BE to another, it use HTTP
API.

This PR mainly changes:

1. Unify the token generation and checking logic

	Move `TokenManager` from `load` package to `Env`, as a global mgr.

	It is responsible for generating tokens at fix interval.
	And the token will be sent to BE via heartbeat.

	BE will save last 2 tokens, and use the latest token in HTTP request.

	All HTTP request sent by BE will add a header `Auth-Token`,
and BE's HTTP server will check if this token in header is same as token
	from FE heartbeat.

2. Add a new class `ClusterInfo` on BE side to replace `TMasterInfo`.

	`TMasterInfo` is a thrift object used to save master info and pass them
	from FE to BE via heartbeat.
	So it should only be a message payload, we should get info from it and
	save it in another structure: `ClusterInfo`.

Co-authored-by: morningman <[email protected]>
zzzxl1993 pushed a commit to zzzxl1993/doris that referenced this pull request Nov 12, 2024
### What problem does this PR solve?
Related PR: apache#39577

Problem Summary:
In apache#39577, we added the auth check for all HTTP API on FE side.
But it introduced an issue that when `enable_all_http_auth`, the
internal http request
will fail due to lack of authentication info.
For example, when cloning replica from one BE to another, it use HTTP
API.

This PR mainly changes:

1. Unify the token generation and checking logic

	Move `TokenManager` from `load` package to `Env`, as a global mgr.

	It is responsible for generating tokens at fix interval.
	And the token will be sent to BE via heartbeat.

	BE will save last 2 tokens, and use the latest token in HTTP request.

	All HTTP request sent by BE will add a header `Auth-Token`,
and BE's HTTP server will check if this token in header is same as token
	from FE heartbeat.

2. Add a new class `ClusterInfo` on BE side to replace `TMasterInfo`.

	`TMasterInfo` is a thrift object used to save master info and pass them
	from FE to BE via heartbeat.
	So it should only be a message payload, we should get info from it and
	save it in another structure: `ClusterInfo`.

Co-authored-by: morningman <[email protected]>
py023 pushed a commit to py023/doris that referenced this pull request Nov 13, 2024
### What problem does this PR solve?
Related PR: apache#39577

Problem Summary:
In apache#39577, we added the auth check for all HTTP API on FE side.
But it introduced an issue that when `enable_all_http_auth`, the
internal http request
will fail due to lack of authentication info.
For example, when cloning replica from one BE to another, it use HTTP
API.

This PR mainly changes:

1. Unify the token generation and checking logic

	Move `TokenManager` from `load` package to `Env`, as a global mgr.

	It is responsible for generating tokens at fix interval.
	And the token will be sent to BE via heartbeat.

	BE will save last 2 tokens, and use the latest token in HTTP request.

	All HTTP request sent by BE will add a header `Auth-Token`,
and BE's HTTP server will check if this token in header is same as token
	from FE heartbeat.

2. Add a new class `ClusterInfo` on BE side to replace `TMasterInfo`.

	`TMasterInfo` is a thrift object used to save master info and pass them
	from FE to BE via heartbeat.
	So it should only be a message payload, we should get info from it and
	save it in another structure: `ClusterInfo`.

Co-authored-by: morningman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants