Skip to content

ENG-30396: the LOGIN oracle, users changed online and refused logins (milestone 46) - #45

Closed
jwiebema1 wants to merge 3 commits into
ENG-30396-sqlancer-m45from
ENG-30396-sqlancer-m46
Closed

jwiebema1 wants to merge 3 commits into
ENG-30396-sqlancer-m45from
ENG-30396-sqlancer-m46

Conversation

@jwiebema1

@jwiebema1 jwiebema1 commented Nov 13, 2026 •

Copy link
Copy Markdown

Why

Milestone 44's coverage run found failed logins never run: AuthFailedBecause 0 of 14 lines, and none of the log lines for a refused login. Nothing changed users while the database ran, and nothing used an expiry date.

What it changes

  • The LOGIN oracle, with --security. Each check works with a user of its own, loginN:
    1. Adds the user through @SetYamlConfiguration, in one of three ways: a YAML document with the password in plain text, a YAML document with it masked (its SHA-256 digest, plaintext: false), or assignments.
    2. Checks the listing. @GetYamlConfiguration('deployment.users') must list the user with its role and its masked password.
    3. Checks logins. The user must log in with its password and be refused with another. A user that does not exist must be refused.
    4. Makes one change:
      • a new password (the old one is refused, the new one logs in);
      • an expiry date in the past (refused), then one in the future (logs in);
      • an expiry date set by a YAML document;
      • another role;
      • or a change VoltDB must refuse: an expiry date that is not a date, or the only administrator made a plain user. After it, the user still logs in.
    5. Removes the user (.users[loginN]=null). It must no longer be listed, and must be refused.
  • Logins use the native client. The JDBC driver reports every failed connection as "Unable to connect to the cluster", where the client reports "Authentication rejected".
  • CONFIG's lock is shared, so LOGIN's deployment changes take turns with CONFIG's.
  • Runners. run-coverage.sh runs LOGIN. run-sqlancer.sh's summary prints LOGIN's counts: checks, logins accepted and refused, and user changes refused.
  • README: a LOGIN section, and the status now says milestone 46.

Bugs found

Coverage (run-coverage.sh's 10-minute security run, against milestone 44's six runs)

Class or area Milestone 44 Milestone 46
AuthFailedBecause 0 of 14 14 of 14
AuthUser 28 of 46 36 of 46
HashAuthenticationRequest 19 of 31 23 of 31
SetYamlConfiguration 173 of 396 294 of 396
YamlUtils.PropertyParser 34 of 68 56 of 68
Security, lines 23.4% 26.3%

Most of what security still misses is LDAP and Kerberos, which need servers of their own.

Testing

  • Local trial, 1 node over TLS, 5 minutes, beside NoREC, PERMS and CONFIG: 167 checks, 334 logins accepted, 574 refused and 32 user changes refused.
  • mvn verify -DskipTests passes: formatter, Checkstyle, PMD and SpotBugs. Two tests error locally: TestUsageNamingConvention (a JDK 17 reflection error, and it errors on the base branch too) and TestPostgresQueryPlan (it needs a Postgres server).
  • Lab: build Split the Travis tasks sqlancer/sqlancer#59 of matrix-systemtest-apprunner-sqlancer (branch job ENG-30396-sqlancer-nightly, a replay) ran fork 3a80cb3 against 16.1.0-SNAPSHOT (master kit 400): the security run (1 node over TLS, 45 minutes, all thirty-two oracles) passed. LOGIN made 366 checks, with 734 logins accepted, 1,232 refused and 85 user changes refused; PERMS checked 146 allowed and 152 refused statements, and CONFIG 334 changes. No database failed.
  • After the lab run: 057a0a8 compares the listed digest without regard to case. When known bugs are not avoided, the lowercase digest then fails at its login, which is the bug, and not at the listing. Nothing changes while they are avoided.

…sed logins)

Milestone 44's coverage run found failed logins never run (AuthFailedBecause
0 of 14 lines), nor user expiry dates, nor users changed while the database
runs. With --security, each LOGIN check adds a user of its own through
@SetYamlConfiguration (YAML in plain text or masked, or assignments), which
@GetYamlConfiguration must list with its password's digest; the user must log
in with its password and be refused with another, as must a user that does
not exist. Then a new password, an expiry date in the past and in the future,
another role, or a change VoltDB must refuse; finally the user is removed and
must be refused. Logins use the native client, which says "Authentication
rejected" where the JDBC driver only says it could not connect. Changes take
turns with CONFIG's (its lock, now shared). run-coverage.sh runs LOGIN, and
run-sqlancer.sh's summary prints its counts.

A masked password in lowercase hex gives a user that never logs in; while
avoiding known bugs LOGIN masks in uppercase (MASKED_CASE_BUG, to be filed).
…o a lowercase one fails at its login (the bug), not at the listing
@jwiebema1

Copy link
Copy Markdown
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.

@jwiebema1 jwiebema1 closed this Nov 18, 2026
@jwiebema1
jwiebema1 deleted the ENG-30396-sqlancer-m46 branch November 25, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant