Commit Graph
321 Commits
Author SHA1 Message Date
nutcas3 8a63cab829 feat: Add Prometheus alert rules with comprehensive monitoring for platform services and infrastructure
- Add telecom_platform_alerts group with 30s evaluation interval
- Add API Server alerts (high error rate >0.1/s, high latency >1s p99, down >2m)
- Add Charging Engine alerts (high error rate, down, high memory >90%)
- Add Carrier Connector alerts (high error rate, down)
- Add Packet Gateway alerts (down, high packet drop rate >100/s)
- Add Web Dashboard down alert (warning severity)
- Add PostgreSQL alerts (down, high connection count >80%,
2026-04-25 05:34:21 +03:00
nutcas3 c3903238dc feat: Add Alertmanager configuration with severity-based routing and multi-channel notifications
- Add global configuration with 5m resolve timeout and Slack webhook URL placeholder
- Add template directory reference for custom alert notification templates
- Add route configuration with grouping by alertname, severity, and service (10s wait/interval, 12h repeat)
- Add severity-based routing (critical, warning, info) with dedicated receivers
- Add default Slack receiver for #telecom-platform-alerts channel
2026-04-25 05:34:01 +03:00
nutcas3 bd3226edf0 feat: Refactor CLI API client by splitting billing, carrier, and charging modules into separate files
- Extract Invoice, Payment, Subscriber types and GetInvoices, GetPayments, GenerateInvoice methods to billing.go
- Extract CarrierInfo, ConnectivityStatus, ProfileInfo types and carrier connector methods to carrier.go
- Extract CreditCheckRequest/Response, CreditBalanceResponse types and charging engine methods to charging.go
- Add PacketStats, CreditInfo types and GetPacketStats, GetCreditInfo
2026-04-25 05:33:41 +03:00
nutcas3 91b8d53662 feat: Add charging engine integration with periodic usage reporting to packet gateway
- Add reqwest dependency with json feature to Cargo.toml
- Add charging_client module import and ChargingEngineClient initialization
- Add --charging-engine-url CLI argument with default http://localhost:3001
- Add periodic usage reporting every 60 seconds with batch processing
- Add IP-to-session-id mapping for usage events (format: session-{ip})
- Add async batch usage reporting with error logging on failure
- Add last
2026-04-25 05:29:00 +03:00
nutcas3 e839ffb519 feat: Add precision handling and overflow protection to monthly fee billing
- Add rounding to monthly fee conversion to cents to prevent precision loss
- Replace direct subtraction with saturating_sub to prevent i64 underflow
- Add fee_cents variable for clearer monthly fee calculation in billing cycle
2026-04-25 05:28:43 +03:00
nutcas3 e4b32a096a feat: Add overflow protection to credit addition in charging engine
- Add current balance retrieval before credit increment operation
- Add checked_add validation to prevent u64 overflow when adding credits
- Add InvalidInput error return when credit addition would cause overflow
- Add overflow check between get and incr operations on Redis credit key
2026-04-25 05:28:33 +03:00
nutcas3 2c5d513c4b feat: Add subscriber management API endpoints with RBAC authorization
- Add SubscriberHandler to serverDeps with NewSubscriberService initialization
- Add subscriber routes to v1 API with GET (list, by id, by IMSI) and protected POST/PUT operations
- Add RBAC enforcement for subscriber creation, updates, suspension, and termination (admin, operator roles)
- Add registerSubscriberRoutes function with /subscribers endpoint group
2026-04-25 05:28:14 +03:00
nutcas3 d4113d7148 refactor: Remove MongoDB Kubernetes deployment configuration
- Remove mongodb ConfigMap with MONGO_INITDB_DATABASE configuration
- Remove mongodb Secret with root username/password credentials
- Remove mongodb PersistentVolumeClaim with 10Gi storage allocation
- Remove mongodb Deployment with mongo:7.0 image, resource limits, and persistent volume mount
- Remove mongodb ClusterIP Service exposing port 27017
2026-04-25 05:27:48 +03:00
nutcas3 595a078ec8 feat: Add login/register page with form validation and token persistence
- Add LoginPage component with toggle between login and registration modes
- Add form state management for username, password, email, first_name, last_name fields
- Add handleSubmit with api.auth.login/register integration and token storage (access_token, refresh_token)
- Add error handling with red alert banner display
- Add conditional rendering for registration fields (email, first_name, last_name)
- Add loading state with
2026-04-25 05:27:07 +03:00
nutcas3 5ec4db009f feat: Add charging engine client with usage reporting and batch processing support
- Add ChargingEngineClient struct with reqwest HTTP client and configurable base URL
- Add report_usage method for single usage event reporting with volume conversion (bytes to MB)
- Add report_batch_usage method for processing multiple usage events with error tolerance
- Add UsageEvent and UsageResponse types for API request/response serialization
- Add tracing integration (info, warn, error) for usage reporting
2026-04-25 05:25:48 +03:00
nutcas3 9e7b46c380 feat: Add authentication API client with JWT token management and auto-redirect on 401
- Add setAuthToken, getAuthToken, clearAuthToken functions with localStorage persistence
- Add Authorization Bearer token header to all API requests in apiFetch
- Add 401 status handling with automatic token clearing and redirect to /login
- Add auth API methods (login, register, refresh, logout, profile, changePassword)
- Add authentication types (LoginRequest, RegisterRequest, AuthResponse, User, ChangePassword
2026-04-25 05:25:21 +03:00
nutcas3 6546daa900 feat: Add charging engine, carrier connector, and packet gateway API client methods to CLI
- Add charging engine API methods (CheckCredit, GetBalance, AddCredit, DeductCredit) with request/response types
- Add carrier connector API methods (GetCarrierInfo, CheckConnectivity, ListProfiles, OrderProfile, DeleteProfile) with eSIM profile management
- Add packet gateway API methods (GetPacketStats, GetCreditInfo) for network statistics and credit tracking
- Add CreditCheckRequest/Response, CreditBal
2026-04-25 05:23:11 +03:00
nutcas3 70504379c5 feat: Add HMAC-SHA256 authentication utilities to Terraform provider client
- Add crypto/hmac, crypto/sha256, and encoding/base64 imports
- Add hmacSHA256 function for HMAC-SHA256 signature generation with base64 URL encoding
- Add base64URLEncode helper function for URL-safe base64 encoding
- Add reference implementation comments for SDK compatibility
2026-04-25 05:09:35 +03:00
nutcas3 ea20dfb302 docs: Add Ruby SDK README with comprehensive API documentation and implement modular architecture with HTTParty integration
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Refactor TelecomSDK::Client to use modular API clients (SubscriberAPI, UsageAPI, PaymentAPI, RatingPlanAPI, SystemAPI, GraphQLAPI)
- Add AuthProvider class with API key and JWT token support (generate_jwt_token, validate_jwt_token methods)
- Add HTTPClient base class with retry
2026-04-25 04:57:00 +03:00
nutcas3 d846c304a4 docs: Add Go SDK README with comprehensive API documentation and implement modular architecture with authentication provider
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Add AuthProvider class with API key and JWT token support (GenerateJWTToken, ValidateJWTToken, GetHeaders, ClearTokenCache methods)
- Add HTTPClient base class with retry logic, error handling, and timeout management
- Add GraphQLAPI, PaymentsAPI, RatingPlansAPI
2026-04-25 04:56:33 +03:00
nutcas3 cfdbe92477 docs: Add Elixir SDK README with comprehensive API documentation and implement modular architecture with GenServer support
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Refactor TelecomSDK main module to use modular API clients (SubscribersAPI, UsageAPI, PaymentAPI, RatingPlanAPI, SystemAPI, GraphQLAPI)
- Add AuthProvider class with API key and JWT token support (generate_jwt_token, validate_jwt_token methods)
- Add HTTPClient base
2026-04-25 04:55:06 +03:00
nutcas3 808afbc2be feat: Add comprehensive API client modules and JWT authentication to Rust SDK
- Add hmac, sha2, and base64 dependencies to Cargo.toml for JWT support
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Add AuthProvider class with API key and JWT token support (generate_jwt_token, validate_jwt_token, get_headers, clear_token_cache methods)
- Add HTTPClient base class with retry logic, error handling, and timeout management
- Add SubscriberAPI module
2026-04-25 04:54:13 +03:00
nutcas3 f6590462f5 docs: Add Swift SDK README with comprehensive API documentation and implement authentication provider with JWT support
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Add AuthProvider class with API key and JWT token support (generateJWTToken, validateJWTToken, getHeaders, clearTokenCache methods)
- Add HTTPClient base class with retry logic, error handling, and timeout management
- Add GraphQLAPI, PaymentAPI, RatingPlanAPI, SubscriberAPI, SystemAPI, and UsageAPI modules
- Add TelecomSDK main client integrating all API
2026-04-25 04:53:22 +03:00
nutcas3 511f7be357 docs: Add Kotlin SDK README with comprehensive API documentation and implement authentication provider with JWT support
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Add AuthProvider class with API key and JWT token support (generateJWTToken, validateJWTToken, getHeaders, clearTokenCache methods)
- Add HTTPClient base class with retry logic, error handling, and timeout management
- Add GraphQLAPI, PaymentAPI, RatingPlanAPI, SubscriberAPI, System
2026-04-25 04:52:19 +03:00
nutcas3 8c4f4e17da docs: Update TypeScript SDK README with new API structure and improve authentication implementation
- Update README to reflect new modular API structure (subscribers, usage, payments, ratingPlans, system, graphql modules)
- Add Architecture section documenting SDK module organization
- Update all code examples to use new API module paths (sdk.subscribers instead of sdk.subscribersService)
- Remove deprecated methods (getSubscriberByImsi, terminateSubscriber, eSIM management, billing/invoices)
- Add GraphQL query execution examples
- Simplify usage examples to focus
2026-04-25 04:51:06 +03:00
nutcas3 fbc6acae11 feat: Add comprehensive API client modules and JWT authentication to TypeScript SDK
- Add AuthProvider class with API key and JWT token support (create_token, validate_token, refresh_token, get_headers methods)
- Add HTTPClient base class with retry logic, error handling, and timeout management
- Add SubscriberAPI module (get, list, create, update, suspend, activate, terminate methods)
- Add UsageAPI module (get_stats, list_events, get_realtime methods)
- Add PaymentAPI module (create_transaction
2026-04-25 04:03:08 +03:00
nutcas3 758bd5f075 feat: Add comprehensive API client modules and JWT authentication to Python SDK
- Add pyjwt>=2.10.0 dependency to requirements.txt
- Add AuthProvider class with API key and JWT token support (create_token, validate_token, refresh_token, get_headers methods)
- Add APIClient base class with retry logic, error handling, and async session management
- Add SubscriberAPI module (get, list, create, update, suspend, activate, terminate methods)
- Add UsageAPI module (get_stats, list_events, get_realtime methods
2026-04-25 03:56:56 +03:00
nutcas3 3b0f148265 chore: Update SDK dependencies across all language implementations
- Elixir: Update Elixir to 1.17, finch to 0.19, ex_doc to 0.37
- Kotlin: Update Kotlin to 2.1.0, kotlinx-coroutines to 1.10.1, kotlinx-serialization to 1.8.0, Ktor to 3.0.3
- Python: Update aiohttp to 3.10.0, websockets to 14.0.0, pydantic to 2.10.0, typing-extensions to 4.12.0
- Ruby: Update httparty to 0.23, websocket-client-simple to 0.4, json to 2.7, minitest to 5.25, rubocop to 1.72
- Rust: Update reqwest to 0.12, tokio-tungstenite
2026-04-25 03:53:19 +03:00
nutcas3 f90882b4b2 refactor: Extract health checks and utility modules from packet-gateway ebpf module
- Extract health check handlers to new health.rs module (health, liveness, readiness, metrics endpoints)
- Extract IP conversion utilities to new ip_utils.rs module (u32_to_ipv4_string, ipv4_string_to_u32)
- Extract Redis synchronization logic to new redis_sync.rs module (RedisSyncer with sync_packet_stats, sync_credit_info, sync_credits_from_redis, sync_blocked_from_redis, sync_batch_entry methods)
- Refactor EbpfManager
2026-04-25 03:51:23 +03:00
nutcas3 5467e22d22 feat: Add metrics endpoint to packet-gateway health check server
- Add MetricsResponse struct with status, service, timestamp, tracked_ips, total_bytes_processed, and low_credit_users fields
- Add metrics_handler function calculating tracked IPs count, total bytes processed sum, and low credit users count from EbpfManager stats
- Add GET /metrics route to health check server
- Add ebpf_manager_clone state to health check server for metrics access
2026-04-25 03:46:05 +03:00
nutcas3 d7e83c1f0d feat: Add API key authentication support to charging engine client
- Add APIKey field to ChargingEngineConfig struct
- Add apiKey field to ChargingEngineClient struct
- Add setAPIKeyHeader method to set X-API-Key header when API key is configured
- Call setAPIKeyHeader in CheckCredit, DeductCredit, AddCredit, GetBalance, and HealthCheck methods
2026-04-25 03:43:32 +03:00
nutcas3 7428ed2314 feat: Add API key authentication support to charging-engine auth middleware
- Add api_keys field to AuthConfig struct
- Parse API_KEYS environment variable as comma-separated list in from_env
- Add validate_api_key method to AuthConfig for key verification
- Add X-API-Key header check in auth_middleware before JWT validation
- Update comments to clarify development/testing mode for unauthenticated requests
2026-04-25 03:42:42 +03:00
nutcas3 919e9906e8 feat: Update Apollo Client configuration to use explicit constructors and fix context link implementation
- Replace createHttpLink with HttpLink constructor
- Replace setContext with SetContextLink constructor
- Update authLink to use prevContext parameter and spread operator for proper context merging
- Replace from with ApolloLink.from for link composition
- Remove ApolloProvider wrapper from Providers component (render children directly)
2026-04-25 03:40:28 +03:00
nutcas3 3cef1fbf03 feat: Add authentication middleware to charging-engine with public and protected route separation
- Add auth module import to main.rs
- Add AuthConfig initialization from environment in main function
- Add auth_config field to AppState struct
- Add auth_middleware layer to protected routes
- Move health check, credit check, deduct, balance, and usage recording to public routes (no auth required for packet-gateway integration)
- Move add credit, subscriber management, rating plans, monitoring, and engine
2026-04-25 03:38:14 +03:00
nutcas3 a41431c17a feat: Add jsonwebtoken dependency to charging-engine for JWT authentication support
- Add jsonwebtoken 10.3.0 dependency to Cargo.toml
2026-04-25 03:37:59 +03:00
nutcas3 c341f4462e feat: Add JWT authentication middleware and token management for charging engine
- Add Claims struct with sub and exp fields for JWT payload
- Add AuthConfig struct with secret field loaded from JWT_SECRET environment variable
- Add create_token function generating 24-hour expiration tokens
- Add validate_token function for JWT verification
- Add auth_middleware for Axum with Authorization header Bearer token validation
- Allow unauthenticated requests temporarily for packet-gateway integration
2026-04-25 03:36:52 +03:00
nutcas3 a8c6f9393f feat: Add Apollo Client integration to web-dashboard with GraphQL support
- Add @apollo/client ^4.1.9 and graphql ^16.10.0 dependencies to package.json
- Add apollo-client.ts with ApolloClient configuration, HTTP link to API server, and auth link for token-based authentication
- Add Providers component wrapping children with ApolloProvider
- Wrap Sidebar and main content with Providers in root layout
- Configure cache-and-network and network-only fetch policies for queries and mutations
2026-04-25 03:36:26 +03:00
nutcas3 201ecdf62f feat: Add auth module export to charging-engine library
- Add public auth module export to lib.rs
2026-04-25 03:33:56 +03:00
nutcas3 552d9d5e1f feat: Move charging routes to public v1 group and add health check endpoint
- Move charging routes from protected /api group to public /v1/charging group for packet-gateway integration
- Add GET /v1/health endpoint returning status ok
- Remove registerChargingRoutes function (routes now inline in registerV1Routes)
- Remove registerChargingRoutes call from apiProtected group
2026-04-25 03:33:08 +03:00
nutcas3 7aa582ee3d feat: Add charging routes and handler integration to API server
- Add chargingH field to serverDeps struct
- Add ChargingEngineClient initialization in buildDeps
- Add NewChargingHandler with chargingEngineClient dependency
- Add registerChargingRoutes function with /charging group
- Add POST /charging/credit/:ip/check endpoint
- Add GET /charging/credit/:ip/balance endpoint
- Add POST /charging/credit/:ip/add endpoint
- Add POST /charging/credit/:ip/deduct endpoint
- Call registerChargingRoutes in
2026-04-25 03:32:05 +03:00
nutcas3 6d0c0ced1b feat: Add charging handler with credit management endpoints for IP-based operations
- Add ChargingHandler struct with ChargingEngineClient dependency
- Add NewChargingHandler constructor
- Add CheckCredit endpoint to validate sufficient credit for requested bytes
- Add GetBalance endpoint to retrieve current balance for an IP
- Add AddCredit endpoint to add bytes to an IP's credit
- Add DeductCredit endpoint to deduct bytes from an IP's credit
- Add IP parameter validation and JSON request binding
2026-04-25 03:28:51 +03:00
nutcas3 fff289f957 feat: Add Prometheus metrics endpoint to carrier-connector
- Add prometheus/client_golang v1.20.5 dependency to go.mod
- Add /api/v1/metrics endpoint using promhttp.Handler() wrapped with gin.WrapH
2026-04-25 03:28:26 +03:00
nutcas3 121cb60a62 feat: Add HTTP health check endpoints with Redis and eBPF status validation for packet-gateway
- Add axum, serde, serde_json, and chrono dependencies to Cargo.toml
- Add health_port CLI argument (defaults to 8081)
- Add /health endpoint returning basic health status
- Add /health/live endpoint for liveness checks (always returns alive if service is running)
- Add /health/ready endpoint for readiness checks with Redis connectivity and eBPF attachment validation
- Add AtomicBool to track eBPF attachment status across
2026-04-25 03:25:01 +03:00
nutcas3 8e40a54d8b feat: Add liveness and readiness health check endpoints with database connectivity validation
- Add Ping method to PostgresProfileStore to check database connection status
- Add Ping method to ProfileRepository interface
- Add /api/v1/health/live endpoint for liveness checks (always returns alive if service is running)
- Add /api/v1/health/ready endpoint for readiness checks with database connectivity validation
- Add readinessHandler that returns SERVICE_UNAVAILABLE status when database ping fails
2026-04-25 03:23:01 +03:00
nutcas3 05eb31e117 feat: Add comprehensive unit tests for charging engine components
- Add credit_management_tests.rs with tests for SubscriberAccount, UsageEvent, UsageType, AccountStatus, and integer arithmetic operations
- Add error_tests.rs with tests for ChargingError Display implementation, cloning, and log_error function
- Add rating_billing_tests.rs with tests for ChargingRule variants, as_str conversion, billing period parsing, timestamp filtering, and cost calculations
- Add validation_tests.rs with tests for validate_bytes, validate
2026-04-25 03:17:21 +03:00
nutcas3 4cdecfc932 feat: Add library module exports for charging engine components
- Add public module exports for charging, errors, handlers, routes, models, and monitoring
2026-04-25 03:17:04 +03:00
nutcas3 379dc251d3 feat: Add library configuration and test dependencies to charging-engine
- Add [lib] section with charging_engine name and src/lib.rs path
- Add dev-dependencies: tokio-test 0.4, mockall 0.13, serial_test 3.2
2026-04-25 03:16:53 +03:00
nutcas3 2dd6c3304d feat: Add configurable expiration times for credit and block operations via environment variables
- Add CREDIT_EXPIRATION_SECONDS environment variable to configure credit key expiration (defaults to 86400)
- Add BLOCK_EXPIRATION_SECONDS environment variable to configure block key expiration (defaults to 86400)
- Replace hardcoded 86400 expiration values with configurable variables in add_credit and block_user
- Update block_user warning message to include expiration duration
2026-04-25 03:06:37 +03:00
nutcas3 ff33263df3 feat: Add configurable limits for bytes and amount validation via environment variables
- Add MAX_BYTES_LIMIT environment variable to configure bytes validation limit (defaults to 1TB)
- Add MAX_AMOUNT_LIMIT environment variable to configure amount validation limit (defaults to 10,000)
- Replace hardcoded 1_000_000_000_000 bytes limit with configurable max_bytes value
- Replace hardcoded 10_000.0 amount limit with configurable max_amount value
2026-04-25 03:05:40 +03:00
nutcas3 c4746970a2 feat: Add DatabaseError variant and improve error response handling
- Add DatabaseError(String) variant to ChargingError enum
- Add DatabaseError case to log_error helper with error-level logging
- Add DatabaseError Display implementation
- Refactor IntoResponse to use generic error messages instead of detailed strings
- Add detail field to error responses containing full error message via to_string()
- Change RedisConnection status code from INTERNAL_SERVER_ERROR to SERVICE_UNAVAILABLE
2026-04-25 03:04:25 +03:00
nutcas3 c9c493fd70 feat: Add ChargingRule enum with string conversion for charging decisions
- Add ChargingRule enum with 7 variants (Allowed, InsufficientCredit, DataLimitExceeded, VoiceLimitExceeded, SmsLimitExceeded, UserBlocked, Blocked)
- Add Debug, Clone, Serialize, Deserialize, PartialEq, Eq derives to ChargingRule
- Add as_str method to convert ChargingRule variants to uppercase string constants
2026-04-25 03:03:37 +03:00
nutcas3 7e47f09e54 feat: Replace RedisOperation with DatabaseError in rating_plans_repo error mapping
- Replace RedisOperation error variant with DatabaseError in new/get/list_map/add/remove methods
- Update 5 map_err calls to use DatabaseError for SQLx operation failures
2026-04-25 03:03:27 +03:00
nutcas3 69a84d85e6 feat: Improve rating_billing with integer arithmetic, overflow checks, and SCAN optimization
- Replace float division with integer arithmetic in calculate_usage_cost for data/voice conversions
- Add checked_add overflow protection for usage accumulation in apply_charging_rules and process_usage
- Replace String-based charging rules with ChargingRule enum variants
- Add Datelike import and implement billing period filtering in generate_invoice
- Replace blocking KEYS command with SCAN cursor iteration
2026-04-25 03:03:06 +03:00
nutcas3 3c5878d3cc feat: Replace unwrap_or with proper error handling in credit_management
- Replace unwrap_or(0) with map_err for get operation in deduct_credit
- Replace unwrap_or(0) with ? operator in check_credit
- Add RedisOperation error mapping for current_balance retrieval
2026-04-25 03:02:36 +03:00
nutcas3 40e9d1f221 remove comments 2026-04-25 02:52:41 +03:00