The tenant allowlist feature allows you to set the clients that are allowed to access the current tenant.
Background information
The tenant allowlist is a list of clients that are allowed to log on to this tenant and is specified by the ob_tcp_invited_nodes system variable. You can set the tenant allowlist based on your business requirements. IP addresses in the tenant allowlist can be in one of the following formats:
Regular IP addresses, such as
10.10.10.10,10.10.10.11Subnet/mask, such as
10.10.10.0/24Fuzzy match, such as
10.10.10.%or10.10.10._Mixed format, such as
10.10.10.10, 10.10.10.11, 10.10.10.%, 10.10.10._, 10.10.10.0/24
View the tenant allowlist
Log on to the database as a tenant administrator.
obclient -h172.30.xx.xx -P2883 -uroot@mq_t1#cluster -AView the tenant allowlist.
obclient> SHOW VARIABLES LIKE 'ob_tcp_invited_nodes'; +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | ob_tcp_invited_nodes | % | +----------------------+-------+
Modify the allowlist configuration of a tenant
You can modify the allowlist configuration of a tenant as the administrator of the sys tenant or the current tenant.
Modify the tenant allowlist as the administrator of the sys tenant
Log on to the sys tenant of the cluster as the root user.
obclient -h172.30.xx.xx -P2883 -uroot@mq_t1#cluster -p**** -AModify the allowlist configuration of the tenant.
obclient> ALTER TENANT mq_t1 VARIABLES ob_tcp_invited_nodes = '10.10.10.%';
Modify the allowlist configuration of a user tenant as its administrator
Log on to the database as a tenant administrator.
obclient -h172.30.xx.xx -P2883 -uroot@mq_t1#cluster -AModify the allowlist configuration of the tenant.
obclient> SET GLOBAL ob_tcp_invited_nodes='10.10.10.%';View the modification result.
obclient> SHOW VARIABLES LIKE 'ob_tcp_invited_nodes'; +----------------------+------------+ | Variable_name | Value | +----------------------+------------+ | ob_tcp_invited_nodes | 10.10.10.% | +----------------------+------------+