File tree Expand file tree Collapse file tree 5 files changed +638
-5
lines changed
fluss-flink/fluss-flink-common/src
main/java/com/alibaba/fluss/flink/procedure
test/java/com/alibaba/fluss/flink/procedure Expand file tree Collapse file tree 5 files changed +638
-5
lines changed Original file line number Diff line number Diff line change 3636
3737import java .util .Collection ;
3838
39+ import static com .alibaba .fluss .security .acl .Resource .FLUSS_CLUSTER ;
40+
3941/** Procedure to list acl. */
4042public class ListAclProcedure extends AbstractAclProcedure {
4143 @ ProcedureHint (
@@ -106,10 +108,14 @@ private static String aclBindingToString(AclBinding binding) {
106108 ace .getPrincipal () != null
107109 ? (ace .getPrincipal ().getType () + ":" + ace .getPrincipal ().getName ())
108110 : null ;
111+ String resourceName =
112+ FLUSS_CLUSTER .equals (resource .getName ())
113+ ? "cluster"
114+ : "cluster." + resource .getName ();
109115
110116 return String .join (
111117 ";" ,
112- formatEntry ("resourceType " , resource . getName () ),
118+ formatEntry ("resource " , resourceName ),
113119 formatEntry (
114120 "permission" ,
115121 ace .getPermissionType () != null ? ace .getPermissionType ().name () : null ),
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ void testIndexArgument() throws Exception {
135135 .collect (Collectors .toList ());
136136 assertThat (acls )
137137 .containsExactlyInAnyOrder (
138- "+I[resourceType =\" fluss- cluster\" ;permission=\" ALLOW\" ;principal=\" User:Alice\" ;operation=\" READ\" ;host=\" *\" ]" );
138+ "+I[resource =\" cluster\" ;permission=\" ALLOW\" ;principal=\" User:Alice\" ;operation=\" READ\" ;host=\" *\" ]" );
139139 }
140140 }
141141
@@ -170,7 +170,7 @@ void testAclProcedureIgnoreCase(boolean upperCase) throws Exception {
170170 .collect (Collectors .toList ());
171171 assertThat (acls )
172172 .containsExactlyInAnyOrder (
173- "+I[resourceType =\" fluss- cluster\" ;permission=\" ALLOW\" ;principal=\" User:Alice\" ;operation=\" READ\" ;host=\" 127.0.0.1\" ]" );
173+ "+I[resource =\" cluster\" ;permission=\" ALLOW\" ;principal=\" User:Alice\" ;operation=\" READ\" ;host=\" 127.0.0.1\" ]" );
174174 }
175175 tEnv .executeSql (dropAcl ).await ();
176176 try (CloseableIterator <Row > listProceduresIterator = tEnv .executeSql (listAcl ).collect ()) {
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ bin/start-cluster.sh
361361# ## Enter into SQL-Client
362362Use the following command to enter the Flink SQL CLI Container :
363363` ` ` shell
364- . /sql-client
364+ bin /sql-client.sh
365365` ` `
366366
367367# ## Create Fluss Catalog
Original file line number Diff line number Diff line change 11---
2- title : Flink
2+ title : Real-Time Analytics with Flink.
33sidebar_position : 1
44---
55
You can’t perform that action at this time.
0 commit comments