Commit graph

135 commits

Author SHA1 Message Date
Tobie Morgan Hitchcock
ac9a574c00 Simplify passing of authentication tokens to client 2023-02-11 15:56:14 +00:00
Tobie Morgan Hitchcock
c90ff5f5d1 Listen to different OS signals on Windows and Unix 2023-02-08 13:19:08 +00:00
Salvador Girones Gil
15f7fb3eee
Ensure SurrealDB listens to SIGTERM/SIGINT signals and quits gracefully (#1639) 2023-02-05 21:03:21 +00:00
Tobie Morgan Hitchcock
84b026679f Update clippy linting tests 2023-02-03 11:47:07 +00:00
Tobie Morgan Hitchcock
9282feac1f Allow empty params object from text-based WebSocket clients
Closes #1610
2023-01-20 00:54:33 +00:00
Tobie Morgan Hitchcock
7682a97a33 Decode urlencoded path parameters automatically
Closes #1396
2023-01-17 14:10:21 +00:00
Rushmore Mushambi
c2dce39f91
Integrate client library into surrealdb crate (#1514) 2022-12-30 08:23:19 +00:00
Tobie Morgan Hitchcock
44c3f32f69 Fix clippy linting warnings 2022-12-20 10:30:40 +00:00
George
a2038f239b
Fix future clippy linting warnings (#1423) 2022-12-18 16:00:36 +00:00
Rinat Shay
ad004999a8
Use temporary HTTP redirect instead of permanent (#1517) 2022-12-09 16:48:54 +00:00
CelebrateVC
f0745386cf
Improve code comments for documentation (#1476) 2022-11-23 09:42:59 +00:00
Finn Bear
ff65ef56fc
Don't panic on invalid UTF-8 in web requests (#1422) 2022-10-30 23:28:57 +00:00
Tobie Morgan Hitchcock
c12a1cc1fa Fix typo in code comments 2022-10-30 01:32:27 +00:00
Rushmore Mushambi
12ded8b066
Log version when starting the server (#1358) 2022-10-27 01:58:08 -07:00
Tobie Morgan Hitchcock
f32fb516eb Rearrange code order 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
a074dc9af5 Add suport for WebSocket RPC binary protocol 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
ab4c85bf5d Return a single record when requesting a single record with WebSocket 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
05485406c4 Add support for more input types in WebSocket RPC methods 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
e03f7e00db Add alias for WebSocket RPC method ‘modify’ to ‘patch’ 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
1015a948fd Add alias for WebSocket RPC method ‘change’ to ‘merge’ 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
926356d23b Don’t allow WebSocket RPC authenticate method to be called with no token value 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
df8f297221 Add WebSocket RPC unset method for clearing a parameter 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
70a263f799 Add code comments to WebSocket RPC methods 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
a0d86248e2 Enable different output serialization formats in WebSocket RPC 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
d12384f3fb Change method signature for converting strings to table names 2022-10-25 06:40:23 -07:00
Tobie Morgan Hitchcock
3cbb5eed78 Allow datetimes as an id parameter in the WebSocket RPC message 2022-10-25 06:06:02 -07:00
Tobie Morgan Hitchcock
6ff1e250de Add improved handling of different WebSocket message types 2022-10-19 23:57:05 +01:00
Rushmore Mushambi
f0eaf2bd19
Improve RPC method return types (#1384) 2022-10-19 23:54:41 +01:00
Tobie Morgan Hitchcock
c098fe3380 Respond to WebSocket ping messages with a pong message 2022-10-19 21:11:15 +01:00
Tobie Morgan Hitchcock
1becd3ab55 Don’t throw an RPC Error when no params key is specified 2022-10-19 18:57:03 +01:00
Tobie Morgan Hitchcock
65f8194a1f Fix code linting warnings 2022-10-19 15:35:42 +01:00
Tobie Morgan Hitchcock
18d69a620c Add WebSocket ping->pong message ticker 2022-10-19 14:56:43 +01:00
Tobie Morgan Hitchcock
7ed0af4750 Add support for SQL parameters in HTTP REST endpoints 2022-10-17 02:00:15 +01:00
Tobie Morgan Hitchcock
264f208379 Change the log identifier for web requests 2022-10-16 17:36:07 +01:00
Tobie Morgan Hitchcock
f31b7d7d17 Allow number values for JSON RPC id field 2022-10-16 17:36:07 +01:00
Tobie Morgan Hitchcock
9546b07d71 Add version method to HTTP RPC endpoint 2022-10-16 17:36:07 +01:00
Tobie Morgan Hitchcock
d8c7efefd4 Ensure integer Record IDs are treated correctly in HTTP REST endpoints
Closes #1281
2022-10-01 15:50:39 +01:00
Rushmore Mushambi
bcac94f9d6
Add additional build metadata to version identifier (#1254) 2022-09-28 20:13:40 +01:00
Tobie Morgan Hitchcock
a96c6ff8ca Allow authentication token to be verified with or without Bearer or Basic prefix 2022-09-28 01:19:18 +01:00
Tobie Morgan Hitchcock
d8953ab7f8 Ensure HTTP session is not verified multiple times 2022-09-25 23:13:29 +01:00
Tobie Morgan Hitchcock
0cb865dc44 Support different Content-Type outputs on /signup and /signin routes
Closes #1223
2022-09-25 13:05:56 +01:00
Tobie Morgan Hitchcock
b9603aacab Improve HTTP error messages and status codes 2022-09-25 10:56:57 +01:00
Tobie Morgan Hitchcock
b4209180b6 Ensure server listents to SIGINT/SIGTERM signals
Closes #120
2022-09-22 03:01:11 +01:00
Tobie Morgan Hitchcock
1dd08bedaa Handle errors properly when WebSocket client disconnects improperly
Closes #181
Closes #195
Closes #140
2022-09-20 23:04:40 +01:00
Ryan Russell
b4b2ceb187
Make readability fixes to Rust code comments (#157) 2022-09-17 02:50:10 +01:00
Tobie Morgan Hitchcock
8403238dbb Use Accept header instead of Content-Type header for client content negotiation 2022-09-16 02:19:06 +01:00
Tobie Morgan Hitchcock
b2f4101a9c Improve HTTP request error messages
Closes #153
2022-09-16 00:41:16 +01:00
Tobie Morgan Hitchcock
74c3b6d708 Don’t automatically unwrap errors when sending on WebSocket
Closes #140
2022-09-13 21:50:04 +01:00
Tobie Morgan Hitchcock
5ca3b74e59 Add HTTP /health endpoint for checking database and datastore status
Closes #56
2022-09-01 00:28:43 +01:00
Tobie Morgan Hitchcock
e5a78bed06 Allow root authentication over WebSocket connection 2022-08-23 23:44:13 +01:00
Kian-Meng Ang
40157f6170
Fix typos (#42)
Found via `codespell -L crate,inout,ser,fetchs,te,tre,whats`.
2022-08-21 13:13:38 +01:00
Tobie Morgan Hitchcock
b8c793f7a4 Only log successful startup after server binds to desired port 2022-08-17 22:45:31 +01:00
Tobie Morgan Hitchcock
f46acec96f Ensure error is returned when NS/DB header are not present 2022-07-29 10:35:15 +01:00
Tobie Morgan Hitchcock
2646ea119e Temporarily disable HTTP response compression
Disable response compression until `Accept-Encoding` headers are properly evaluated, and the compression can be chosen based on the HTTP request. This relies on https://github.com/seanmonstar/warp/pull/513 being implemented.
2022-07-29 10:33:49 +01:00
Tobie Morgan Hitchcock
d619633340 Enable new database strict mode configuration 2022-07-27 18:20:04 +01:00
Tobie Morgan Hitchcock
428fcf697a Ensure CORS headers are set on failed HTTP responses
Closes #6
2022-07-24 01:15:26 +01:00
Tobie Morgan Hitchcock
81bad3211d Improve command-line logging 2022-07-19 09:28:24 +01:00
Tobie Morgan Hitchcock
d425f67a8b Allow NULL and missing values in RPC query method 2022-07-08 21:56:04 +01:00
Tobie Morgan Hitchcock
11a3911f70 Add RPC let’ command as a duplicate of ‘set’ command 2022-07-08 21:55:44 +01:00
Tobie Morgan Hitchcock
3c7bd098f3 Enable concurrent requests in WebSocket RPC Server 2022-07-07 11:25:22 +01:00
Tobie Morgan Hitchcock
4438415b55 Fix error in RPC Modify method query 2022-07-07 11:22:41 +01:00
Tobie Morgan Hitchcock
508538e0cc Add initial WebSocket JSON RPC implementation 2022-07-04 02:32:26 +01:00
Tobie Morgan Hitchcock
7bb4aa74f3 Move authentication code to separate module 2022-07-04 01:46:09 +01:00
Tobie Morgan Hitchcock
187d9c08dc Allow ‘application/octet-stream’ content-type when importing 2022-07-04 01:25:35 +01:00
Tobie Morgan Hitchcock
eff4d2c5e9 Implement scope signup and signin functionality 2022-06-20 12:29:06 +01:00
Tobie Morgan Hitchcock
52e8954ae4 Ensure library works in multi-threaded and single-threaded environments 2022-05-16 00:04:11 +01:00
Tobie Morgan Hitchcock
f414198fad Only begin a transaction if needed for authentication 2022-05-13 22:07:56 +01:00
Tobie Morgan Hitchcock
7bd5802e99 Remove tokio as a dependency
Closes SUR-102
2022-05-13 21:57:40 +01:00
Tobie Morgan Hitchcock
e4619be89a Implement WebSocket queries for /sql endpoint 2022-05-11 22:34:28 +01:00
Tobie Morgan Hitchcock
17e8ea55b5 Implement SQL database exporting and importing 2022-05-11 15:23:15 +01:00
Tobie Morgan Hitchcock
3498e57e04 Implement web authentication session validation 2022-05-11 15:23:15 +01:00
Tobie Morgan Hitchcock
d761a6df47 Add TLS support to SurrealDB server 2022-05-11 15:23:08 +01:00
Tobie Morgan Hitchcock
ba7c31e2dc Improve server configuration parsing and option storage 2022-05-11 15:23:08 +01:00
Tobie Morgan Hitchcock
69b18cc659 Change content length limits of http routes 2022-05-11 15:23:08 +01:00
Tobie Morgan Hitchcock
ffc3ed82f7 Simplify external API when working with Datastore 2022-05-04 00:07:46 +01:00
Tobie Morgan Hitchcock
7e2eae32c5 Ensure query auth level checks are logically correct 2022-04-01 00:36:23 +01:00
Tobie Morgan Hitchcock
b3c4f982ec Fix clippy lint errors 2022-03-25 20:31:45 +00:00
Tobie Morgan Hitchcock
2a0d46a2b6 Remove unused macros 2022-03-07 18:14:42 +00:00
Tobie Morgan Hitchcock
d1c2daaee4 Apply cargo clippy lint recommendations 2022-03-05 14:42:58 +00:00
Tobie Morgan Hitchcock
d5c53b7791 Extract core surrealdb code into separate library 2022-02-22 14:16:50 +00:00
Tobie Morgan Hitchcock
10a76ec3a1 Inject datastore instance instead of globally instantiated instance 2022-02-17 08:04:08 +00:00
Tobie Morgan Hitchcock
b98986fa12 Remove unnecessary 'anyhow' crate 2022-02-16 23:45:23 +00:00
Tobie Morgan Hitchcock
9a2f8f737a Simplify query variable creation 2022-02-13 23:37:30 +00:00
Tobie Morgan Hitchcock
ae70844524 Simplify server setup configuration options 2022-02-13 23:34:21 +00:00
Tobie Morgan Hitchcock
d0a0065807 Rename 'web' module to 'net' 2022-02-09 15:55:04 +00:00