-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
133 lines (105 loc) · 3.14 KB
/
Cargo.toml
File metadata and controls
133 lines (105 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[package]
name = "guardian"
version = "0.2.0"
edition = "2021"
authors = ["Guardian Agent Contributors"]
description = "Lightweight safety coprocessor for AI workflows and infrastructure"
license = "MIT"
repository = "https://github.com/yourusername/GuardianAgent"
homepage = "https://github.com/yourusername/GuardianAgent"
documentation = "https://github.com/yourusername/GuardianAgent#readme"
keywords = ["policy", "security", "opa", "ai", "safety", "audit"]
categories = ["security", "web-programming", "api-bindings"]
[lib]
name = "guardian"
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
[[bin]]
name = "guardian-server"
path = "src/main.rs"
[dependencies]
# Async runtime
tokio = { version = "1.35", features = ["full"] }
async-trait = "0.1"
# HTTP server (optional, for server feature)
axum = { version = "0.7", features = ["macros"], optional = true }
tower = { version = "0.4", optional = true }
tower-http = { version = "0.5", features = ["cors", "trace"], optional = true }
hyper = { version = "1.0", features = ["full"], optional = true }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
# JWT
jsonwebtoken = "9.2"
chrono = { version = "0.4", features = ["serde"] }
# Cryptography
sha2 = "0.10"
hmac = "0.12"
hex = "0.4"
base64 = "0.21"
rand = "0.8"
aes-gcm = "0.10"
ring = "0.17"
# PII Detection
regex = "1.10"
# Cron scheduler
tokio-cron-scheduler = "0.9"
cron = "0.12"
# File I/O (async file operations are in tokio)
walkdir = "2.4"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Configuration
config = "0.14"
# OPA integration (via HTTP)
reqwest = { version = "0.11", features = ["json"] }
# AWS SDK (optional, for KMS)
aws-sdk-kms = { version = "1.0", optional = true }
aws-config = { version = "1.0", optional = true }
# Azure SDK (optional, for Key Vault)
# Note: Azure SDK crates have different naming. For now, comment out until proper package names are confirmed.
# azure_security_keyvault = { version = "0.20", optional = true }
# azure_identity = { version = "0.20", optional = true }
# TOTP for MFA (otpauth for provisioning URL)
totp-rs = { version = "5", optional = true, features = ["otpauth", "gen_secret"] }
# Utilities
uuid = { version = "1.6", features = ["v4", "serde"] }
once_cell = "1.19"
# Python bindings
pyo3 = { version = "0.20", features = ["extension-module", "abi3-py38"], optional = true }
[features]
default = ["server"]
server = ["dep:axum", "dep:tower", "dep:tower-http", "dep:hyper", "mfa"]
mfa = ["dep:totp-rs"]
# TLS: enable for HTTPS (build on Linux; Windows may need reverse proxy)
tls = []
python = ["dep:pyo3"]
aws-kms = ["dep:aws-sdk-kms", "dep:aws-config"]
# azure-kv = ["dep:azure_security_keyvault", "dep:azure_identity"]
[dev-dependencies]
tokio-test = "0.4"
criterion = "0.5"
tempfile = "3.10"
# Benchmarks
[[bench]]
name = "throughput"
harness = false
[[bench]]
name = "latency"
harness = false
[[bench]]
name = "memory"
harness = false
[[bench]]
name = "startup"
harness = false
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"