Neal Harrington
19740954f6
Handle http responses for unauthorized in the same way as is currently done
2 years ago
Neal Harrington
79f631f6f0
Handle case where error is nil properly
2 years ago
Neal Harrington
2226083273
Implement handling of error unauthorized by client forwarding request to remote tcp service. Bubble this up as a 401 to the caller
2 years ago
Neal Harrington
7cceb822a4
First things
2 years ago
Philip O'Toole
ae1f9b464f
No magic strings
2 years ago
Philip O'Toole
d9b2e0b2fa
WIP creds forwarding
2 years ago
Philip O'Toole
b703bc26ce
Unit test read-only join permission enforcement
2 years ago
Philip O'Toole
c59adee7cb
Add Read-only join permission
2 years ago
Philip O'Toole
0928d3ecad
Interfaces have to be checked for nil
2 years ago
Philip O'Toole
d289da5feb
Refactor auth checking
2 years ago
Philip O'Toole
288d97b241
Move Perm constants to auth package
...
Makes it cleaner to re-use them outside of HTTP package.
2 years ago
Philip O'Toole
17a159cb88
Remove unnecessary interface call
2 years ago
Philip O'Toole
d3bf2d719e
Use a single Response type for HTTP
2 years ago
Philip O'Toole
bfe4f7fe68
Count number of queued waits
2 years ago
Philip O'Toole
53f44f47e6
More testing
2 years ago
Philip O'Toole
71b0a5a3bf
Support statement-less queue waits
2 years ago
Philip O'Toole
05df9fa015
Fix lint issue
2 years ago
Philip O'Toole
ecb640abff
Check that queue and transactions work
2 years ago
Philip O'Toole
a7f5bafaca
Track queue sequence number at HTTP layer
2 years ago
Philip O'Toole
0b47dff0b0
Godoc comments
2 years ago
Philip O'Toole
3cfdc8b689
Support "wait" param on queued writes
2 years ago
Philip O'Toole
64f7e05b0e
Support transactions from write queue
2 years ago
Philip O'Toole
5e24af2636
Better API shape for queued Executes
2 years ago
Philip O'Toole
5d047e7236
Fix copy 'n' paste errors
2 years ago
Philip O'Toole
00874ebb44
Add queue stats
2 years ago
Philip O'Toole
523f11ac0f
Fix more races
2 years ago
Philip O'Toole
5c7aeda86b
Cluster-level test of queued writes
2 years ago
Philip O'Toole
78657d1ce1
Fix race
2 years ago
Philip O'Toole
0e7f2bced3
Don't close closed channels
2 years ago
Philip O'Toole
5e9cf86de8
Main queue configurable
2 years ago
Philip O'Toole
88ec76398c
More robust HTTP shutdown
2 years ago
Philip O'Toole
13b1444a8d
Configurable queue
2 years ago
Philip O'Toole
02b8776c29
Start hooking in queuing to HTTP layer
2 years ago
Philip O'Toole
e03cfd836d
Add Queue to HTTP layer
2 years ago
Philip O'Toole
fd2eabc55d
Check length of SQLite file before offsetting
2 years ago
Philip O'Toole
a6ac6bccfc
Autodetect data format during load operation
2 years ago
Philip O'Toole
c8b9fd72da
Sanity check supplied SQLite data
2 years ago
Philip O'Toole
304124952c
Add Store level changes
...
Needs unit testing, and HTTP testing won't compile.
2 years ago
Philip O'Toole
2dcf0169b3
Count number of /readyz and /status
3 years ago
Philip O'Toole
33a69c8485
Merge branch 'master' of github.com:rqlite/rqlite into noleader-readyz
3 years ago
Philip O'Toole
2a87de9b90
/readyz can skip leader check
3 years ago
Philip O'Toole
cf2ad114fe
Add current time to status output
3 years ago
Philip O'Toole
4c597e4f02
Better ready response
3 years ago
Philip O'Toole
e4a0a5ecca
Possible help for racy (?) end-to-end test
3 years ago
Philip O'Toole
e4fed0cee3
Add bootstrap-expect ( #974 )
...
Add cluster-boostrap
3 years ago
Philip O'Toole
6b5cad6117
Remove useless comment
3 years ago
Philip O'Toole
3ad2b73155
Return a clearer response if no DB results
...
This shouldn't happen, but it might, this will allow the underlying
error to be returned to the caller. The body of the response will now
look something like:
{
"results": [],
"error": "some error",
"time": 0.021976516
}
3 years ago
Philip O'Toole
860999951d
Enhance Authentication and Authorization system ( #940 )
3 years ago
chermehdi
3bfcbffc37
Fix typos and Grammar issues
3 years ago
Philip O'Toole
f440eedbe0
Use better function
3 years ago
Philip O'Toole
a9748acdee
Help with better testing
3 years ago
Philip O'Toole
1a1f859b9a
Redirect HTTP / to /status
3 years ago
Philip O'Toole
c14a918de5
Use better name for interface
3 years ago
Philip O'Toole
2e7bf1c881
Even friendlier log message when start-up is done
3 years ago
Philip O'Toole
83f02eecf3
Updates to readyz permission checking
3 years ago
Philip O'Toole
1b915325f6
Add basic readyz handler
3 years ago
Philip O'Toole
38f52694a0
nodes/ endpoint supports timeout
3 years ago
Philip O'Toole
38eef8ee82
Merge pull request #890 from rqlite/more-abl
...
ABL
3 years ago
Philip O'Toole
dd71c07c73
ABL
3 years ago
Philip O'Toole
4e065872a1
Add OS state to status/ output
3 years ago
Philip O'Toole
875c09d9ca
More improved responses on HTTP 500
3 years ago
Philip O'Toole
0e50ab255d
Better HTTP logging during end-to-end tests
3 years ago
Philip O'Toole
a74c182425
Add missing returns after HTTP errors
3 years ago
Philip O'Toole
0b5df4b81d
HTTP layer uses timeout for GetNodeAPIAddr calls
3 years ago
Philip O'Toole
0b5d80c604
Add Error information to nodes/ output
3 years ago
Philip O'Toole
d45bdfed7f
System-level testing of nodes/
...
Fails right now because there is no way to actually shutdown the node
from answering cluster requests.
3 years ago
Philip O'Toole
b58615fda8
Add response times to nodes/ output
3 years ago
Philip O'Toole
9aecafedbe
Cluster client resolves advertised local address
...
Also, improve HTTP stats.
3 years ago
Philip O'Toole
a8d436e944
Improve stats
3 years ago
Philip O'Toole
f1a7e7e8ec
Use locally-enabled cluster client in HTTP service
3 years ago
Philip O'Toole
132c1809fe
Fix race condition
3 years ago
Philip O'Toole
5613edd887
Fix connection pool stats
...
Also HTTP should read its own Raft address locally.
3 years ago
Philip O'Toole
eee3a2e785
Fix code path that could cause panic
3 years ago
Philip O'Toole
6e17295913
Group network-related params together
3 years ago
Philip O'Toole
b01b10e4ce
Add convenience function for query params
3 years ago
Philip O'Toole
0b8beb6a5d
Implmenet Request Forwarding timeout support
3 years ago
Philip O'Toole
c017d11c22
Enable transparent request forwarding
3 years ago
Philip O'Toole
d20c1ba311
Use correct variables in Query handler
3 years ago
Philip O'Toole
1c6a7b49aa
Add support, but disable, request forwarding
...
Execute and Query only for now.
3 years ago
Philip O'Toole
cc7cdb20d7
HTTP expects remote database calls
3 years ago
Philip O'Toole
adc39168f2
Test for invalid Response
3 years ago
Philip O'Toole
79ebb9a44a
Single-node tests pass
3 years ago
Philip O'Toole
fd98114839
HTTP-level testing passes
3 years ago
Philip O'Toole
503825dbaf
Remove Abort functionality
...
No longer relevant since each Exec and Query gets its own connection.
3 years ago
Philip O'Toole
edc9f717e4
Always include "reachable" status
3 years ago
Philip O'Toole
b6e0f46f30
Support non-voting nodes optionally in nodes/
3 years ago
Philip O'Toole
58b567c27a
Only check non-voting nodes by default
3 years ago
Philip O'Toole
a098f677c7
Tweaks and docs
3 years ago
Philip O'Toole
4cff27f91f
Fix bugs in Goroutine logic
...
Testing never fails to produce results.
3 years ago
Philip O'Toole
7218a40ed1
Cluster system test for nodes/
...
It's failing however.
3 years ago
Philip O'Toole
0cca0dc603
Merge branch 'master' of github.com:rqlite/rqlite into other-node-status
3 years ago
Philip O'Toole
dbd1c0a254
Remove 'redirect' from HTTP status
...
Getting the redirect information requires accessing other nodes, which
could block if those nodes are not up.
3 years ago
Philip O'Toole
f4e04e5bc5
Check nodes reachable in parallel
3 years ago
Philip O'Toole
805074f8f5
Start supporting /nodes endpoint
3 years ago
Philip O'Toole
f939d33fe5
Remove Metadata concept from system
...
System testing passes.
3 years ago
Philip O'Toole
2cef5679b7
rqlited starts and stops fine
3 years ago
Philip O'Toole
6a48068d78
Integrate Cluster service with HTTP service
3 years ago
Philip O'Toole
f5cbc18a16
Add auth-ok and auth-fail events to stats
4 years ago
Philip O'Toole
c4ee9cafd9
Disable TLS v1.0 and v1.1 by default
4 years ago
Philip O'Toole
ab2338733c
Include more information with HTTP 500
4 years ago
Philip O'Toole
f81d7e29d7
Enable http/2.0 support for TLS
...
As per https://blog.cloudflare.com/exposing-go-on-the-internet/
4 years ago
Philip O'Toole
56cb9321d2
End-to-end test of idempotent join
4 years ago
Philip O'Toole
e948d7410a
ABL
4 years ago
Philip O'Toole
6575de779d
Use Protobuf for encoding Raft Log commands
...
This PR changes Raft Log Entry encoding from JSON to Protobuf. Furthermore, larger Raft commands (which can result from batching SQL statements, or individually long SQL statements) are compressed before encoding.
This primary reason for this change is to reduce IO load since that is one of the largest performance bottlenecks. It will also reduce internode traffic.
Legacy JSON-encoded commands are still handled by this code, so this change is backwards-compatible with previous releases in the v5 series.
4 years ago
Philip O'Toole
b4867713e4
Better variable name, Query -> SQL
4 years ago
Philip O'Toole
7bb3b8850d
Support logging from writeResponse()
4 years ago
Philip O'Toole
76358485a7
Explicitly handle "no leader" during backup
4 years ago
Philip O'Toole
ee9f929735
ABL
4 years ago
Philip O'Toole
142180bbe6
Fix load API
...
It uses plain text, not JSON.
4 years ago
Philip O'Toole
ac862e4091
Add system test for parameterized statements
...
Fix some bugs along the way too.
4 years ago
Philip O'Toole
6e6f12fdd6
HTTP API now supports multi-format
...
If now supports an array of strings, as before, and also supports arrays
of arrays, where each inner array contains a statement, and parameters
for binding to that statement.
4 years ago
Philip O'Toole
bbc8681b4d
Fix variable naming
4 years ago
Philip O'Toole
0d85f00b63
Test LeaderAPIAddr and LeaderAPIProto
...
To do this these functions needed to be made public.
4 years ago
Philip O'Toole
031fcbbde1
Correct comment
4 years ago
Philip O'Toole
fbdbee3e25
Include API proto in node meta
4 years ago
Philip O'Toole
c6419cc62e
Check local HTTPS cert to enable HTTPS redirect
...
This assumes that if this node is using HTTPS, then all other nodes are.
This is required as per the documentation.
4 years ago
Philip O'Toole
188981005f
Split out Queryable interface at Service level
4 years ago
Philip O'Toole
e073a5f54f
Fix comment
5 years ago
Philip O'Toole
cb0f88a022
Factor out credential check ( #624 )
5 years ago
Philip O'Toole
abb7772105
Support leader freshness with None consistency
...
This change allows the read request to specify the maximum time the node
receiving the request may have last heard from the cluster leader. It
only applies to a read consistency selection of None.
5 years ago
Philip O'Toole
81f5f6faf1
Add support for non-voting nodes
...
A non-voting node doesn't participate in Raft consensus, but does
subscribe to the committed log entries originating with the leader.
This means a non-voting node keeps up-to-date with the state machine,
without impacting write-latency. These non-voting nodes can provide
read scalability for the cluster.
5 years ago
Philip O'Toole
1ffc3d566e
Add varadic functions to auth store
5 years ago
Philip O'Toole
a23af88235
Write backup and dump files to a writer
...
This avoids making an extra copy in RAM. Port of original PR at
https://github.com/rqlite/rqlite/pull/461/ .
5 years ago
Philip O'Toole
c69ef51790
Remove debug line
5 years ago
Philip O'Toole
f57ace7da2
Broadcast Store meta via standard consensus
...
With this change the cluster metadata (arbitrary key-value data associated with each node) is now broadcast across the cluster using the standard consensus mechanism. Specifically the use case for this metadata is to allow all nodes know the HTTP API address of all other nodes, for the purpose of redirecting requests to the leader.
This change removed the need for multiplexing two logical connections
over the single Raft TCP connection, which greatly simplifies the
networking code generally.
Original PR https://github.com/rqlite/rqlite/pull/434
5 years ago
Philip O'Toole
a6f8f060fb
Update CHANGELOG
5 years ago
Philip O'Toole
e376812907
Add method to Store that returns leader ID
...
With the advent of Raft IDs, this distinction matters.
5 years ago
Philip O'Toole
8a0e1ce8f0
Move to Hashicorp Raft v1
5 years ago
Philip O'Toole
0e69be3949
Store layer supports generating SQL format backups
...
Port PR453.
5 years ago
Philip O'Toole
0471877f26
Abort transaction if load operation fails
5 years ago
Philip O'Toole
33f6f6bf8e
Move EnsureHTTPS into http module
5 years ago
Philip O'Toole
de379a883c
When joining try HTTPS if HTTP fails
5 years ago
Zac Medico
f01e6b1b0a
Server -http-ca-cert and -node-ca-cert options
...
The -http-ca-cert and -node-ca-cert options allow the user to specify
trusted X.509 root CA certificates as an alternative to the
-http-no-verify and -node-no-verify options. This behavior is analogous
to the rqlite client -ca-cert option.
5 years ago
Philip O'Toole
efec4d4e42
Return redirect if remove on follower
...
Fixes issue #391 .
7 years ago
Philip O Toole
00d24ce06d
Reduce cyclo complexity
7 years ago
Philip O'Toole
272792fbef
"status" permission required for Go runtime info
7 years ago
Philip O'Toole
2a1b6c65c3
New QueryRequest and ExecuteRequest types
...
The Query() and Execute() functions on the Store now take a complex type
that encapsulates the statements, and associated parameters. This will
make it easier to add more control parameters when making requests.
7 years ago
Philip O Toole
9d480c17c3
Make read consistency param case-insensitive
7 years ago
Philip O Toole
346e11cd88
Include query params with 301 redirect URL
7 years ago
Philip O'Toole
5a6f344a7d
Don't always set Content-Type as JSON ( #334 )
...
Set Content-type for backup endpoint to "application/octet-stream".
7 years ago
Philip O'Toole
d753a8f7be
HTTP service now supports registered statuses
...
Mux is first service to register status for serving.
7 years ago
Philip O Toole
982fa54030
Not all queries begin with SELECT so pull check
...
Common Table Expressions can begin with WITH. This check was always dubious.
8 years ago
Philip O Toole
e6f428fcd8
Convert magic string to const
8 years ago
Philip O Toole
2c8922b50b
Standardize load endpoint processing
8 years ago
Philip O Toole
9e87a3ba30
Add new perm for loading SQLite dump file
...
This was missed in previous releases.
8 years ago
Philip O Toole
5ed6ef0ae8
Covert dumps to queries in HTTP service
...
There is no need for special logic at the Store level.
8 years ago
Philip O'Toole
210367b51b
Fix call to Load()
8 years ago
Philip O'Toole
36368d6786
Start removing batch load
8 years ago
Philip O'Toole
68793cfcbb
Use a transaction for loaded batch
...
Bump the batch size to 1000 too.
8 years ago
Philip O Toole
6270744584
Correct batch size variable name
8 years ago