mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-26 23:25:55 -05:00
422cd2a75e
Some caveats: * it doesn't record the peer IP yet, which makes it harder to verify sessions are valid. This is a little annoying to do in hyper now (see hyperium/hyper#1410). The direct peer might not be what we want right now anyway because there's no TLS support yet (see #27). In the meantime, the sane way to expose Moonfire NVR to the Internet is via a proxy server, and recording the proxy's IP is not useful. Maybe better to interpret a RFC 7239 Forwarded header (and/or the older X-Forwarded-{For,Proto} headers). * it doesn't ever use Secure (https-only) cookies, for a similar reason. It's not safe to use even with a tls proxy until this is fixed. * there's no "moonfire-nvr config" support for inspecting/invalidating sessions yet. * in debug builds, logging in is crazy slow. See libpasta/libpasta#9. Some notes: * I removed the Javascript "no-use-before-defined" lint, as some of the functions form a cycle. * Fixed #20 along the way. I needed to add support for properly returning non-OK HTTP statuses to signal unauthorized and such. * I removed the Access-Control-Allow-Origin header support, which was at odds with the "SameSite=lax" in the cookie header. The "yarn start" method for running a local proxy server accomplishes the same thing as the Access-Control-Allow-Origin support in a more secure manner.
33 lines
624 B
TOML
33 lines
624 B
TOML
[package]
|
|
name = "moonfire-db"
|
|
version = "0.0.1"
|
|
authors = ["Scott Lamb <slamb@slamb.org>"]
|
|
readme = "../README.md"
|
|
|
|
[features]
|
|
nightly = []
|
|
|
|
[lib]
|
|
path = "lib.rs"
|
|
|
|
[dependencies]
|
|
base64 = "0.9.0"
|
|
blake2-rfc = "0.2.18"
|
|
failure = "0.1.1"
|
|
fnv = "1.0"
|
|
lazy_static = "1.0"
|
|
libc = "0.2"
|
|
libpasta = "0.1.0-rc2"
|
|
log = "0.4"
|
|
lru-cache = "0.1"
|
|
moonfire-base = { path = "../base" }
|
|
mylog = { git = "https://github.com/scottlamb/mylog" }
|
|
openssl = "0.10"
|
|
parking_lot = { version = "0.6", features = [] }
|
|
protobuf = "2.0"
|
|
regex = "1.0"
|
|
rusqlite = "0.14"
|
|
tempdir = "0.3"
|
|
time = "0.1"
|
|
uuid = { version = "0.6", features = ["std", "v4"] }
|