github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/pgwire/testdata/auth/insecure (about) 1 config insecure 2 ---- 3 4 subtest check_ssl_disabled_error 5 6 # Check that an attempt to use SSL fails with "SSL not enabled". 7 connect user=root sslmode=require 8 ---- 9 ERROR: pq: SSL is not enabled on the server 10 11 subtest end 12 13 subtest root_always_enabled 14 15 # Regardless of the contents of hba.conf, 16 # all users can always log in, even without a cert. 17 18 set_hba 19 host all root 0.0.0.0/0 cert 20 ---- 21 # Active authentication configuration on this node: 22 # Original configuration: 23 # host all root all cert-password # CockroachDB mandatory rule 24 # host all root 0.0.0.0/0 cert 25 # 26 # Interpreted configuration: 27 # TYPE DATABASE USER ADDRESS METHOD OPTIONS 28 host all root all cert-password 29 host all root 0.0.0.0/0 cert 30 31 connect user=root sslmode=disable 32 ---- 33 ok defaultdb 34 35 subtest end 36 37 subtest regular_login 38 39 connect user=testuser sslmode=disable 40 ---- 41 ok defaultdb 42 43 # If a password is provided, it is ignored. 44 45 connect user=testuser password=abc sslmode=disable 46 ---- 47 ok defaultdb 48 49 subtest end 50 51 subtest user_does_not_exist 52 53 connect user=nonexistent sslmode=disable 54 ---- 55 ERROR: password authentication failed for user nonexistent 56 57 subtest end