Security: How do you handle Server and Network Management?
### Penetration testing
Third-party penetration testing occurs periodically or after significant
changes to the infrastructure or as when it is deemed necessary. Automated
vulnerability testing is scheduled monthly on an exact replica of the deployed
cluster. In AWS-based deployments, Amazon Inspector is employed for regular
testing. This automatically assesses applications for vulnerabilities or
deviations from best practices. Amazon Inspector includes a knowledge base of
hundreds of rules mapped to common security best practices and vulnerability
definitions. Examples of built-in rules include checking for remote root login
being enabled, or vulnerable software versions installed. These rules are
regularly updated by AWS security researchers.
The setup uses a set of third-party defined Rules Packages:
- Common Vulnerabilities and Exposures: the rules in this package help verify whether the
EC2 instances in your assessment targets are exposed to common vulnerabilities
and exposures (CVEs). Attacks can exploit unpatched vulnerabilities to
compromise the confidentiality, integrity, or availability of your service or
data. The CVE system provides a reference method for publicly known
information security vulnerabilities and exposures. For more information, go
to https://cve.mitre.org/.
- Centre for Internet Security (CIS) Benchmarks: the CIS Security Benchmarks program provides well-defined, un-biased and consensus-based industry best practices. Specifically, package Amazon Linux 2015.03 (CIS Benchmark for Amazon Linux 2014.09-2015.03, v1.1.0, Level 1 Profile) is used.
### Server software updates
Servers are automatically patched nightly. To avoid disrupting system under
load, the method for patching benefits from its automatic scaling setup:
- Every 24 hours the size of the VM cluster serving the system is increased by 50%
- Cluster monitoring tools detect when the cluster is overly provisioned (e.g. based on CPU
load) and spins down a portion of the instances
- Automatic scaling is set up to spin down the oldest VM instances in the cluster
- Every new VM instance sets up full updates automatically on first launch
Recycling servers in this manner keeps all servers patched on a daily basis.
### Firewall policy
All virtual machines run inside a VPC (Virtual Private Cloud). No HAT API
endpoints are exposed directly to the outside, but only to the elastic load
balancer (ELB). ELB runs under a separate Security Group with ports 80 and 443
(HTTP and HTTPS respectively) exposed publicly. Database server ports are
standard PostgreSQL database ports (5432), however they are not exposed
publicly - only to management software inside a separate security group and
running inside the private tier of the network.
Port scanning is a violation of AWS TOS without explicit prior approval and is
automatically detected, stopped and blocked.
DDoS attack risk is mitigated through the default defence mechanisms. AWS
Shield Standard is enabled by default and provides always-on network flow
monitoring which inspects incoming traffic to AWS and uses a combination of
traffic signatures, anomaly algorithms and other analysis techniques to detect
malicious traffic in real-time. If and when the risk of DDoS attacks
increases, an advanced defence mechanism is ready to be integrated.
### Intrusion detection
Production deployments use an open sourced Host-Based Intrusion Detection
System (HIDS) OSSEC: http://ossec.github.io. HIDS is integrated with
automated alerting and logging to notify administrators of security events.
OSSEC actively monitors all aspects of Unix system activity with file
integrity monitoring, log monitoring, root check, and process monitoring.
### Virtual Machine Segregation
Building on top of AWS Xen hypervisor based virtualisation solutions and the
Virtual Private Cloud network virtualisation environment, all application
servers run inside separate Docker containers, isolating them from one
another. Multiple Docker containers may be scheduled to run on a single
Virtual Machine (VM), however VMs isolate all resources used by the
application server from other cloud tenants. VMs have no control over which
containers they host and containers can be moved from one VM to another in
response to changes in load and resource availability. VMs are never accessed
by administrative staff directly (SSH login is disabled) and are instead
orchestrated through daemon applications installed to the VMs at launch:
● Application Software container orchestration tools (AWS ECS) - all
interactions are recorded in centralised system logs
● Systems Manager if any remote shell command execution is required - disabled
by default; if enabled, all interactions are recorded and alerts generated
Database Servers (PostgreSQL) run separately, with one Database Server per VM
instance and multiple databases running on the same Database Server. Each HAT
maintains their data in a separate, isolated database instance with no data
shared across multiple databases directly.
### Recovery timescales
Recovery and scaling is virtually instantaneous in case of partial underlying
infrastructure failures, transparent to the users and done without technical
staff involvement. Using infrastructure blueprints major outages can be
recovered from within hours of the underlying infrastructure becoming
available.
Last updated: 5 years ago