DEV Community

Martin
Martin

Posted on

Executive Summary: Modernizing a Security Operations Platform on AWS Through Three-Tier Data Delivery

Executive Summary: Modernizing a Security Operations Platform on AWS Through Three-Tier Data Delivery

SYSTEM DESIGN

  • Frontend Layer: Vue 3 provides security dashboards, asset views, vulnerability management, alert investigation, blacklist administration, and remediation workflows.

  • API Access Layer: Amazon Application Load Balancer distributes requests to Spring Boot 3.2.6 microservices running on Amazon ECS with AWS Fargate.

  • Microservices Layer: Separate services manage alerts, assets, vulnerabilities, risk analysis, blacklist information, firewall integration, reporting, and remediation workflows.

  • Scheduled Processing Layer: Amazon EventBridge Scheduler starts aggregation tasks every five minutes. Amazon ECS tasks, AWS Step Functions, or AWS Glue perform incremental aggregation and reconciliation.

  • Real-Time Streaming Layer: Security devices and application services publish events to Amazon Managed Streaming for Apache Kafka. Amazon Managed Service for Apache Flink performs filtering, deduplication, enrichment, window aggregation, and risk calculation.

  • Cache Layer: Amazon ElastiCache for Redis OSS or Valkey stores frequently requested risk summaries, alert statistics, asset views, vulnerability information, and public IP blacklist data.

  • Relational Data Layer: Amazon Aurora PostgreSQL-Compatible Edition stores assets, vulnerabilities, users, rules, workflow states, remediation records, and other transactional business information.

  • Time-Series Data Layer: Amazon Timestream for InfluxDB stores security-device measurements, operational metrics, alert trends, and time-series monitoring data.

  • Historical Data Layer: Amazon S3 stores immutable raw events, historical alerts, aggregation results, investigation evidence, and replayable security data.

  • AI Analysis Layer: Amazon Bedrock supports attack-path summaries, multidimensional risk analysis, and remediation recommendation generation. Deterministic rules remain responsible for final risk decisions and protection actions.

  • Security Layer: AWS IAM controls service permissions. AWS KMS manages encryption keys. AWS Secrets Manager protects database credentials and integration tokens. AWS WAF protects internet-facing endpoints.

  • Monitoring Layer: Amazon CloudWatch collects application logs, infrastructure metrics, API latency, cache performance, consumer lag, scheduled-job duration, and service health.

  • High-Availability Design: Application tasks, cache nodes, and databases operate across multiple Availability Zones. Cache failure triggers controlled database fallback, while stale validated results may be returned during temporary degradation.

  • Recovery Design: Kafka retains events for delayed processing, Amazon S3 preserves raw data for replay, scheduled reconciliation repairs inconsistent results, and version-controlled cache writes prevent old data from replacing newer data.

DATA FLOW

Ingestion and Streaming Layer

  • Services: Security devices, Ingestion service, Amazon MSK, Amazon S3, Amazon Managed Service for Apache Flink, Amazon Aurora PostgreSQL, Amazon Timestream for InfluxDB, Amazon ElastiCache
  1. A firewall, scanner, or domain monitor sends a security event to the ingestion service on Amazon ECS with AWS Fargate.
  2. The service validates the payload, authenticates the source, and assigns an event identifier with device, asset, and source metadata.
  3. The validated event is published to a domain topic in Amazon MSK.
  4. A copy of the raw event is stored in Amazon S3 for investigation, audit, and replay.
  5. Flink consumes the topic, removes duplicates, and groups related events by asset, device, incident, tenant, or domain.
  6. Flink enriches each event with ownership, vulnerability, exposure, business criticality, and current protection status.
  7. Rolling alert counts, severity, exposure, and attack-path risk are written to Aurora, Timestream, or S3 according to the data type.
  8. The latest read-optimized result is written to ElastiCache with a computation version, source watermark, schema version, and soft and hard expiry.

Application Layer

  • Services: Vue 3, Firewall client, AWS WAF, Application Load Balancer, Spring Boot API, Amazon ElastiCache, Amazon Aurora PostgreSQL, Amazon CloudWatch
  1. A user or firewall device sends a request through AWS WAF and the Application Load Balancer to the Spring Boot API.
  2. The API builds a canonical cache key and reads Amazon ElastiCache.
  3. A valid cached result is returned immediately to the Vue 3 dashboard or the calling device.
  4. A result past soft expiry but inside hard expiry is returned while an asynchronous refresh starts.
  5. On a miss, one request obtains a short refresh lease and queries Amazon Aurora PostgreSQL.
  6. Other requests for the same key wait, use an approved stale copy, or receive a controlled degraded response.
  7. The database result is validated and written back to ElastiCache with a new version and expiration period.
  8. Amazon CloudWatch records API latency, cache-hit ratio, cache-miss latency, and database fallback volume.

Reconciliation Layer

  • Services: Amazon EventBridge Scheduler, Reconciliation task, Amazon MSK, Amazon Aurora PostgreSQL, Amazon Timestream for InfluxDB, Amazon S3, Amazon ElastiCache, Amazon CloudWatch
  1. Every five minutes, EventBridge Scheduler starts an incremental reconciliation task.
  2. The task selects records changed since the last successful watermark instead of scanning every table.
  3. Affected asset, alert, vulnerability, blacklist, and risk summaries are recalculated.
  4. New results are written to versioned staging records in Amazon Aurora PostgreSQL.
  5. Completeness, row counts, invalid values, and consistency are checked before promotion.
  6. The new generation is promoted and the related ElastiCache keys are updated.
  7. A periodic full reconciliation compares MSK results, cache, Aurora, Timestream, and S3.
  8. Differences are regenerated without replacing the active generation, and CloudWatch records job duration and processing errors.

Details:

  1. Every five minutes, Amazon EventBridge Scheduler invokes the Spring application to start an incremental reconciliation task.
  2. The Spring application retrieves the last successful watermark from Amazon Aurora PostgreSQL and extracts only the records changed since that watermark across the data stores—consuming recent event streams from Amazon MSK, querying relational updates in Amazon Aurora PostgreSQL, fetching time-series metrics from Amazon Timestream for InfluxDB, and reading object records from Amazon S3—rather than scanning entire tables.
  3. Within the Spring application, the extracted data is aggregated to recalculate affected asset, alert, vulnerability, blacklist, and risk summaries.
  4. The Spring application transfers and writes these newly computed summaries into versioned staging tables in Amazon Aurora PostgreSQL.
  5. Before promotion, the Spring application runs validation checks on the staged records to verify completeness, row counts, valid field values, and cross-store consistency.
  6. Once validation passes, the Spring application promotes the new generation as active in Amazon Aurora PostgreSQL and pushes the updated summary entries to Amazon ElastiCache.
  7. On a separate periodic schedule, EventBridge Scheduler triggers the Spring application to execute a full reconciliation, pulling and comparing datasets across Amazon MSK, Amazon ElastiCache, Amazon Aurora PostgreSQL, Amazon Timestream for InfluxDB, and Amazon S3.
  8. If discrepancies are detected, the Spring application regenerates the differing records in staging without overwriting the active generation, while continuously emitting job duration, throughput metrics, and processing errors to Amazon CloudWatch.

Security Layer

  • Services: AWS WAF, AWS IAM, AWS KMS, AWS Secrets Manager, Amazon S3, Amazon ElastiCache, Spring Boot API, Amazon CloudWatch
  1. AWS WAF filters internet-facing requests before they reach the API.
  2. Each ECS task uses an IAM role limited to its own topics, tables, and buckets.
  3. AWS KMS encrypts Aurora, Amazon S3, Amazon MSK, ElastiCache, and backups.
  4. Database credentials and integration tokens are read from AWS Secrets Manager at runtime.
  5. Amazon S3 keeps the original event as immutable investigation evidence.
  6. Cache writes carry a computation version so an older job cannot overwrite a newer streaming result.
  7. A failed reconciliation leaves the previous valid cache generation active.
  8. CloudWatch alarms treat API latency and data freshness as separate signals.

MAIN LOGIC

  • Receive security events from trusted firewalls, scanners, monitoring systems, and application services.

  • Authenticate each source before accepting its events.

  • Validate required fields and reject malformed or unauthorized messages.

  • Assign a unique event identifier to support duplicate detection and idempotent processing.

  • Preserve the original event in Amazon S3 before or alongside downstream processing.

  • Publish accepted events to Amazon MSK so processing services remain separated from source devices.

  • Use event time rather than only processing time because security devices may buffer and send delayed events.

  • Remove duplicate events before updating alert counts or risk scores.

  • Enrich each event with asset, vulnerability, ownership, exposure, system, and business-criticality information.

  • Calculate security risk through deterministic rules and approved scoring models.

  • Use Amazon Bedrock to explain attack paths and generate remediation recommendations, but do not allow model output to directly execute high-impact firewall changes.

  • Continuously update active risk views through Amazon Managed Service for Apache Flink.

  • Reconcile results every five minutes through scheduled incremental aggregation.

  • Run periodic full reconciliation to identify missing events, incomplete relationships, and differences between real-time and transactional data.

  • Store transactional business state in Amazon Aurora PostgreSQL.

  • Store time-series measurements in Amazon Timestream for InfluxDB.

  • Store raw and historical events in Amazon S3.

  • Store read-optimized results in Amazon ElastiCache for low-latency retrieval.

  • Return a cached result immediately when it is valid.

  • Return a validated stale result while asynchronously refreshing it when the soft-expiry period has passed.

  • Query the authoritative database only when no acceptable cache value exists.

  • Allow only one request to rebuild a missing cache key.

  • Apply strict timeouts and concurrency limits to database fallback operations.

  • Open a circuit breaker when the database is unhealthy or overloaded.

  • Add small random differences to cache expiration times to prevent many keys from expiring simultaneously.

  • Use version checks so an older scheduled job or database backfill cannot overwrite a newer streaming result.

  • Keep the previous valid generation active when a scheduled aggregation fails.

  • Retain unprocessed events in Kafka when a streaming application becomes temporarily unavailable.

  • Rebuild important cache entries in priority order after cache recovery.

  • Record all automated protection commands with an idempotency key, policy decision, action owner, expiration time, and rollback instruction.

  • Verify that a firewall action was successfully applied before closing the remediation workflow.

  • Automatically expire temporary blacklist entries when their approved blocking period ends.

  • Monitor p50, p95, and p99 response latency instead of relying only on average response time.

  • Treat the sub-50-millisecond API performance as a cache-hit service objective that must be confirmed through production-like load testing.

  • Monitor data freshness separately from API latency because a fast response can still contain outdated security information.

EXAMPLE CASE: MALICIOUS PUBLIC IP DETECTION AND AUTOMATED FIREWALL RESPONSE

  1. A network security device detects repeated connection attempts from public IP address 203.0.113.25 against several externally exposed services.

  2. The device sends the alert to the security event ingestion API.

  3. The ingestion service authenticates the device and validates the event format.

  4. The service assigns a unique event identifier and records the event time, source device, destination asset, destination port, alert type, and initial severity.

  5. The validated event is published to an Amazon MSK topic for network security alerts.

  6. The original event is also written to Amazon S3 so investigators can retrieve the unmodified evidence later.

  7. Amazon Managed Service for Apache Flink consumes the alert.

  8. The Flink application checks whether the event identifier has already been processed.

  9. The application enriches the event with the destination asset's owner, business criticality, internet exposure, known vulnerabilities, and existing protection controls.

  10. The application identifies that the same public IP has targeted five assets within ten minutes.

  11. The application also identifies that two targeted assets contain high-severity vulnerabilities affecting exposed services.

  12. The rules engine increases the risk score because the source IP is targeting multiple vulnerable and business-critical assets.

  13. The platform updates the active attack record in Amazon Aurora PostgreSQL.

  14. The latest attack count, affected assets, risk score, and recommended response are written to Amazon ElastiCache.

  15. An Amazon Bedrock-supported analysis produces a concise explanation of the attack pattern and recommends temporary blocking, investigation of affected assets, and validation of exposed services.

  16. The deterministic policy engine evaluates the action separately from the AI recommendation.

  17. The policy engine confirms that the public IP is not on an enterprise allowlist, partner network list, monitoring-service list, or approved external-scanner list.

  18. The policy engine confirms that the risk score exceeds the approved automatic-blocking threshold.

  19. The platform creates a firewall protection command with an idempotency key, target device group, block duration, reason, evidence references, approval policy, and rollback instruction.

  20. The command is written to a durable command record before delivery.

  21. The firewall integration service sends the authenticated block request to the relevant firewall devices.

  22. Each firewall confirms whether the rule was successfully installed.

  23. The platform records the result for every target device.

  24. If a device does not respond, the integration service retries the same command with the original idempotency key so that duplicate rules are not created.

  25. After successful verification, the workflow status changes from risk identified to protection applied.

  26. The public IP blacklist API publishes the updated blacklist generation to Amazon ElastiCache.

  27. Other firewall devices request the latest blacklist through the platform API.

  28. The API retrieves the blacklist from Amazon ElastiCache and returns it without running a multi-table database query.

  29. If the blacklist cache key is missing, one API instance obtains the refresh lease and reads the authoritative blacklist from Amazon Aurora PostgreSQL.

  30. Other API instances do not repeat the same database query.

  31. The refreshed blacklist is written back to Amazon ElastiCache with a new generation number and expiration metadata.

  32. Five minutes later, the scheduled reconciliation process checks the attack record, blacklist state, device confirmations, and protection-command history.

  33. If the streaming result and authoritative database state agree, the new generation remains active.

  34. If a difference is detected, the scheduled process rebuilds the affected result and publishes a corrected version.

  35. Security analysts see the affected assets, attack evidence, risk explanation, firewall response, and verification status in the Vue 3 dashboard.

  36. When the approved blocking period expires, the platform reevaluates the source IP.

  37. If the threat is no longer active, the platform issues an idempotent rollback command and removes the temporary firewall rule.

  38. If malicious activity continues, the platform extends the block only when the approved policy conditions remain satisfied.

  39. Amazon CloudWatch records the event-processing delay, API response latency, cache status, firewall-command duration, retry count, and final protection outcome.

  40. The complete evidence chain remains available for investigation, audit, replay, and future rule improvement.

Top comments (0)