# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "assay-vault"
version = "0.2.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Vault module for assay-engine: KV v2, transit, dynamic credentials, Bitwarden-aligned vaults + collections + items + folders, biscuit-attenuated share links, sealing (Shamir / cloud KMS / HSM), audit forwarding, and a Bitwarden-protocol compat shim. PG18 + SQLite, both first-class."
readme = false
keywords = [
    "vault",
    "secrets",
    "kv",
    "transit",
    "biscuit",
]
categories = [
    "cryptography",
    "asynchronous",
    "database",
]
license = "Apache-2.0"
repository = "https://github.com/developerinlondon/assay"
resolver = "2"

[features]
backend-postgres = [
    "dep:sqlx",
    "sqlx/postgres",
]
backend-sqlite = [
    "dep:sqlx",
    "sqlx/sqlite",
]
default = [
    "vault",
    "backend-postgres",
    "backend-sqlite",
]
vault = [
    "vault-kv",
    "vault-transit",
    "vault-collections",
    "vault-share",
    "vault-sealing-shamir",
    "vault-sealing-kms",
    "vault-audit-forwarding",
    "vault-bitwarden-compat",
    "vault-dynamic-postgres",
    "vault-dynamic-aws",
    "vault-dynamic-gcp",
    "vault-dynamic-kubernetes",
]
vault-audit-forwarding = [
    "dep:reqwest",
    "dep:syslog",
    "dep:hmac",
]
vault-bitwarden-compat = [
    "assay-auth/auth-password",
    "assay-auth/auth-jwt",
]
vault-collections = []
vault-dynamic-aws = [
    "dep:reqwest",
    "dep:hmac",
]
vault-dynamic-gcp = [
    "dep:reqwest",
    "dep:jsonwebtoken",
]
vault-dynamic-kubernetes = ["dep:reqwest"]
vault-dynamic-postgres = []
vault-kv = []
vault-sealing-hsm = []
vault-sealing-kms = [
    "dep:reqwest",
    "dep:hmac",
    "dep:jsonwebtoken",
]
vault-sealing-shamir = ["dep:sharks"]
vault-share = ["dep:biscuit-auth"]
vault-transit = []

[lib]
name = "assay_vault"
path = "src/lib.rs"

[[test]]
name = "kv"
path = "tests/kv.rs"

[[test]]
name = "smoke"
path = "tests/smoke.rs"

[[test]]
name = "transit"
path = "tests/transit.rs"

[dependencies.aes-gcm-siv]
version = "0.11"

[dependencies.anyhow]
version = "1"

[dependencies.assay-auth]
version = "0.3"

[dependencies.assay-domain]
version = "0.2"

[dependencies.async-trait]
version = "0.1"

[dependencies.axum]
version = "0.8"

[dependencies.biscuit-auth]
version = "6"
optional = true

[dependencies.chrono]
version = "0.4"
features = [
    "std",
    "clock",
    "serde",
]
default-features = false

[dependencies.data-encoding]
version = "2"

[dependencies.hmac]
version = "0.12"
optional = true

[dependencies.jsonwebtoken]
version = "10"
optional = true

[dependencies.parking_lot]
version = "0.12"

[dependencies.rand]
version = "0.9"

[dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "rustls-tls",
]
optional = true
default-features = false

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.10"

[dependencies.sharks]
version = "0.5"
optional = true

[dependencies.sqlx]
version = "0.8"
features = [
    "runtime-tokio-rustls",
    "any",
]
optional = true

[dependencies.syslog]
version = "7"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "rt",
    "sync",
    "time",
]

[dependencies.tracing]
version = "0.1"

[dependencies.url]
version = "2"

[dependencies.uuid]
version = "1"
features = [
    "v4",
    "v7",
    "serde",
]

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tokio]
version = "1"
features = ["full"]
