Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
43701: sqlsmith: add support for interleaved tables r=mjibson a=mjibson This commit adds interleaved table support to sqlsmith. When running with the rand-tables configuration, there's a 50% chance of all tables but the first one to get interleaved into a random other table. Release note: None 43709: pgwire: use datadriven-based testing for HBA configs r=knz a=knz (I'm currently working on #31113 and updating this test makes my life easier.) This patch introduces a datadriven test runner for HBA config tests. It also replaces the previous `TestHBA` by more exhaustive datadriven input files, with comments that better explain the narrative of the test. Release note: None 43710: pgwire: improve some HBA error messages r=knz a=knz First commit from #43709. Before: ``` > set cluster setting server.host_based_authentication.configuration = 'host db all 0.0.0.0/32 cert'; ERROR: database must be specified as all ``` ``` > set cluster setting server.host_based_authentication.configuration = 'host all all myhost cert'; ERROR: host addresses not supported ``` ``` > set cluster setting server.host_based_authentication.configuration = 'host all all 0.0.0.0/32 sdfsf'; ERROR: unknown auth method "sdfsdf" ``` After: ``` > set cluster setting server.host_based_authentication.configuration = 'host db all 0.0.0.0/32 cert'; ERROR: unimplemented: per-database HBA rules are not supported SQLSTATE: 0A000 HINT: You have attempted to use a feature that is not yet implemented. -- Use the special value 'all' (without quotes) to match all databases. ``` ``` > set cluster setting server.host_based_authentication.configuration = 'host all all myhost cert'; ERROR: unimplemented: hostname-based HBA rules are not supported SQLSTATE: 0A000 HINT: You have attempted to use a feature that is not yet implemented. -- List the numeric CIDR notation instead, for example: 127.0.0.1/8. ``` ``` > set cluster setting server.host_based_authentication.configuration = 'host all all 0.0.0.0/32 sdfsdf' ERROR: unimplemented: unknown auth method "sdfsdf" SQLSTATE: 0A000 HINT: You have attempted to use a feature that is not yet implemented. -- Supported methods: cert, cert-password, password ``` Release note (sql change): CockroachDB will now provide more descriptive error messages and a error hint when an unsupported rule is provided via `server.host_based_authentication.configuration`. 43711: pgwire: split the authentication code in its own files r=knz a=knz First two commits from #43709 and #43710. This patch splits the pgwire authentication in its own files and adds missing explanatory comments. No functional changes. 43713: pgwire/hba: fix a bug in the parsing logic r=knz a=knz Release note (bug fix): There was a bug in the parsing logic for server.host_based_authentication.configuration, where both single-character strings, and quoted strings containing spaces and separated by commas were not properly parsed. This would cause e.g. rules for usernames consisting of a single characters, or usernames containing spaces, to apply improperly. Co-authored-by: Jordan Lewis <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information