Skip to content
hannctl
PDF

case-studies woori-aws-security DESIGN.md

Woori Financial Group AWS security architecture Design and implementation

Moved network separation requirements across multiple AWS accounts into subnet and firewall structure, and standardized security settings as one set of Terraform code.

DMZPrivateInternetShieldStandardCloudFront /WAFFilters webattacksALBDMZ subnetNetworkFirewallFirewall on theVPC pathVPC workloadsNo public IPOutbound: allowed targets onlyOne set of Terraform codeApplied the same way across multiple AWS accounts
One set of Terraform code applies this design the same way across multiple AWS accounts.
GuardDutySecurity HubWAFNetwork FirewallShieldSplunk SIEMOne place to analyze logsSOAR responseResponse by runbook
Splunk-based SOAR connects detection to the response process.
AccountAccountAccountDifferent policy per personOne set of Terraform codeNetwork Firewall · WAF · ShieldSame code, same standard in every account
As accounts grow, the same standard repeats through code.

What this code does: Takes the target ranges to check and the CIDRs of the firewall rules, and returns only the ranges that no rule covers. It applies the rules one by one: a range that fits entirely inside a rule is dropped, a range that a rule covers only in part keeps just the uncovered remainder, and malformed CIDRs are skipped. An empty result means the requested traffic is already open, and anything left is exactly the range that still needs opening, so the decision needs no duplicate rules.

def uncovered_networks(
    targets: Iterable[ipaddress.IPv4Network], rule_cidrs: Iterable[str]
) -> list[ipaddress.IPv4Network]:
    """The parts of the targets that no rule reaches."""
    remaining = list(targets)
    for cidr in rule_cidrs:
        try:
            rule = ipaddress.IPv4Network(cidr, strict=False)
        except ValueError:
            continue
        next_round: list[ipaddress.IPv4Network] = []
        for network in remaining:
            if network.subnet_of(rule):
                continue
            if rule.subnet_of(network):
                next_round.extend(network.address_exclude(rule))
            else:
                next_round.append(network)
        remaining = next_round
    return remaining
© 2026 Kim JunHyun · Built with Astro · The infrastructure behind this site is code too

↑↓ move · Enter open · Esc close

Choose a theme

Click a badge to switch to that theme on the same content. Dragging only swings it.

Back to the front page →