- Replace form_urlencoded with RFC 3986 compliant URI encoding - Implement aws_uri_encode() matching AWS SigV4 spec exactly - Unreserved chars (A-Z,a-z,0-9,-,_,.,~) not encoded - All other chars percent-encoded with uppercase hex - Preserve slashes in paths, encode in query params - Normalize empty paths to '/' per AWS spec - Fix test expectations (body hash, HMAC values) - Add comprehensive SigV4 signature determinism test This fixes the canonicalization mismatch that caused signature validation failures in T047. Auth can now be enabled for production. Refs: T058.S1
51 lines
1.5 KiB
Rust
51 lines
1.5 KiB
Rust
//! RocksDB storage layer for Chainfire distributed KVS
|
|
//!
|
|
//! This crate provides:
|
|
//! - RocksDB-backed persistent storage
|
|
//! - Key-Value operations (Put, Get, Delete, Scan)
|
|
//! - Lease management for TTL-based key expiration
|
|
//! - Log storage for Raft
|
|
//! - State machine for Raft
|
|
//! - Snapshot management
|
|
|
|
pub mod kv_store;
|
|
pub mod lease_store;
|
|
pub mod log_storage;
|
|
pub mod snapshot;
|
|
pub mod state_machine;
|
|
pub mod store;
|
|
|
|
pub use kv_store::KvStore;
|
|
pub use lease_store::{LeaseExpirationWorker, LeaseStore};
|
|
pub use log_storage::{LogStorage, LogEntry, EntryPayload, LogId, Vote, LogState};
|
|
pub use snapshot::{Snapshot, SnapshotBuilder, SnapshotMeta};
|
|
pub use state_machine::StateMachine;
|
|
pub use store::RocksStore;
|
|
|
|
/// Column family names for RocksDB
|
|
pub mod cf {
|
|
/// Raft log entries
|
|
pub const LOGS: &str = "raft_logs";
|
|
/// Raft metadata (vote, term, etc.)
|
|
pub const META: &str = "raft_meta";
|
|
/// Key-value data
|
|
pub const KV: &str = "key_value";
|
|
/// Snapshot metadata
|
|
pub const SNAPSHOT: &str = "snapshot";
|
|
/// Lease data
|
|
pub const LEASES: &str = "leases";
|
|
}
|
|
|
|
/// Metadata keys
|
|
pub mod meta_keys {
|
|
/// Current term and vote
|
|
pub const VOTE: &[u8] = b"vote";
|
|
/// Last applied log ID
|
|
pub const LAST_APPLIED: &[u8] = b"last_applied";
|
|
/// Current membership
|
|
pub const MEMBERSHIP: &[u8] = b"membership";
|
|
/// Current revision
|
|
pub const REVISION: &[u8] = b"revision";
|
|
/// Last snapshot ID
|
|
pub const LAST_SNAPSHOT: &[u8] = b"last_snapshot";
|
|
}
|