Skip to content

Conversation

@zddr
Copy link
Contributor

@zddr zddr commented Aug 14, 2025

pick: #54087

The LDAP user does not exist in Doris, so a "user does not exist" prompt
will appear when executing the "show grants" command.

It is a reasonable requirement for users to check their own permissions
after logging in. Therefore, this PR enables LDAP users to view their
own permissions when executing `show grants` themselves. However, others
are still unable to do so, whether by specifying a particular username
or checking all users.

# Conflicts:
#	fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowGrantsCommand.java
#	fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/ShowGrantsCommandTest.java
@zddr zddr requested a review from dataroaring as a code owner August 14, 2025 07:54
@Thearas
Copy link
Contributor

Thearas commented Aug 14, 2025

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?

@zddr
Copy link
Contributor Author

zddr commented Aug 14, 2025

run buildall

@zddr zddr changed the title [enhance](auth)support ldap user show grants (#54087) branch-3.0:[enhance](auth)support ldap user show grants (#54087) Aug 14, 2025
@zddr
Copy link
Contributor Author

zddr commented Aug 15, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17591	7326	6959	6959
q2	2035	182	174	174
q3	10698	1161	1177	1161
q4	10505	751	768	751
q5	7742	2860	2806	2806
q6	212	134	136	134
q7	967	625	605	605
q8	9370	1953	2002	1953
q9	6662	6394	6368	6368
q10	7004	2201	2279	2201
q11	457	258	265	258
q12	400	220	211	211
q13	17802	2972	2967	2967
q14	243	207	206	206
q15	526	459	474	459
q16	468	374	381	374
q17	959	640	617	617
q18	7410	6804	6663	6663
q19	1407	1108	1064	1064
q20	479	202	207	202
q21	3910	3066	3114	3066
q22	1101	987	987	987
Total cold run time: 107948 ms
Total hot run time: 40186 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6997	6910	6932	6910
q2	329	231	240	231
q3	3079	3005	2900	2900
q4	2086	1821	1806	1806
q5	5753	5736	5707	5707
q6	211	133	130	130
q7	2263	1851	1841	1841
q8	3396	3647	3536	3536
q9	8945	8959	8891	8891
q10	3609	3606	3579	3579
q11	576	512	493	493
q12	794	633	614	614
q13	7951	3166	3185	3166
q14	299	273	271	271
q15	531	474	472	472
q16	486	442	444	442
q17	1886	1639	1605	1605
q18	8255	7835	7619	7619
q19	1638	1596	1447	1447
q20	2116	1868	1908	1868
q21	5376	5130	4989	4989
q22	1147	1029	1015	1015
Total cold run time: 67723 ms
Total hot run time: 59532 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193026 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 7db3f09925df556cab946adc78fb18815e039fce, data reload: false

query1	966	384	382	382
query2	6214	1986	1965	1965
query3	8710	200	202	200
query4	33516	23529	23505	23505
query5	3436	463	454	454
query6	292	190	173	173
query7	4209	311	327	311
query8	291	217	229	217
query9	9477	2618	2607	2607
query10	492	268	268	268
query11	18114	15335	15635	15335
query12	173	102	103	102
query13	1563	427	437	427
query14	10338	7229	6925	6925
query15	251	173	176	173
query16	8038	502	529	502
query17	1584	626	599	599
query18	2152	333	357	333
query19	248	172	161	161
query20	124	118	118	118
query21	217	109	108	108
query22	4717	4455	4325	4325
query23	34885	34203	34524	34203
query24	11735	2916	2926	2916
query25	711	419	428	419
query26	1925	181	175	175
query27	2767	361	368	361
query28	7640	2179	2159	2159
query29	1101	477	466	466
query30	272	172	165	165
query31	1105	844	830	830
query32	95	59	61	59
query33	790	329	369	329
query34	993	531	524	524
query35	860	726	736	726
query36	1107	949	969	949
query37	261	70	72	70
query38	4069	3956	3969	3956
query39	1498	1489	1445	1445
query40	261	103	102	102
query41	53	49	52	49
query42	117	102	106	102
query43	529	489	488	488
query44	1291	821	826	821
query45	184	172	179	172
query46	1171	745	733	733
query47	2023	1892	1912	1892
query48	492	391	397	391
query49	1038	410	409	409
query50	840	436	428	428
query51	7567	7293	7217	7217
query52	101	94	96	94
query53	263	194	194	194
query54	1363	491	469	469
query55	87	80	80	80
query56	263	243	275	243
query57	1327	1187	1193	1187
query58	232	209	216	209
query59	3373	3149	3071	3071
query60	284	265	252	252
query61	112	113	112	112
query62	888	671	700	671
query63	222	201	202	201
query64	4930	673	667	667
query65	3331	3337	3302	3302
query66	1380	319	295	295
query67	16210	15732	15797	15732
query68	5340	571	574	571
query69	446	272	267	267
query70	1196	1120	1111	1111
query71	334	265	291	265
query72	6197	4094	3964	3964
query73	756	356	351	351
query74	10316	9117	9242	9117
query75	3353	2620	2660	2620
query76	3275	1048	1187	1048
query77	406	269	267	267
query78	10558	9612	9546	9546
query79	1911	615	594	594
query80	1112	447	422	422
query81	548	225	219	219
query82	611	87	89	87
query83	236	149	147	147
query84	239	82	75	75
query85	1403	304	290	290
query86	459	301	285	285
query87	4427	4203	4209	4203
query88	3786	2507	2364	2364
query89	411	296	284	284
query90	1990	190	192	190
query91	185	149	152	149
query92	62	51	53	51
query93	2513	561	563	561
query94	923	305	306	305
query95	367	261	263	261
query96	618	278	290	278
query97	3308	3106	3183	3106
query98	222	195	198	195
query99	1491	1316	1308	1308
Total cold run time: 305867 ms
Total hot run time: 193026 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.07
query4	1.63	0.11	0.11
query5	0.53	0.50	0.52
query6	1.14	0.72	0.73
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.56	0.50	0.51
query10	0.56	0.55	0.56
query11	0.15	0.11	0.10
query12	0.13	0.11	0.11
query13	0.60	0.59	0.58
query14	0.78	0.81	0.81
query15	0.84	0.82	0.82
query16	0.37	0.38	0.41
query17	1.05	1.02	0.98
query18	0.25	0.22	0.22
query19	1.93	1.80	1.75
query20	0.01	0.01	0.01
query21	15.39	0.60	0.57
query22	2.62	1.63	2.17
query23	16.89	0.87	0.91
query24	2.98	0.97	1.19
query25	0.17	0.10	0.22
query26	0.31	0.13	0.14
query27	0.06	0.04	0.03
query28	10.45	0.54	0.46
query29	12.57	3.17	3.20
query30	0.24	0.06	0.06
query31	2.88	0.40	0.38
query32	3.22	0.46	0.46
query33	2.99	3.00	3.04
query34	17.03	4.50	4.53
query35	4.57	4.54	4.60
query36	0.68	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.03	0.03	0.02
query40	0.16	0.12	0.12
query41	0.08	0.02	0.03
query42	0.04	0.02	0.03
query43	0.04	0.04	0.03
Total cold run time: 104.46 s
Total hot run time: 29.96 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit e6899fe into apache:branch-3.0 Sep 5, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants