Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
112 lines (104 loc) · 5.61 KB
/
Copy pathCargo.toml
File metadata and controls
112 lines (104 loc) · 5.61 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
[workspace]
resolver = "2"
members = ["crates/credentials-core", "crates/credentials-module", "crates/claustrum-client"]
# cortexkit-credentials — a subc-supervised module that holds credentials
# (OAuth tokens, API keys, DSNs) encrypted at rest and serves each consumer the
# credential it needs, kept fresh via vault-owned OAuth refresh. It replaces the
# scattered per-consumer credential acquisition (llm-runner's auth.json read,
# ai-provider-quota's bespoke OAuth paths) with one custody home.
#
# How the parts fit together: docs/architecture.md. Threat model: SECURITY.md.
#
# Two-crate split (the standard module shape, template = ai-provider-quota):
# credentials-core = pure custody logic (typed VaultRecord, canonical
# OAuthCredential, value-level encryption envelope,
# bounded refresh adapters, crash-safe refresh state
# machine, master-key resolution). No subc dep.
# credentials-module = the thin subc-wire binary: read surface + admin surface,
# capability handles, fault isolation, audit.
# claustrum-client = publishable Rust consumer for supervised modules.
#
# All published CortexKit crates come from crates.io, pinned by Cargo.lock.
# Move forward deliberately with `cargo update -p <crate>`.
# CI checks out ../subconscious only to build the ck-subc daemon for real-daemon
# e2e tests and read the push-envelope spec for scripts/check-inbound-contracts.sh.
[workspace.dependencies]
cortexkit-test-support = "0.1.0"
subc-protocol = "0.31.0"
subc-transport = "0.12.0"
subc-os = "0.1.16"
cortexkit-store = "0.2.4"
cortexkit-lease = "0.1.2"
cortexkit-store-types = "0.2.2"
# Cross-binary path identity: resolves a filesystem path to a canonical, platform-
# normalized id (macOS /var->/private/var, symlinks, Windows verbatim/drive-case)
# so two independent binaries agree on a path byte-for-byte. Used to scope the
# keychain master-key item per-vault by canonical data_dir.
cortexkit-paths = "0.1.1"
# Fleet logging (r2): one line format, one dated segment per module per day. Pulled in
# WITHOUT `store-paths`: the daemon is told its data directory by the supervisor at
# HELLO and must not resolve it a second time through another copy of the resolver.
cortexkit-log = { version = "0.3.5", default-features = false }
tracing = "0.1"
# The same rusqlite (bundled) cortexkit-store uses, so the Connection/Transaction
# types the fenced-write closures expose unify with ours.
rusqlite = { version = "0.32", features = ["bundled"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
proptest = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "sync", "time", "process"] }
async-trait = "0.1"
# HTTP for OAuth refresh adapters (rustls, no native-tls).
#
# `http2` is required by ONE caller and enabled for EVERY caller, because this is a
# workspace dependency and cargo unions features across the graph. APNs speaks HTTP/2
# only -- a client built without it negotiates 1.1 and is refused at the transport
# before any request is seen -- and the daemon links the same reqwest for OAuth token
# refresh.
#
# Provider refresh does NOT negotiate HTTP/2 as a result: `ReqwestTransport::new`
# (crates/credentials-core/src/http.rs) builds its client with `.http1_only()`, so
# every refresh stays on HTTP/1.1 whatever features this line enables. That pin, not
# this feature list, decides the refresh protocol; the reasoning and how to lift it
# are in its doc comment. `cargo run -p credentials-core --example
# negotiated_protocol` measures what each provider token endpoint would negotiate
# without the pin.
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
"json",
"http2",
] }
chrono = { version = "0.4", default-features = false, features = ["std", "clock"] }
url = "2"
# At-rest encryption: XChaCha20-Poly1305 AEAD (256-bit key matches the contract's
# 32-byte CSPRNG master key). The extended 192-bit random nonce is collision-safe
# at any realistic write volume, so the envelope carries no "writes-per-key"
# ceiling to reason about (the structural reason this won over AES-256-GCM, whose
# 96-bit-nonce birthday bound — though safe at our volume — is a latent invariant a
# future high-volume reuse of this primitive could approach). CSPRNG for keys and
# nonces; zeroize scrubs the master key material.
chacha20poly1305 = "0.10"
getrandom = "0.2"
zeroize = { version = "1", features = ["zeroize_derive", "serde"] }
sha2 = "0.10"
hmac = "0.12"
subtle = "2.6"
# ES256 (ECDSA P-256 + SHA-256) for APNs provider tokens. APNs accepts NO other
# algorithm for token auth, and it wants the raw 64-byte r||s signature rather
# than the ASN.1 DER encoding `to_der()` produces -- a DER signature is a valid
# ECDSA signature that APNs rejects, so the encoding is part of the contract.
p256 = { version = "0.13", features = ["ecdsa", "pem"] }
base64 = "0.22"
# RS256 GitHub App assertions. `ring` is already linked through rustls; declaring it
# directly avoids adding RustCrypto's `rsa` crate and its open timing advisory.
ring = "0.17.14"
# RFC 9180 base-mode HPKE keeps the X25519 KEM, HKDF-SHA256 key schedule and
# ChaCha20-Poly1305 AEAD together; ring cannot import a static X25519 recipient
# through its ephemeral agreement API.
hpke = "0.13"
# Optimise SHA-256 in debug and test builds. cortexkit-test-support hashes the
# whole test binary twice on every launch it stages, and unoptimised SHA-256 made
# that most of each `ck auth` end-to-end test's runtime: one cli_admin test took
# 13.6 s and drops to about 1 s with this. Release builds are already optimised.
[profile.dev.package.sha2]
opt-level = 3