influxdb/influxdb3/Cargo.toml

75 lines
3.1 KiB
TOML
Raw Normal View History

[package]
name = "influxdb3"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap_blocks = { path = "../clap_blocks" }
influxdb3_server = { path = "../influxdb3_server" }
iox_time = { path = "../iox_time" }
iox_query = { path = "../iox_query" }
ioxd_common = { path = "../ioxd_common"}
influxdb3_client = { path = "../influxdb3_client" }
influxdb3_write = { path = "../influxdb3_write" }
metric = { path = "../metric" }
object_store = { workspace = true }
observability_deps = { path = "../observability_deps" }
panic_logging = { path = "../panic_logging" }
parquet_file = { path = "../parquet_file" }
tokio_metrics_bridge = { path = "../tokio_metrics_bridge" }
trace = { path = "../trace/" }
trace_exporters = { path = "../trace_exporters" }
2022-01-17 11:12:46 +00:00
trogging = { path = "../trogging", default-features = false, features = ["clap"] }
# Crates.io dependencies, in alphabetical order
backtrace = "0.3"
clap = { version = "4", features = ["derive", "env", "string"] }
console-subscriber = { version = "0.1.10", optional = true, features = ["parking_lot"] }
dotenvy = "0.15.7"
libc = { version = "0.2" }
num_cpus = "1.16.0"
once_cell = { version = "1.18", features = ["parking_lot"] }
parking_lot = "0.12.1"
secrecy = "0.8.0"
thiserror = "1.0.48"
tikv-jemalloc-ctl = { version = "0.5.4", optional = true }
tikv-jemalloc-sys = { version = "0.5.4", optional = true, features = ["unprefixed_malloc_on_supported_platforms"] }
tokio = { version = "1.32", features = ["macros", "net", "parking_lot", "rt-multi-thread", "signal", "sync", "time", "io-std"] }
tokio-util = { version = "0.7.9" }
url = "2.5.0"
uuid = { version = "1", features = ["v4"] }
fix: Failing CI on main (#24562) * fix: build, upgrade rustc, and deps This commit upgrades Rust to 1.75.0, the latest release. We also upgraded our dependencies to stay up to date and to clear out any uneeded deps from the lockfile. In order to make sure everything works this also fixes the build by upgrading the workspace-hack crate using cargo hikari and removing the `workspace.lint` that was in influxdb3_write that didn't need to be there, probably from a merge issue. With this we can build influxdb3 as our default on main, but this alone is not enough to fix CI and will be addressed in future commits. * fix: warnings for influxdb3 build This commit fixes the warnings emitted by `cargo build` when compiling influxdb3. Mainly it adds needed lifetimes and removes uneccesary imports and functions calls. * fix: all of the clippy lints This for the most part just applies suggested fixes by clippy with a few exceptions: - Generated type crates had additional allows added since we can't control what code gets made - Things that couldn't be automatically fixed were done so manually in particular adding a Send bound for traits that created a Future that should be Send We also had to fix a build issue by adding a feature for tokio-compat due to the upgrade of deps. The workspace crate was updated accordingly. * fix: failing test due to rust panic message change Inbetween rustc 1.72 and rustc 1.75 the way that error messages were displayed when panicing changed. One of our tests depended on the output of that behavior and this commit updates the error message to the new form so that tests will pass. * fix: broken cargo doc link * fix: cargo formatting run * fix: add workspace-hack to influxdb3 crates This was the last change needed to make sure that the workspace-hack crate CI lint would pass. * fix: remove tests that can not run anymore We removed iox code from this code base and as a result some tests cannot be run anymore and so this commit removes them from the code base so that we can get a green build.
2024-01-09 20:11:35 +00:00
workspace-hack = { version = "0.1", path = "../workspace-hack" }
feat: Add All or Nothing Bearer token auth support (#24666) This commit adds basic authorization support to Edge. Up to this point we didn't need have authorization at all and so the server would receive and accept requests from anyone. This isn't exactly secure or ideal for a deployment and so we add a basic form of authentication. The way this works is that a user passes in a hex encoded sha256 hash of a given token to the '--bearer-token' flag of the serve command. When the server starts with this flag it will now check a header of the form 'Authorization: Bearer <token>' by making sure it is valid in the sense that it is not malformed and that when token is hashed it matches the value passed in on the command line. The request is denied with either a 400 Bad Request if the header is malformed or a 401 Unauthorized if the hash does not match or the header is missing. The user is provided a new subcommand of the form: 'influxdb3 create token <token>' where the output contains the command to run the server with and what the header should look like to make requests. I can see future work including multiple tokens and rotating between them or adding new ones to a live service, but for now this shall suffice. As part of the commit end-to-end tests are included to run the server and make requests against the HTTP API and to make sure that requests are denied for being unauthorized, accepted for having the right header, or denied for being malformed. Also as part of this commit a small fix is included for 'Accept: */*' headers. We were not checking for them and if this header was included we were denying it instead of sending back the default payload return value.
2024-02-20 20:34:39 +00:00
sha2 = "0.10.8"
hex = "0.4.3"
[features]
default = ["jemalloc_replacing_malloc"]
azure = ["clap_blocks/azure"] # Optional Azure Object store support
gcp = ["clap_blocks/gcp"] # Optional GCP object store support
aws = ["clap_blocks/aws"] # Optional AWS / S3 object store support
2022-04-08 17:46:01 +00:00
pprof = ["ioxd_common/pprof"] # Optional http://localhost:8080/debug/pprof/profile support
heappy = ["ioxd_common/heappy"] # Optional http://localhost:8080/debug/pproc/alloc support
# Enable tokio_console support (https://github.com/tokio-rs/console)
#
# Requires enabling trace level tracing events for [tokio,runtime].
tokio_console = ["console-subscriber", "tokio/tracing", "observability_deps/release_max_level_trace"]
# heappy is an optional feature; Not on by default as it
# runtime overhead on all allocations (calls to malloc).
# Cargo cannot currently implement mutually exclusive features so let's force every build
# to pick either heappy or jemalloc_replacing_malloc feature at least until we figure out something better.
jemalloc_replacing_malloc = ["tikv-jemalloc-sys", "tikv-jemalloc-ctl"]
# Implicit feature selected when running under `clippy --all-features` to accept mutable exclusive features during
# linting
clippy = []
feat: Add All or Nothing Bearer token auth support (#24666) This commit adds basic authorization support to Edge. Up to this point we didn't need have authorization at all and so the server would receive and accept requests from anyone. This isn't exactly secure or ideal for a deployment and so we add a basic form of authentication. The way this works is that a user passes in a hex encoded sha256 hash of a given token to the '--bearer-token' flag of the serve command. When the server starts with this flag it will now check a header of the form 'Authorization: Bearer <token>' by making sure it is valid in the sense that it is not malformed and that when token is hashed it matches the value passed in on the command line. The request is denied with either a 400 Bad Request if the header is malformed or a 401 Unauthorized if the hash does not match or the header is missing. The user is provided a new subcommand of the form: 'influxdb3 create token <token>' where the output contains the command to run the server with and what the header should look like to make requests. I can see future work including multiple tokens and rotating between them or adding new ones to a live service, but for now this shall suffice. As part of the commit end-to-end tests are included to run the server and make requests against the HTTP API and to make sure that requests are denied for being unauthorized, accepted for having the right header, or denied for being malformed. Also as part of this commit a small fix is included for 'Accept: */*' headers. We were not checking for them and if this header was included we were denying it instead of sending back the default payload return value.
2024-02-20 20:34:39 +00:00
[dev-dependencies]
reqwest = { version = "0.11.24", default-features = false, features = ["rustls-tls"] }