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
//! Security module for shell-tunnel.
//!
//! This module provides authentication, rate limiting, and input validation
//! for the API layer.
//!
//! ## Features
//!
//! - **API Key Authentication**: Simple Bearer token authentication
//! - **Rate Limiting**: IP-based sliding window rate limiter
//! - **Input Validation**: Command sanitization and dangerous pattern detection
//!
//! ## Example
//!
//! ```rust
//! use shell_tunnel::security::{ApiKeyStore, RateLimiter, CommandValidator};
//!
//! // Create authentication store
//! let auth = ApiKeyStore::default();
//! auth.add_key("my-secret-key");
//!
//! // Create rate limiter (100 req/min)
//! let limiter = RateLimiter::default();
//!
//! // Create command validator
//! let validator = CommandValidator::default();
//! assert!(validator.validate_command("echo hello").is_ok());
//! ```
// Re-export commonly used types
pub use ;
pub use ;
pub use ;
pub use ;