mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
122 lines
7.5 KiB
Plaintext
122 lines
7.5 KiB
Plaintext
-- default
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
-- same as default
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password
|
|
-- rename
|
|
CREATE USER u2_01292_renamed IDENTIFIED WITH no_password
|
|
-- authentication
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u2_01292 IDENTIFIED WITH plaintext_password
|
|
CREATE USER u3_01292 IDENTIFIED WITH sha256_password
|
|
CREATE USER u4_01292 IDENTIFIED WITH sha256_password
|
|
CREATE USER u5_01292 IDENTIFIED WITH sha256_password
|
|
CREATE USER u6_01292 IDENTIFIED WITH double_sha1_password
|
|
CREATE USER u7_01292 IDENTIFIED WITH double_sha1_password
|
|
CREATE USER u8_01292 IDENTIFIED WITH bcrypt_password
|
|
CREATE USER u9_01292 IDENTIFIED WITH bcrypt_password
|
|
CREATE USER u1_01292 IDENTIFIED WITH sha256_password
|
|
CREATE USER u2_01292 IDENTIFIED WITH sha256_password
|
|
CREATE USER u3_01292 IDENTIFIED WITH sha256_password
|
|
CREATE USER u4_01292 IDENTIFIED WITH plaintext_password
|
|
CREATE USER u5_01292 IDENTIFIED WITH no_password
|
|
-- host
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password HOST NONE
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password HOST LOCAL
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password HOST NAME \'myhost.com\'
|
|
CREATE USER u5_01292 IDENTIFIED WITH no_password HOST LOCAL, NAME \'myhost.com\'
|
|
CREATE USER u6_01292 IDENTIFIED WITH no_password HOST LOCAL, NAME \'myhost.com\'
|
|
CREATE USER u7_01292 IDENTIFIED WITH no_password HOST REGEXP \'.*\\\\.myhost\\\\.com\'
|
|
CREATE USER u8_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u9_01292 IDENTIFIED WITH no_password HOST LIKE \'%.myhost.com\'
|
|
CREATE USER u10_01292 IDENTIFIED WITH no_password HOST LIKE \'%.myhost.com\'
|
|
CREATE USER u11_01292 IDENTIFIED WITH no_password HOST LOCAL
|
|
CREATE USER u12_01292 IDENTIFIED WITH no_password HOST IP \'192.168.1.1\'
|
|
CREATE USER u13_01292 IDENTIFIED WITH no_password HOST IP \'192.168.0.0/16\'
|
|
CREATE USER u14_01292 IDENTIFIED WITH no_password HOST LOCAL
|
|
CREATE USER u15_01292 IDENTIFIED WITH no_password HOST IP \'2001:db8:11a3:9d7:1f34:8a2e:7a0:765d\'
|
|
CREATE USER u16_01292 IDENTIFIED WITH no_password HOST LOCAL, IP \'65:ff0c::/96\'
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password HOST NONE
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password HOST NAME \'myhost.com\'
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password HOST LOCAL, NAME \'myhost.com\'
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password HOST NONE
|
|
-- host after @
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER `u2_01292@%.myhost.com` IDENTIFIED WITH no_password HOST LIKE \'%.myhost.com\'
|
|
CREATE USER `u2_01292@%.myhost.com` IDENTIFIED WITH no_password HOST LIKE \'%.myhost.com\'
|
|
CREATE USER `u3_01292@192.168.%.%` IDENTIFIED WITH no_password HOST LIKE \'192.168.%.%\'
|
|
CREATE USER `u3_01292@192.168.%.%` IDENTIFIED WITH no_password HOST LIKE \'192.168.%.%\'
|
|
CREATE USER `u4_01292@::1` IDENTIFIED WITH no_password HOST LOCAL
|
|
CREATE USER `u4_01292@::1` IDENTIFIED WITH no_password HOST LOCAL
|
|
CREATE USER `u5_01292@65:ff0c::/96` IDENTIFIED WITH no_password HOST LIKE \'65:ff0c::/96\'
|
|
CREATE USER `u5_01292@65:ff0c::/96` IDENTIFIED WITH no_password HOST LIKE \'65:ff0c::/96\'
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password HOST LOCAL
|
|
CREATE USER `u2_01292@%.myhost.com` IDENTIFIED WITH no_password
|
|
-- settings
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password SETTINGS PROFILE `default`
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password SETTINGS max_memory_usage = 5000000
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password SETTINGS max_memory_usage MIN 5000000
|
|
CREATE USER u5_01292 IDENTIFIED WITH no_password SETTINGS max_memory_usage MAX 5000000
|
|
CREATE USER u6_01292 IDENTIFIED WITH no_password SETTINGS max_memory_usage CONST
|
|
CREATE USER u7_01292 IDENTIFIED WITH no_password SETTINGS max_memory_usage WRITABLE
|
|
CREATE USER u8_01292 IDENTIFIED WITH no_password SETTINGS max_memory_usage = 5000000 MIN 4000000 MAX 6000000 CONST
|
|
CREATE USER u9_01292 IDENTIFIED WITH no_password SETTINGS PROFILE `default`, max_memory_usage = 5000000 WRITABLE
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password SETTINGS readonly = 1
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password SETTINGS readonly = 1
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password
|
|
-- default role
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password DEFAULT ROLE NONE
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password DEFAULT ROLE r1_01292
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password DEFAULT ROLE r1_01292, r2_01292
|
|
CREATE USER u5_01292 IDENTIFIED WITH no_password DEFAULT ROLE ALL EXCEPT r2_01292
|
|
CREATE USER u6_01292 IDENTIFIED WITH no_password DEFAULT ROLE ALL EXCEPT r1_01292, r2_01292
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password DEFAULT ROLE r1_01292
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password DEFAULT ROLE ALL EXCEPT r2_01292
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password DEFAULT ROLE r2_01292
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u5_01292 IDENTIFIED WITH no_password DEFAULT ROLE ALL EXCEPT r1_01292
|
|
CREATE USER u6_01292 IDENTIFIED WITH no_password DEFAULT ROLE NONE
|
|
-- complex
|
|
CREATE USER u1_01292 IDENTIFIED WITH plaintext_password HOST LOCAL SETTINGS readonly = 1
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\' DEFAULT ROLE NONE SETTINGS PROFILE `default`
|
|
-- if not exists
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
GRANT r1_01292 TO u1_01292
|
|
-- if not exists-part2
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
GRANT r1_01292, r2_01292 TO u1_01292
|
|
-- or replace
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password
|
|
-- multiple users in one command
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password DEFAULT ROLE NONE
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password DEFAULT ROLE NONE
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\'
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\'
|
|
CREATE USER `u5_01292@%.host.com` IDENTIFIED WITH no_password HOST LIKE \'%.host.com\'
|
|
CREATE USER `u6_01292@%.host.com` IDENTIFIED WITH no_password HOST LIKE \'%.host.com\'
|
|
CREATE USER `u7_01292@%.host.com` IDENTIFIED WITH no_password HOST LIKE \'%.host.com\'
|
|
CREATE USER `u8_01292@%.otherhost.com` IDENTIFIED WITH no_password HOST LIKE \'%.otherhost.com\'
|
|
CREATE USER u1_01292 IDENTIFIED WITH no_password DEFAULT ROLE NONE SETTINGS readonly = 1
|
|
CREATE USER u2_01292 IDENTIFIED WITH no_password DEFAULT ROLE r1_01292, r2_01292 SETTINGS readonly = 1
|
|
CREATE USER u3_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\' DEFAULT ROLE r1_01292, r2_01292
|
|
CREATE USER u4_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\' DEFAULT ROLE r1_01292, r2_01292
|
|
-- system.users
|
|
u1_01292 local_directory ['plaintext_password'] ['{}'] [] ['localhost'] [] [] 1 [] []
|
|
u2_01292 local_directory ['no_password'] ['{}'] [] [] [] ['%.%.myhost.com'] 0 [] []
|
|
u3_01292 local_directory ['sha256_password'] ['{}'] ['192.169.1.1','192.168.0.0/16'] ['localhost'] [] [] 0 ['r1_01292'] []
|
|
u4_01292 local_directory ['double_sha1_password'] ['{}'] ['::/0'] [] [] [] 1 [] ['r1_01292']
|
|
-- system.settings_profile_elements
|
|
\N u1_01292 \N 0 readonly 1 \N \N \N \N
|
|
\N u2_01292 \N 0 \N \N \N \N \N default
|
|
\N u3_01292 \N 0 max_memory_usage 5000000 4000000 6000000 WRITABLE \N
|
|
\N u4_01292 \N 0 \N \N \N \N \N default
|
|
\N u4_01292 \N 1 max_memory_usage 5000000 \N \N \N \N
|
|
\N u4_01292 \N 2 readonly 1 \N \N \N \N
|
|
-- multiple authentication methods
|
|
u1_01292 ['plaintext_password','kerberos','bcrypt_password','ldap'] ['{}','{"realm":"qwerty10"}','{}','{"server":"abc"}']
|