• craig[bot]'s avatar
    Merge #43701 #43709 #43710 #43711 #43713 · 7906cbe3
    craig[bot] authored
    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: default avatarJordan Lewis <[email protected]>
    Co-authored-by: default avatarRaphael 'kena' Poss <[email protected]>
    7906cbe3
Name
Last commit
Last update
.github Loading commit data...
build Loading commit data...
c-deps Loading commit data...
cloud Loading commit data...
docs Loading commit data...
githooks Loading commit data...
licenses Loading commit data...
monitoring Loading commit data...
pkg Loading commit data...
scripts Loading commit data...
vendor @ d946c0a7 Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
Gopkg.lock Loading commit data...
Gopkg.toml Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...