Skip to content

[fix](config) Mask sensitive FE configs in SHOW FRONTEND CONFIG via @ConfField(sensitive) - #67338

Open
starocean999 wants to merge 1 commit into
apache:masterfrom
starocean999:master_0423
Open

[fix](config) Mask sensitive FE configs in SHOW FRONTEND CONFIG via @ConfField(sensitive)#67338
starocean999 wants to merge 1 commit into
apache:masterfrom
starocean999:master_0423

Conversation

@starocean999

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

SHOW FRONTEND CONFIG exposes several password-related FE configs in plaintext, such as
mysql_ssl_default_ca_certificate_password, key_store_password, tls_private_key_password,
initial_root_password, and mysql_ssl_default_server_certificate_password. Any user with ADMIN
privilege who can run SHOW FRONTEND CONFIG can read these secrets directly.

This PR marks these config fields with @ConfField(sensitive = true) in Config.java, so the existing
ConfigBase.maskIfSensitive mechanism automatically masks their values with ******** in
ConfigBase.getConfigInfo() (used by SHOW FRONTEND CONFIG) and ConfigBase.dump(). This is a
single, centrally maintained mechanism: any future sensitive config only needs the same annotation.
Only non-empty secrets are masked; empty values are left as-is to keep "unset" visible, and
non-sensitive configs are returned unchanged.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@starocean999

Copy link
Copy Markdown
Contributor Author

/review

@starocean999

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Selected model is at capacity. Please try a different model.
Workflow run: https://github.com/apache/doris/actions/runs/33370617559

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/366) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17627	3040	3046	3040
q2	2111	251	223	223
q3	10217	861	511	511
q4	4670	257	206	206
q5	7671	582	401	401
q6	137	117	95	95
q7	538	503	392	392
q8	9241	923	947	923
q9	3482	2437	2406	2406
q10	6491	855	725	725
q11	393	202	189	189
q12	622	260	199	199
q13	18119	1547	1168	1168
q14	158	153	138	138
q15	q16	439	399	380	380
q17	1399	864	799	799
q18	3191	2319	2339	2319
q19	1106	951	790	790
q20	371	280	203	203
q21	4876	1687	1892	1687
q22	326	271	232	232
Total cold run time: 93185 ms
Total hot run time: 17026 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3384	3329	3306	3306
q2	528	415	369	369
q3	2239	2368	2259	2259
q4	1212	1191	901	901
q5	2215	2209	2143	2143
q6	169	121	89	89
q7	1095	988	855	855
q8	1611	1419	1408	1408
q9	3249	3203	3197	3197
q10	1902	1859	1698	1698
q11	367	273	260	260
q12	458	425	348	348
q13	1485	1544	1169	1169
q14	182	183	165	165
q15	q16	401	402	364	364
q17	3740	3412	3345	3345
q18	5022	4545	4952	4545
q19	993	853	840	840
q20	1038	992	828	828
q21	3928	3191	3234	3191
q22	411	362	326	326
Total cold run time: 35629 ms
Total hot run time: 31606 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 83165 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 040acc8705ef6c27adda96cbb95e55c94a5d5657, data reload: false

query5	4286	415	350	350
query6	379	136	125	125
query7	4940	367	238	238
query8	289	126	114	114
query9	8696	2882	2889	2882
query10	385	222	178	178
query11	5377	1047	939	939
query12	117	74	74	74
query13	1194	448	344	344
query14	6144	2257	2142	2142
query14_1	2029	2022	2008	2008
query15	171	121	112	112
query16	919	381	343	343
query17	793	450	364	364
query18	2321	342	256	256
query19	160	131	104	104
query20	68	74	69	69
query21	196	99	86	86
query22	5635	5491	5495	5491
query23	6877	6370	6159	6159
query23_1	6210	6381	6094	6094
query24	7293	1090	782	782
query24_1	778	793	759	759
query25	420	280	248	248
query26	1233	231	138	138
query27	2779	376	250	250
query28	4739	1499	1478	1478
query29	911	426	342	342
query30	246	146	131	131
query31	819	406	345	345
query32	126	74	77	74
query33	454	220	178	178
query34	999	827	497	497
query35	440	409	348	348
query36	569	570	534	534
query37	114	76	68	68
query38	1005	871	813	813
query39	499	497	462	462
query39_1	457	499	479	479
query40	199	90	73	73
query41	57	57	53	53
query42	72	73	73	73
query43	244	244	210	210
query44	1011	550	576	550
query45	108	107	98	98
query46	792	895	529	529
query47	781	763	696	696
query48	296	301	232	232
query49	523	243	188	188
query50	774	255	190	190
query51	7945	8119	8031	8031
query52	68	70	63	63
query53	206	202	145	145
query54	211	181	163	163
query55	74	58	69	58
query56	262	179	151	151
query57	704	688	629	629
query58	199	151	156	151
query59	1255	1273	1134	1134
query60	230	182	188	182
query61	173	146	129	129
query62	364	199	199	199
query63	174	137	144	137
query64	2738	719	602	602
query65	1666	1690	1634	1634
query66	1949	265	196	196
query67	10201	9921	9886	9886
query68	3018	1232	778	778
query69	338	213	194	194
query70	669	652	623	623
query71	255	178	168	168
query72	2468	2005	1589	1589
query73	654	625	344	344
query74	2015	1251	1156	1156
query75	1188	1130	976	976
query76	2387	757	560	560
query77	259	261	217	217
query78	3896	3668	3256	3256
query79	1263	829	547	547
query80	1185	314	272	272
query81	506	157	134	134
query82	625	126	97	97
query83	314	208	190	190
query84	293	113	88	88
query85	801	350	331	331
query86	391	172	177	172
query87	1042	988	917	917
query88	2776	2104	2097	2097
query89	279	195	174	174
query90	1926	121	124	121
query91	129	123	100	100
query92	83	69	70	69
query93	1346	1156	758	758
query94	613	263	219	219
query95	510	254	298	254
query96	804	567	268	268
query97	1094	1080	1046	1046
query98	149	140	135	135
query99	424	343	310	310
Total cold run time: 177439 ms
Total hot run time: 83165 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 14.8 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 040acc8705ef6c27adda96cbb95e55c94a5d5657, data reload: false

query1	0.01	0.00	0.01
query2	0.08	0.04	0.03
query3	0.25	0.11	0.11
query4	1.60	0.11	0.10
query5	0.18	0.17	0.16
query6	1.24	0.68	0.71
query7	0.03	0.01	0.00
query8	0.05	0.03	0.03
query9	0.28	0.21	0.22
query10	0.34	0.35	0.34
query11	0.17	0.12	0.11
query12	0.16	0.12	0.12
query13	0.32	0.30	0.31
query14	0.45	0.45	0.46
query15	0.36	0.36	0.37
query16	0.24	0.23	0.23
query17	0.70	0.71	0.65
query18	0.17	0.17	0.17
query19	1.18	1.17	1.21
query20	0.02	0.01	0.01
query21	15.45	0.16	0.11
query22	5.08	0.05	0.04
query23	16.23	0.25	0.10
query24	3.05	0.31	0.28
query25	0.10	0.05	0.04
query26	0.84	0.18	0.12
query27	0.04	0.03	0.02
query28	3.69	0.54	0.26
query29	12.48	3.17	2.56
query30	0.26	0.12	0.12
query31	2.76	0.37	0.17
query32	3.52	0.33	0.23
query33	1.42	1.53	1.47
query34	15.43	2.26	1.79
query35	1.78	1.75	1.75
query36	0.45	0.29	0.28
query37	0.06	0.04	0.04
query38	0.04	0.04	0.03
query39	0.03	0.02	0.02
query40	0.11	0.08	0.07
query41	0.07	0.02	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 90.8 s
Total hot run time: 14.8 s

@starocean999
starocean999 marked this pull request as ready for review September 1, 2026 02:17
@morrySnow morrySnow changed the title [fix](fe) Mask sensitive FE configs in SHOW FRONTEND CONFIG via @ConfField(sensitive) [fix](config) Mask sensitive FE configs in SHOW FRONTEND CONFIG via @ConfField(sensitive) Sep 2, 2026
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.

3 participants