Skip to content

Commit

Permalink
Multi-scopes auth & Attach fix (#1076)
Browse files Browse the repository at this point in the history
* test snapshots

* allow multi-scope auth

* hors-sujet: fix C compile warning

* update jwt and add hashbrown feature

* replace Auth with RequestContext

* extract RequestContext

* fix auth check for multi-scopes

* pass NamespaceName in StmtKind::Attach

* fallback to global auth if key is not set in ns config

* add allow_attach to namespace creation

* return meta store from namespace store

* test attach

* fmt

* review edits
  • Loading branch information
MarinPostma authored Feb 26, 2024
1 parent 82cd274 commit 52d8b8f
Show file tree
Hide file tree
Showing 40 changed files with 1,155 additions and 516 deletions.
67 changes: 34 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libsql-ffi/bundled/src/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -131315,9 +131315,9 @@ int libsql_try_initialize_wasm_func_table(sqlite3 *db) {
sqlite3_finalize(stmt);
return rc;
}
const char *pName = sqlite3_column_text(stmt, 0);
const unsigned char *pName = sqlite3_column_text(stmt, 0);
const void *pBody = body_type == SQLITE_TEXT ? sqlite3_column_text(stmt, 1) : sqlite3_column_blob(stmt, 1);
try_instantiate_wasm_function(db, pName, name_size, pBody, body_size, -1, NULL);
try_instantiate_wasm_function(db, (const char *)pName, name_size, pBody, body_size, -1, NULL);
}
}
sqlite3_finalize(stmt);
Expand Down
5 changes: 3 additions & 2 deletions libsql-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ hyper = { version = "0.14.23", features = ["http2"] }
hyper-rustls = { git = "https://github.com/rustls/hyper-rustls.git", rev = "163b3f5" }
hyper-tungstenite = "0.11"
itertools = "0.10.5"
jsonwebtoken = "8.2.0"
jsonwebtoken = "9"
libsql = { path = "../libsql/", optional = true }
libsql_replication = { path = "../libsql-replication" }
metrics = "0.21.1"
Expand Down Expand Up @@ -80,7 +80,7 @@ uuid = { version = "1.3", features = ["v4", "serde"] }
aes = { version = "0.8.3", optional = true }
cbc = { version = "0.1.2", optional = true }
zerocopy = { version = "0.7.28", features = ["derive", "alloc"] }
hashbrown = "0.14.3"
hashbrown = { version = "0.14.3", features = ["serde"] }

[dev-dependencies]
arbitrary = { version = "1.3.0", features = ["derive_arbitrary"] }
Expand All @@ -99,6 +99,7 @@ url = "2.3"
metrics-util = "0.15"
s3s = "0.8.1"
s3s-fs = "0.8.1"
ring = { version = "0.17.8", features = ["std"] }

[build-dependencies]
vergen = { version = "8", features = ["build", "git", "gitcl"] }
Expand Down
Loading

0 comments on commit 52d8b8f

Please sign in to comment.