[package]
name = "adk-auth"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
description = "Access control and authentication for Rust Agent Development Kit (ADK-Rust)"
repository = "https://github.com/zavora-ai/adk-rust"
documentation = "https://docs.rs/adk-auth"
keywords = ["ai", "agent", "adk", "auth", "security"]
categories = ["authentication", "api-bindings"]
readme = "README.md"

[features]
default = []
sso = ["jsonwebtoken", "reqwest", "dashmap", "base64"]
auth-bridge = ["sso", "adk-server", "axum"]
# Cloud secret manager providers
aws-secrets = ["dep:aws-sdk-secretsmanager", "dep:aws-config"]
azure-keyvault = ["dep:azure_security_keyvault_secrets", "dep:azure_identity", "dep:azure_core"]
gcp-secrets = ["dep:google-cloud-secretmanager-v1", "dep:google-cloud-gax"]
# Enterprise audit sinks
postgres-audit = ["dep:sqlx"]
otlp-audit = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp"]

[dependencies]
adk-core.workspace = true
adk-server = { workspace = true, optional = true }
async-trait.workspace = true
tokio = { workspace = true, features = ["sync"] }
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
thiserror.workspace = true
tracing.workspace = true
chrono = { version = "0.4", features = ["serde"] }
sha2 = { workspace = true }
hex = { workspace = true }
axum = { version = "0.8", optional = true }

# SSO dependencies (optional)
jsonwebtoken = { version = "10", features = ["aws_lc_rs"], optional = true }
reqwest = { workspace = true, features = ["json"], optional = true }
dashmap = { version = "6", optional = true }
base64 = { version = "0.22", optional = true }

# AWS Secrets Manager (optional)
aws-sdk-secretsmanager = { version = "1", optional = true }
aws-config = { version = "1", features = ["behavior-version-latest"], optional = true }

# Azure Key Vault (optional)
azure_security_keyvault_secrets = { version = "0.1", optional = true }
azure_identity = { version = "0.1", optional = true }
azure_core = { version = "0.22", optional = true }

# GCP Secret Manager (optional)
google-cloud-secretmanager-v1 = { version = "1", optional = true }
google-cloud-gax = { version = "1.9", default-features = false, optional = true }

# Enterprise audit sinks (optional)
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "chrono", "json"], optional = true }
opentelemetry = { version = "0.31", optional = true }
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio"], optional = true }
opentelemetry-otlp = { version = "0.31", features = ["grpc-tonic"], optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time", "test-util"] }
proptest = "1.5"
