moonfire-nvr/Cargo.toml
Scott Lamb 422cd2a75e preliminary web support for auth (#26)
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.
2018-11-27 11:08:33 -08:00

70 lines
1.5 KiB
TOML

[package]
name = "moonfire-nvr"
version = "0.1.0"
authors = ["Scott Lamb <slamb@slamb.org>"]
[features]
# The nightly feature is used within moonfire-nvr itself to gate the
# benchmarks. Also pass it along to crates that can benefit from it.
nightly = ["moonfire-db/nightly", "parking_lot/nightly"]
# The bundled feature includes bundled (aka statically linked) versions of
# native libraries where possible.
bundled = ["rusqlite/bundled"]
[workspace]
members = ["base", "db", "ffmpeg"]
[dependencies]
base64 = "0.9.0"
bytes = "0.4.6"
byteorder = "1.0"
docopt = "1.0"
failure = "0.1.1"
futures = "0.1"
futures-cpupool = "0.1"
fnv = "1.0"
http = "0.1.5"
http-serve = "0.1.0"
hyper = "0.12.9"
lazy_static = "1.0"
libc = "0.2"
log = { version = "0.4", features = ["release_max_level_info"] }
memchr = "2.0.2"
memmap = "0.7"
moonfire-base = { path = "base" }
moonfire-db = { path = "db" }
moonfire-ffmpeg = { path = "ffmpeg" }
mylog = { git = "https://github.com/scottlamb/mylog" }
openssl = "0.10"
parking_lot = { version = "0.6", features = [] }
reffers = "0.5.1"
regex = "1.0"
ring = "0.12.1"
rusqlite = "0.14"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
smallvec = "0.6"
time = "0.1"
tokio = "0.1.8"
tokio-signal = "0.2"
url = "1.4"
uuid = { version = "0.6", features = ["serde", "std", "v4"] }
[dev-dependencies]
reqwest = "0.9.5"
tempdir = "0.3"
[dependencies.cursive]
version = "0.9"
#default-features = false
#features = ["termion-backend"]
[profile.release]
debug = true
[profile.bench]
debug = true