Repository navigation
Conversation
… 28: permissions) With --security the deployment enables security with an administrator, whom SQLancer runs as, and the users reader (role sqlancer_read, SQLREAD) and writer (role sqlancer_write, SQL), whose roles the provider creates. PERMS runs a query, a change, DDL or a procedure call as one of them: allowed statements must succeed (a query with the administrator's rows), refused ones must fail with a permission error and leave every table's row count as it was. Found ENG-30627 (DDL compiled before the permission check, disclosing procedures' SQL), which PERMS avoids and which has a reproduction in voltdb/repros.
Author
|
Superseded by #51, which combines every ENG-30396 PR of this repo into one. This PR's branch is kept, and its description still has this milestone's details and lab results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone 28 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"): security on, and the PERMS oracle, which checks what each role may and may not do. Stacked on #26 (milestone 26), which is stacked on #25 to #21 and #20 to #1; review those first. Milestone 27 (SQLancer on Kubernetes) changes nothing here: it is VoltDB/pro#7123 and VoltDB/internal#6402.
The nightly job's 1-node run turns security on once VoltDB/internal#6403 is merged; VoltDB/pro#7124 gives
run-jenkins-sqlancer-test.shthe run shape.Why
Every run so far had security off. With it on, each statement passes VoltDB's permission check first. A statement a role should be refused that runs anyway (or that changes rows before it is refused), or one it should be allowed that fails, is a security bug. No oracle reads results as anyone but the administrator.
What it changes
run-sqlancer.sh --security: the deployment enables security with three users:sqlancer, the administrator, whom SQLancer and voltadmin run as;reader, rolesqlancer_read, SQLREAD;writer, rolesqlancer_write, SQL.--security true(provider option): the provider creates the two roles once per run, when it first connects.oracle/VoltDBPermissionOracle) runs a statement as reader or writer:--securityit skips every check.Bugs found
--avoid-known-bugsis trueDROP TABLE Tby a reader, with a procedure reading T, fails with "[SECRET_P]: Failed to plan for statement ... SELECT COUNT(*) FROM T WHERE a = 42 ... object not found: T", disclosing the procedure and its SQL. DDL that compiles gets the permission error. While another catalog update runs, the refusal is "another one is in progress". Also on 16.0.0. Major. Reproduction:voltdb/repros/ENG-30627.sh.CREATE TABLEof a new table, which always compiles; "in progress" is retried.Testing
mvn verify(checkstyle, PMD, formatter) passes.Lab builds ENG-30396: export gap fills, the HTTP target held across a kill (milestone 45) #44 and ENG-30396: the LOGIN oracle, users changed online and refused logins (milestone 46) #45 of
matrix-systemtest-apprunner-sqlancer(branch jobENG-30396-sqlancer-nightly, replays with milestone 29's Jenkinsfile andrun-jenkins-sqlancer-test.sh) ran the head of the stack, milestone 29 (fork commits 94d6cc9 and ee48042), which contains this milestone. Each run was 45 minutes on 16.1.0-SNAPSHOT, beside one node of 16.0.0.