diff --git a/examples/local/scripts/vtgate-up.sh b/examples/local/scripts/vtgate-up.sh index cb33e27839b..afab5caef07 100755 --- a/examples/local/scripts/vtgate-up.sh +++ b/examples/local/scripts/vtgate-up.sh @@ -39,7 +39,10 @@ vtgate \ --tablet_types_to_wait PRIMARY,REPLICA \ --service_map 'grpc-vtgateservice' \ --pid_file $VTDATAROOT/tmp/vtgate.pid \ - --mysql_auth_server_impl none \ + --mysql_auth_server_impl static \ + --mysql_auth_server_static_file /home/spin/src/github.com/Shopify/vitess/examples/local/mysql_auth_server_static_creds.json \ + --mysql_auth_static_reload_interval 5s \ + --schema_change_signal_user mysql_user \ > $VTDATAROOT/tmp/vtgate.out 2>&1 & # Block waiting for vtgate to be listening diff --git a/examples/local/scripts/vttablet-up.sh b/examples/local/scripts/vttablet-up.sh index 43d0849ce76..1c471590b17 100755 --- a/examples/local/scripts/vttablet-up.sh +++ b/examples/local/scripts/vttablet-up.sh @@ -56,6 +56,10 @@ vttablet \ --pid_file $VTDATAROOT/$tablet_dir/vttablet.pid \ --vtctld_addr http://$hostname:$vtctld_web_port/ \ --disable_active_reparents \ + --enforce-tableacl-config \ + --table-acl-config-reload-interval 5s \ + --queryserver-config-strict-table-acl \ + --table-acl-config /home/spin/src/github.com/Shopify/vitess/examples/local/table_acl.json \ > $VTDATAROOT/$tablet_dir/vttablet.out 2>&1 & # Block waiting for the tablet to be listening diff --git a/examples/local/table_acl.json b/examples/local/table_acl.json new file mode 100644 index 00000000000..bc3381f9139 --- /dev/null +++ b/examples/local/table_acl.json @@ -0,0 +1,19 @@ +{ + "table_groups": [ + { + "name": "all-tables", + "table_names_or_prefixes": [ + "%" + ], + "admins": [ + "mysql_user" + ], + "readers": [ + "mysql_user" + ], + "writers": [ + "mysql_user" + ] + } + ] +}