-
Notifications
You must be signed in to change notification settings - Fork 436
Make the database portable and encryptable (#3848) #5526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shai-almog
wants to merge
131
commits into
master
Choose a base branch
from
feature/portable-encryptable-database
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
5b0f0b0
Define the portable Database contract and add the encryption API
shai-almog a29da0d
Make the simulator conformant and able to open encrypted databases
shai-almog 85f6127
Make the iOS database conformant and fix three defects in it
shai-almog 0fedd67
Bring Android to the database contract and add encrypted databases
shai-almog b0e2de8
Give the native Windows and Linux ports a database
shai-almog dcf1f1f
Replace WebSQL with SQLite on WebAssembly and gate the engine per app
shai-almog ce77b83
Add device conformance tests, documentation and the interop proof
shai-almog 70dc81f
Fix the three CI failures from the first run
shai-almog d595bd9
Exclude the SQLCipher package from the Ant Android build too
shai-almog 7f2f2c7
Address the review findings and the second round of CI failures
shai-almog 766ab43
Address the second batch of review findings
shai-almog 1b78be8
Address the third batch of review findings
shai-almog c8ca4a5
Satisfy the forbidden PMD rules
shai-almog dbcceec
Compile the engine's ciphers without assuming CPU features are enabled
shai-almog ba13354
Add copyright headers to the new guide snippet files
shai-almog ecad03f
Address the fourth review batch, the guide prose gate and CodeQL noise
shai-almog efbab6c
Fix failed-commit recovery, parameter counts and the JS key probe
shai-almog f5767b0
Report unbound parameters from executeQuery(String) with the shared m…
shai-almog e282819
Default Ant projects to database compatibility mode
shai-almog 730a69a
Roll back through the engine when an Android commit fails
shai-almog cb0456a
Close out the fourth review round
shai-almog c6f57d4
Make Android encryption buildable, and actually exercise it
shai-almog 452c6cf
Make encrypt and decrypt work on Android
shai-almog 952f337
Stop the JavaScript port hanging when the SQLite engine will not start
shai-almog 7a70937
Do not assert a filesystem path where databases are not filesystem ba…
shai-almog 62e2271
Close out the fifth review round
shai-almog 4a11dc9
Stop every JavaScript native binding from throwing across the bridge
shai-almog d4d3c89
Fix three ways the previous round's fixes could fail
shai-almog 483acb2
Complete the migration recovery, and stop OPFS trouble losing data
shai-almog 81cbb36
Type-check the SQLCipher package, which nothing else compiles
shai-almog 4c32755
Close the remaining native and dispatch error paths
shai-almog 13cef92
Resolve the cipher check's dependencies from the reactor, not a repos…
shai-almog 2b527c3
Sweep the error paths I had fixed in only one implementation
shai-almog ce68bdd
Fix three defects the previous round's fixes introduced or left
shai-almog 79aceb2
Move migration artifacts out of the database namespace entirely
shai-almog ecf667b
Make delete and exists aware of interrupted conversions, and finish t…
shai-almog 14c1630
Prove ownership of migration files instead of picking a location
shai-almog be69b0b
Report close failures, and track trigger bodies by position
shai-almog da4d201
Merge remote-tracking branch 'origin/master' into feature/portable-en…
shai-almog 2420d98
Hoist casts out of catch regions and exchange SQL text as UTF-8 bytes
shai-almog 26dcced
Detect the port from the database, not from Display
shai-almog c1fc047
Record the export before writing it, and refuse a passphrase SQLite w…
shai-almog f3e483b
Count named and numbered placeholders the way the engine does
shai-almog 26a59d8
Read a whole SQLite parameter name, not just its identifier characters
shai-almog 643699a
Merge remote-tracking branch 'origin/master' into feature/portable-en…
shai-almog 018356f
Hold a port to its own legacy behaviour, not to another port's
shai-almog 06b22a6
Gate the SQLite payloads on the application, not on the framework
shai-almog 8dc65cf
Keep windows.h from dragging winsock.h into the database bindings
shai-almog 3d74b04
Finish gating the cipher, and stop recovery touching files it does no…
shai-almog a6bee19
Document what using a database, and encrypting one, costs a build
shai-almog 9b8733a
Track transactions opened by script, and stop three ways to lose data
shai-almog aabde20
Count every Android connection, and read a script the way the engine …
shai-almog 15865f2
See a transaction whichever entry point opened it
shai-almog b4b662e
Read ROLLBACK TO as tokens, and hold the database for the whole conve…
shai-almog 59d3853
Take the connection slot before the engine opens, and share one class…
shai-almog ca1cc1a
Ask the engine whether a transaction is open, instead of inferring it
shai-almog 4712b47
Claim the database for an in-place key rotation too
shai-almog c7b0fe9
Merge remote-tracking branch 'origin/master' into feature/portable-en…
shai-almog 14555d1
Keep the last readable copy, and make the claim cover recovery
shai-almog 266d6e8
Hold a key change to one connection, and load the JS engine's wasm
shai-almog 406b094
Report an unavailable managed key as a note, not a skipped group
shai-almog 9f409ea
Hold the rekey claim for the whole rewrite, and ship a wasm that comp…
shai-almog b39c725
Key the simulator registry by the resolved file
shai-almog e842054
Reserve the slot before opening, and key the browser's engine through…
shai-almog 27c2584
Track savepoint transactions, and read the BEGIN mode as a token
shai-almog 37e28b7
Claim the simulator's file before JDBC opens it, and stop a vacuous c…
shai-almog 6a35664
Read whole savepoint names, and hold the claim until the handle is gone
shai-almog 57167c6
Calibrate the ciphertext check, and stack savepoints of one name
shai-almog a134e50
Ask the no-key question on a database nothing else depends on
shai-almog 5f0bbb5
End a savepoint transaction through SQL on Android too
shai-almog 9be5fb3
Return a Java long exactly from the browser, and count nested transac…
shai-almog bf23c85
Merge master into feature/portable-encryptable-database
shai-almog 3a1e67c
Move Google sign-in to a SDK that links on a simulator
shai-almog 185633d
Track a legacy execute, and close the constructor nobody could satisfy
shai-almog 26bc092
Keep a database an unkeyed open could not read, and nest only where n…
shai-almog 9d325d9
Report a database that will not open as an IOException
shai-almog 3f8e3bd
Keep a savepoint stack, and hold the simulator to SQLite's grammar
shai-almog 3150fa1
Unwind the savepoint stack on ROLLBACK TO, and clean up what recovery…
shai-almog 74c115c
Ask which config factory was called, and refresh a rewound cursor's c…
shai-almog c538064
Key a managed alias on the resolved file on the remaining ports
shai-almog 75e3952
Scan library jars and the database package, and say what count costs
shai-almog fb4ad8c
Retry the suite build past a Maven Central 403
shai-almog 02b051d
Resolve a managed key the same way wherever it is looked up
shai-almog 2d72a0d
Track a parameterized savepoint, and stop the wrapper deadlocking on …
shai-almog f664689
Destroy one managed key, not two, and refresh the count on any backwa…
shai-almog b91482b
End a savepoint transaction through SQL from a script too
shai-almog 0826b63
Merge remote-tracking branch 'origin/master' into feature/portable-en…
shai-almog 8a33f40
Fold savepoint names as SQLite does, and ask the engine after every s…
shai-almog 3bf5d9c
Check the worker before the lock, and read the engine on the failure …
shai-almog f0840c9
Restore the browser's engine read, and let isInTransaction skip the lock
shai-almog 89a4517
Clear Android's flag when a rollback finds nothing to roll back
shai-almog a32ef74
Register a wrapped connection, and let queued callers hear that the d…
shai-almog 63f20b4
Read a SQLite URI connection, and clear state when there is nothing l…
shai-almog 594b8df
Match the raw-key literal that is actually written, and free the curs…
shai-almog a051ebb
Quote by the exact literal, rekey a nameless handle, and stop killing…
shai-almog 5d47d7e
Merge remote-tracking branch 'origin/master' into feature/portable-en…
shai-almog bb549e4
Resolve opaque SQLite URIs, and count a connection that cannot name i…
shai-almog 34894b8
Keep the constructors a compiled library can still call
shai-almog fc1620a
Refuse a compatibility handle on a database that is being converted
shai-almog 241339d
Scan for database usage before the port joins the tree
shai-almog 94db2ed
Merge remote-tracking branch 'origin/master' into feature/portable-en…
shai-almog 6f6d54d
Carry the refusal instead of throwing it from a compatibility constru…
shai-almog 2e4e9a4
Reconcile transaction state after a failed cursor step, and refuse to…
shai-almog 262ed99
Do not raise for a rollback the engine already performed
shai-almog 27a21b1
Count transaction control in SQL where the engine counts it
shai-almog ff0f7a8
Decide iOS cipher availability by asking the engine
shai-almog da8eaf4
Keep engine settings that only one engine can honour out of the bundl…
shai-almog 4473e02
Never re-run a writing statement to move a cursor, and refuse to dele…
shai-almog c7822ed
Ask each port how many connections it has open, and treat a writing p…
shai-almog 6579c12
Build the ciphers only when asked, and find that iOS had stopped encr…
shai-almog 3898e19
Take the delete claim before the count is read, and let recovery hold…
shai-almog 3920937
Claim a delete in one step, and recover only for an open that holds t…
shai-almog aeb3ae8
Rewind only when the cursor has somewhere to go back from
shai-almog 9661aa2
Refuse a delete under an unnamed connection or a running conversion
shai-almog 45b16d5
Record a conversion as unproven before installing it, not after it fails
shai-almog d3df098
Fix the duplicated package line in DatabaseTest
shai-almog 0e656f6
Close a converted handle that cannot be proven, and name the displace…
shai-almog 6606910
Run the database checks when their own scripts change
shai-almog 6ef695c
Going back to a place the cursor has not left is a no-op
shai-almog d0784c7
Keep transaction control out of executeQuery, and make the Android ke…
shai-almog cec6df0
Bind an empty value as empty rather than as null
shai-almog 1bde0d4
Let the worker stop after it drains, instead of parking for the process
shai-almog 1493c06
Stop the worker even when the close fails, and read numbers the way S…
shai-almog 525295f
Validate an Android query without walking it, and mark a killed threa…
shai-almog 64171b8
Refuse work the moment a stop is asked for, and use a filter form tha…
shai-almog 6a68f2d
Keep an Android cursor inside the rows it has, and refuse async work …
shai-almog ee0d4f0
Read a row without counting the result set, and fix the wrapped inden…
shai-almog 681388d
Give each Windows and Linux application its own database directory
shai-almog aae711a
Prove a converted database opens, leave in-memory connections alone, …
shai-almog 76d61b3
Refuse an open that recovery has to run before
shai-almog dbf51f0
Give the connection slot back even when the close fails
shai-almog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Vendored third-party sources. Marking them keeps them out of language | ||
| # statistics and collapses them in diffs, so a routine engine update does not | ||
| # read as a 400,000 line change and does not push review tooling past its | ||
| # size limits. | ||
| vm/ByteCodeTranslator/src/cn1_sqlite3_amalgamation.h linguist-vendored linguist-generated -diff | ||
| vm/ByteCodeTranslator/src/cn1_sqlite3.h linguist-vendored linguist-generated -diff | ||
| Ports/JavaScriptPort/src/main/webapp/js/sqlite3mc.js linguist-vendored -diff | ||
| Ports/JavaScriptPort/src/main/webapp/js/sqlite3-opfs-async-proxy.js linguist-vendored -diff |
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.