GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — aws-compliance-baseline-terraform/controls/controls.yaml at main · jmragsdale/aws-compliance-baseline-terraform Expand file tree/ Copy pathcontrols.yamlMore file actions 1441 lines (1361 loc) · 50.9 KB / Copy pathcontrols.yamlFile metadata and controls1441 lines (1361 loc) · 50.9 KB 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 # Machine-readable source of truth for CONTROLS.md. # # Rules of engagement for editing this file: # 1. Every control names Terraform addresses that exist. CI fails otherwise. # 2. Framework mappings are the controls the implementation *materially* # contributes to, not every control it could be argued to touch. Padding # this file is the easiest way to make the whole repo untrustworthy. # 3. `notes` is where limitations go. If a control only works in organization # mode, only covers part of the framework control, or depends on something # outside Terraform, say so there. # # Regenerate: python3 controls/render.py # Verify: python3 controls/render.py --check metadata: cloud: aws cloud_name: "Amazon Web Services" frameworks: fedramp: name: "FedRAMP Rev 5" version: "Rev 5 (Moderate / High)" short: "FedRAMP" nist_800_53_r5: name: "NIST SP 800-53 Rev 5" version: "Rev 5" short: "800-53r5" cis: name: "CIS AWS Foundations Benchmark" version: "v5.0" short: "CIS v5.0" framework_notes: - >- FedRAMP Rev 5 control identifiers *are* NIST SP 800-53 Rev 5 identifiers - FedRAMP is a baseline selection plus parameter values, not a separate catalogue. The two columns therefore overlap heavily by construction. They are kept separate because the FedRAMP column reflects controls whose *parameters* this repo actually sets from `var.fedramp_baseline`, while the 800-53 column reflects the base control the implementation addresses. - >- CIS AWS Foundations Benchmark v5.0 section numbers are used verbatim. Where a control is implemented preventively here but the benchmark checks it detectively (or vice versa), the mapping still applies - the benchmark does not care how you got there. - >- No control in this file claims coverage of an administrative or procedural family. AT (awareness and training), PS (personnel security), PE (physical protection) and most of PL/PM have no Terraform representation and are absent on purpose rather than by oversight. - >- Controls marked `demo_safe: false` require an AWS Organizations management account or a delegated administrator. They plan cleanly in `examples/single-account` because they are count-gated off, which means that example is a *smaller* posture, not the same posture more cheaply. controls: # ======================================================================= # ORG - Organization-level preventive guardrails # ======================================================================= - id: ORG-001 title: "Root account usage denied organization-wide" module: preventive enforcement: preventive frameworks: fedramp: [AC-6(9), IA-2(1), AC-2] nist_800_53_r5: [AC-6(9), AC-2] cis: ["1.7"] implementation: - preventive:aws_organizations_policy.identity_guardrails - preventive:aws_organizations_policy_attachment.scp demo_safe: false billable: false notes: >- Denies every action for the Root principal type. The root user can still perform the handful of operations AWS exempts from SCPs entirely (closing the account, changing the root password, changing the support plan), which is why CIS also requires hardware MFA on root - a control no Terraform resource can create. - id: ORG-002 title: "Disabling CloudTrail, Config, GuardDuty, Security Hub, Macie, Inspector or Access Analyzer denied" module: preventive enforcement: preventive frameworks: fedramp: [AU-9, SI-4, CM-7] nist_800_53_r5: [AU-9, SI-4, CM-7] cis: ["3.1", "3.5"] implementation: - preventive:aws_organizations_policy.audit_guardrails - preventive:aws_organizations_policy_attachment.scp demo_safe: false billable: false notes: >- Exempts the break-glass roles named in `var.break_glass_role_names`. That exemption is deliberate and is itself a monitored path - see LOG-010, which alarms on CloudTrail and Config configuration changes regardless of who made them. - id: ORG-003 title: "Leaving or dismantling the organization denied" module: preventive enforcement: preventive frameworks: fedramp: [AC-3, CM-7] nist_800_53_r5: [AC-3, CM-7] cis: [] implementation: - preventive:aws_organizations_policy.audit_guardrails demo_safe: false billable: false notes: >- This is the guardrail every other SCP depends on. A member account that can call LeaveOrganization sheds all of them in one API call. - id: ORG-004 title: "Central log archive protected from deletion and policy change by SCP" module: preventive enforcement: preventive frameworks: fedramp: [AU-9, AU-11] nist_800_53_r5: [AU-9, AU-11] cis: ["3.3"] implementation: - preventive:aws_organizations_policy.audit_guardrails - logging:data.aws_iam_policy_document.log_archive - logging:aws_s3_bucket_policy.log_archive demo_safe: false billable: false notes: >- Two independent layers (SCP and bucket policy) plus Object Lock. The statement is omitted entirely when `enable_central_logging` is false, because an SCP naming a non-existent bucket is confusing rather than safe. - id: ORG-005 title: "Deleting audit alarms, metric filters or log groups denied" module: preventive enforcement: preventive frameworks: fedramp: [AU-9, SI-7, AU-6] nist_800_53_r5: [AU-9, SI-7] cis: [] implementation: - preventive:aws_organizations_policy.audit_guardrails demo_safe: false billable: false - id: ORG-006 title: "Operations confined to the assessed regions" module: preventive enforcement: preventive frameworks: fedramp: [CA-9, SC-7, AC-3] nist_800_53_r5: [CA-9, SC-7] cis: [] implementation: - preventive:aws_organizations_policy.region_guardrails - preventive:aws_organizations_policy_attachment.scp demo_safe: false billable: false notes: >- The `NotAction` list carries the global endpoints (IAM, STS, CloudFront, Route 53, Organizations and friends) which are always evaluated in us-east-1. Omitting any of them breaks the organization in ways that are slow to diagnose. Verify the list against current AWS documentation before attaching at the root. - id: ORG-007 title: "EC2 instances must require IMDSv2" module: preventive enforcement: preventive frameworks: fedramp: [CM-6, CM-7, AC-6] nist_800_53_r5: [CM-6, CM-7] cis: ["5.6"] implementation: - preventive:aws_organizations_policy.compute_guardrails demo_safe: false billable: false notes: >- Closes the SSRF-to-credential-theft path. Also denies ModifyInstanceMetadataOptions so the setting cannot be weakened after launch. - id: ORG-008 title: "IMDS hop limit above 1 denied" module: preventive enforcement: preventive frameworks: fedramp: [CM-7, AC-6] nist_800_53_r5: [CM-7] cis: [] implementation: - preventive:aws_organizations_policy.compute_guardrails demo_safe: false billable: false notes: >- A hop limit above 1 lets containers on the host reach instance metadata, which defeats most of IMDSv2's benefit. Note this will break some container runtimes that legitimately need a hop limit of 2 - test before attaching at the root. - id: ORG-009 title: "Resource control policy: organization data perimeter" module: preventive enforcement: preventive frameworks: fedramp: [SC-7, AC-4, AC-21] nist_800_53_r5: [SC-7, AC-4, AC-21] cis: [] implementation: - preventive:aws_organizations_policy.rcp_data_perimeter - preventive:aws_organizations_policy_attachment.rcp demo_safe: false billable: false notes: >- RCPs apply only to S3, STS, KMS, SQS and Secrets Manager. Resources of any other type are not covered, and describing this as a total perimeter would be wrong. - id: ORG-010 title: "Resource control policy: confused-deputy and plaintext transport denial" module: preventive enforcement: preventive frameworks: fedramp: [SC-7, SC-8, AC-4] nist_800_53_r5: [SC-7, SC-8] cis: ["2.1.2"] implementation: - preventive:aws_organizations_policy.rcp_confused_deputy - preventive:aws_organizations_policy_attachment.rcp demo_safe: false billable: false - id: ORG-011 title: "Guardrails attached to OU or root targets within the Organizations quota" module: preventive enforcement: foundational frameworks: fedramp: [CM-7, AC-3] nist_800_53_r5: [CM-7] cis: [] implementation: - preventive:aws_organizations_policy_attachment.scp - preventive:aws_organizations_policy_attachment.rcp demo_safe: false billable: false notes: >- AWS allows at most five policies of each type per target. The statements are therefore bundled into five themed SCPs rather than one policy per rule; a `check` block fails the plan if that ceiling is ever exceeded, and policies/guardrails.rego asserts the same thing against the plan JSON. - id: ORG-012 title: "Deployment scope gating so organization-only controls plan cleanly in a single account" module: root enforcement: foundational frameworks: fedramp: [CM-2, SA-3] nist_800_53_r5: [CM-2] cis: [] implementation: - root:module.preventive - root:module.detective demo_safe: true billable: false notes: >- `var.deployment_scope = "single_account"` count-gates every Organizations API call. The result is a genuinely smaller posture, not the same posture run cheaply - see examples/single-account/README.md for exactly what is lost. # ======================================================================= # IAM - Identity and access # ======================================================================= - id: IAM-001 title: "IAM user access key and login profile creation denied" module: preventive enforcement: preventive frameworks: fedramp: [IA-5(1), AC-2, IA-2] nist_800_53_r5: [IA-5(1), AC-2] cis: ["1.4", "1.14"] implementation: - preventive:aws_organizations_policy.identity_guardrails demo_safe: false billable: false notes: >- Pushes all human and workload access onto roles and Identity Center. Does not remove access keys that already exist; use the credential report from scripts/export-evidence.sh to find those. - id: IAM-002 title: "MFA required for privileged identity and key operations" module: preventive enforcement: preventive frameworks: fedramp: [IA-2(1), IA-2(2), AC-6(9)] nist_800_53_r5: [IA-2(1), IA-2(2)] cis: ["1.10"] implementation: - preventive:aws_organizations_policy.identity_guardrails demo_safe: false billable: false notes: >- Covers deleting principals, removing permissions boundaries and disabling or scheduling deletion of KMS keys. It does not enforce MFA on every console login - that lives in Identity Center or in the IdP, neither of which this repo configures. - id: IAM-003 title: "IAM account password policy at baseline-selected strength" module: preventive enforcement: preventive frameworks: fedramp: [IA-5(1), IA-5] nist_800_53_r5: [IA-5(1)] cis: ["1.8", "1.9"] implementation: - preventive:aws_iam_account_password_policy.this demo_safe: true billable: false notes: >- 14 characters and 90-day maximum age at Moderate, 20 characters and 60 days at High. Applies only to IAM users with console passwords, which the identity guardrail (IAM-001) is trying to eliminate entirely - this is the belt to that suspenders. - id: IAM-004 title: "External access analysis across the organization" module: detective enforcement: detective frameworks: fedramp: [AC-3, AC-21, CA-7] nist_800_53_r5: [AC-3, AC-21] cis: ["1.20"] implementation: - detective:aws_accessanalyzer_analyzer.external demo_safe: true billable: true notes: >- Uses automated reasoning rather than heuristics, so a "no external access" result is a proof over the resource policies rather than a scan that found nothing. Falls back to ACCOUNT scope in single-account mode. - id: IAM-005 title: "Unused access, roles and credentials analysis" module: detective enforcement: detective frameworks: fedramp: [AC-6(7), AC-2(3), AC-6] nist_800_53_r5: [AC-6(7), AC-2(3)] cis: ["1.12"] implementation: - detective:aws_accessanalyzer_analyzer.unused demo_safe: true billable: true notes: >- Metered per IAM role and user analysed per month, which makes it the one Access Analyzer feature with a real bill attached. Threshold is 90 days at Moderate, 45 at High. - id: IAM-006 title: "Service roles scoped to a single delivery path" module: detective enforcement: foundational frameworks: fedramp: [AC-6, CM-7] nist_800_53_r5: [AC-6, CM-7] cis: ["1.16"] implementation: - detective:aws_iam_role.config - detective:aws_iam_role_policy.config_delivery - detective:data.aws_iam_policy_document.config_delivery demo_safe: true billable: false notes: >- The Config recorder uses the AWS-managed read-only policy plus an inline policy limited to one bucket prefix, rather than a second managed policy with a broad write surface. - id: IAM-007 title: "CloudTrail-to-CloudWatch role limited to one log group" module: logging enforcement: foundational frameworks: fedramp: [AC-6, AU-9] nist_800_53_r5: [AC-6, AU-9] cis: [] implementation: - logging:aws_iam_role.cloudtrail_cwl - logging:aws_iam_role_policy.cloudtrail_cwl - logging:data.aws_iam_policy_document.cloudtrail_cwl_assume demo_safe: true billable: false - id: IAM-008 title: "Replication role limited to the archive source and replica" module: logging enforcement: foundational frameworks: fedramp: [AC-6, CP-9] nist_800_53_r5: [AC-6] cis: [] implementation: - logging:aws_iam_role.replication - logging:aws_iam_role_policy.replication - logging:data.aws_iam_policy_document.replication demo_safe: false billable: false notes: "Only created when the FedRAMP High baseline turns replication on." # ======================================================================= # DAT - Data protection # ======================================================================= - id: DAT-001 title: "Unencrypted S3 PUT denied (aws:kms required at High)" module: preventive enforcement: preventive frameworks: fedramp: [SC-28, SC-28(1)] nist_800_53_r5: [SC-28, SC-28(1)] cis: ["2.1.1"] implementation: - preventive:aws_organizations_policy.data_guardrails demo_safe: false billable: false notes: >- The condition changes with the baseline: Moderate rejects PUTs with no server-side encryption at all, High rejects anything that is not aws:kms. Switching to High without also enabling customer-managed keys will start denying legitimate writes - the root module has a `check` block for this. - id: DAT-002 title: "Unencrypted EBS volume, snapshot and snapshot-copy creation denied" module: preventive enforcement: preventive frameworks: fedramp: [SC-28] nist_800_53_r5: [SC-28] cis: ["2.2.1"] implementation: - preventive:aws_organizations_policy.data_guardrails demo_safe: false billable: false - id: DAT-003 title: "Public S3 ACL grants and public bucket policies denied" module: preventive enforcement: preventive frameworks: fedramp: [AC-3, AC-21, SC-7] nist_800_53_r5: [AC-3, AC-21] cis: ["2.1.4"] implementation: - preventive:aws_organizations_policy.data_guardrails demo_safe: false billable: false - id: DAT-004 title: "Account-level S3 Block Public Access, all four settings" module: preventive enforcement: preventive frameworks: fedramp: [AC-3, AC-21] nist_800_53_r5: [AC-3] cis: ["2.1.4"] implementation: - preventive:aws_s3_account_public_access_block.this demo_safe: true billable: false notes: >- Overrides every bucket-level setting in the account, including buckets created by modules nobody reviewed. Paired with DAT-003, which denies turning it off. - id: DAT-005 title: "EBS encryption by default, pointed at a customer-managed key" module: preventive enforcement: preventive frameworks: fedramp: [SC-28, SC-12] nist_800_53_r5: [SC-28, SC-12] cis: ["2.2.1"] implementation: - preventive:aws_ebs_encryption_by_default.this - preventive:aws_ebs_default_kms_key.this demo_safe: true billable: true notes: >- Account and region scoped, so it must be applied in every region the organization operates in - the region allow-list (ORG-006) is what keeps that list short. The CMK is only set when `enable_customer_managed_keys` is true; otherwise the AWS-managed aws/ebs key remains. - id: DAT-006 title: "Disabling EBS encryption-by-default denied" module: preventive enforcement: preventive frameworks: fedramp: [SC-12, SC-28, CM-7] nist_800_53_r5: [SC-12, CM-7] cis: [] implementation: - preventive:aws_organizations_policy.data_guardrails demo_safe: false billable: false notes: "Closes the 'disable the default, then create the volume' bypass of DAT-002." - id: DAT-007 title: "Sensitive data discovery in S3" module: detective enforcement: detective frameworks: fedramp: [RA-2, MP-4, SC-28] nist_800_53_r5: [RA-2, MP-4] cis: [] implementation: - detective:aws_macie2_account.this - detective:aws_macie2_organization_admin_account.this demo_safe: true billable: true notes: >- Answers "where does controlled unclassified information actually live", which the data flow diagram in an SSP asserts and rarely proves. Metered per GB inspected; off by default for that reason. - id: DAT-008 title: "Block Public Access and ownership controls on every bucket this repo creates" module: logging enforcement: preventive frameworks: fedramp: [AC-3, AC-21] nist_800_53_r5: [AC-3] cis: ["2.1.4"] implementation: - logging:aws_s3_bucket_public_access_block.log_archive - logging:aws_s3_bucket_public_access_block.access_logs - logging:aws_s3_bucket_ownership_controls.log_archive - evidence:aws_s3_bucket_public_access_block.evidence - evidence:aws_s3_bucket_ownership_controls.evidence demo_safe: true billable: false notes: >- BucketOwnerEnforced disables ACLs entirely, which turns "no public ACL" from a thing to keep checking into a structural property. # ======================================================================= # ENC - Encryption and key management # ======================================================================= - id: ENC-001 title: "Dedicated audit-log CMK with baseline-driven rotation" module: encryption enforcement: foundational frameworks: fedramp: [SC-12, SC-12(1), SC-28, AU-9] nist_800_53_r5: [SC-12, SC-12(1), SC-28] cis: ["3.7"] implementation: - encryption:aws_kms_key.logs - encryption:aws_kms_alias.logs demo_safe: true billable: true notes: "Rotation every 365 days at Moderate, every 90 at High." - id: ENC-002 title: "Dedicated compliance-evidence CMK" module: encryption enforcement: foundational frameworks: fedramp: [SC-12, SC-28, AU-9] nist_800_53_r5: [SC-12, SC-28] cis: ["3.7"] implementation: - encryption:aws_kms_key.evidence - encryption:aws_kms_alias.evidence demo_safe: true billable: true - id: ENC-003 title: "Dedicated general workload CMK for EBS, RDS, Secrets Manager and SSM" module: encryption enforcement: foundational frameworks: fedramp: [SC-12, SC-28] nist_800_53_r5: [SC-12, SC-28] cis: ["3.7"] implementation: - encryption:aws_kms_key.general - encryption:aws_kms_alias.general demo_safe: true billable: true - id: ENC-004 title: "Least-privilege key policies with an organization perimeter" module: encryption enforcement: preventive frameworks: fedramp: [AC-6, SC-12, SC-7] nist_800_53_r5: [AC-6, SC-12] cis: [] implementation: - encryption:data.aws_iam_policy_document.logs - encryption:data.aws_iam_policy_document.evidence - encryption:data.aws_iam_policy_document.general demo_safe: true billable: false notes: >- Service principal grants carry aws:SourceArn or aws:SourceAccount conditions so another account's CloudTrail cannot use our key. The general key additionally denies all use by principals outside the organization. - id: ENC-005 title: "Multi-Region replica key so replicated audit records stay decryptable" module: encryption enforcement: foundational frameworks: fedramp: [CP-9, CP-10, SC-12] nist_800_53_r5: [CP-9, SC-12] cis: [] implementation: - encryption:aws_kms_replica_key.logs - encryption:aws_kms_alias.logs_replica demo_safe: false billable: true notes: >- Only created at the High baseline. A cross-region replica of KMS-encrypted objects without a replica key is a copy nobody can read, which is a surprisingly common way to fail a recovery test. - id: ENC-006 title: "Default encryption on the log archive and evidence buckets" module: logging enforcement: preventive frameworks: fedramp: [SC-28, SC-28(1)] nist_800_53_r5: [SC-28] cis: ["2.1.1", "3.4"] implementation: - logging:aws_s3_bucket_server_side_encryption_configuration.log_archive - evidence:aws_s3_bucket_server_side_encryption_configuration.evidence demo_safe: true billable: false notes: >- Falls back to SSE-S3 when `enable_customer_managed_keys` is false. The CIS 3.4 check for a CMK-encrypted trail only passes with CMKs on. Bucket keys are enabled to keep KMS request charges sane on log workloads. - id: ENC-007 title: "TLS required for every bucket, topic and queue" module: logging enforcement: preventive frameworks: fedramp: [SC-8, SC-8(1), SC-13] nist_800_53_r5: [SC-8, SC-8(1)] cis: ["2.1.2"] implementation: - logging:data.aws_iam_policy_document.log_archive - logging:data.aws_iam_policy_document.access_logs - logging:data.aws_iam_policy_document.security_alarms - evidence:data.aws_iam_policy_document.evidence - evidence:data.aws_iam_policy_document.findings_dlq demo_safe: true billable: false notes: >- The archive additionally denies TLS below 1.2 via s3:TlsVersion, which is the FedRAMP floor and is not covered by aws:SecureTransport alone. - id: ENC-008 title: "Alarm notifications encrypted at rest" module: logging enforcement: preventive frameworks: fedramp: [SC-28] nist_800_53_r5: [SC-28] cis: [] implementation: - logging:aws_sns_topic.security_alarms demo_safe: true billable: false notes: >- Alarm bodies quote the offending principal and API call, which is exactly the reconnaissance an attacker would like. Falls back to the AWS-managed alias/aws/sns key when no CMK exists. - id: ENC-009 title: "Evidence pipeline encrypted in the buffer and in the queue" module: evidence enforcement: preventive frameworks: fedramp: [SC-28, SC-8] nist_800_53_r5: [SC-28] cis: [] implementation: - evidence:aws_kinesis_firehose_delivery_stream.findings - evidence:aws_sqs_queue.findings_dlq demo_safe: true billable: true notes: "Findings sit in the Firehose buffer for up to five minutes before landing." # ======================================================================= # LOG - Audit logging # ======================================================================= - id: LOG-001 title: "Organization CloudTrail covering all regions and global services" module: logging enforcement: foundational frameworks: fedramp: [AU-2, AU-3, AU-12] nist_800_53_r5: [AU-2, AU-3, AU-12] cis: ["3.1"] implementation: - logging:aws_cloudtrail.org demo_safe: true billable: true notes: >- Organization trails cannot be stopped or reconfigured by member accounts, which is what makes AU-9 real rather than aspirational. In single-account mode this becomes an ordinary account trail and a sufficiently privileged local principal can turn it off. - id: LOG-002 title: "CloudTrail log file validation (digest files)" module: logging enforcement: foundational frameworks: fedramp: [AU-9(3), SI-7, AU-10] nist_800_53_r5: [AU-9(3), SI-7] cis: ["3.2"] implementation: - logging:aws_cloudtrail.org demo_safe: true billable: false notes: >- Hourly SHA-256 digest files. This is the difference between "we have logs" and "we can prove these are the logs", which is the question an assessor actually asks. - id: LOG-003 title: "S3 object-level and Lambda invoke data events" module: logging enforcement: detective frameworks: fedramp: [AU-2, AU-12] nist_800_53_r5: [AU-2, AU-12] cis: ["3.8"] implementation: - logging:aws_cloudtrail.org demo_safe: true billable: true notes: >- Off by default and genuinely expensive on busy accounts. The selector excludes the archive bucket's own delivery writes, which would otherwise generate a self-referential feedback loop. - id: LOG-004 title: "Central log archive with Object Lock in COMPLIANCE mode" module: logging enforcement: foundational frameworks: fedramp: [AU-9, AU-9(3), AU-11] nist_800_53_r5: [AU-9, AU-11] cis: ["3.3"] implementation: - logging:aws_s3_bucket.log_archive - logging:aws_s3_bucket_object_lock_configuration.log_archive demo_safe: true billable: true notes: >- COMPLIANCE mode cannot be shortened or bypassed by anyone including the account root and AWS Support. That is the point, and it is also why the bucket policy blocks `terraform destroy` of this bucket. Break-glass is an AWS Support case, not a Terraform flag. 365-day window at Moderate, 2555-day at High. - id: LOG-005 title: "Versioning on every audit and evidence bucket" module: logging enforcement: foundational frameworks: fedramp: [AU-9, CP-9, SI-7] nist_800_53_r5: [AU-9, CP-9] cis: [] implementation: - logging:aws_s3_bucket_versioning.log_archive - logging:aws_s3_bucket_versioning.access_logs - evidence:aws_s3_bucket_versioning.evidence demo_safe: true billable: true notes: "Prerequisite for both Object Lock and replication; neither works without it." - id: LOG-006 title: "Lifecycle tiering aligned to the retention window" module: logging enforcement: foundational frameworks: fedramp: [AU-11, AU-4] nist_800_53_r5: [AU-11, AU-4] cis: [] implementation: - logging:aws_s3_bucket_lifecycle_configuration.log_archive - logging:aws_s3_bucket_lifecycle_configuration.access_logs demo_safe: true billable: false notes: >- Expiration is deliberately set one day beyond the Object Lock window; set it earlier and S3 refuses every delete, generating noise and no savings. - id: LOG-007 title: "S3 server access logging on the archive" module: logging enforcement: detective frameworks: fedramp: [AU-2, AU-9(4)] nist_800_53_r5: [AU-2, AU-9(4)] cis: ["3.6"] implementation: - logging:aws_s3_bucket.access_logs - logging:aws_s3_bucket_logging.log_archive - logging:aws_s3_bucket_policy.access_logs demo_safe: true billable: true notes: >- Without this, a principal who can read the audit archive leaves no trace of having done so. The access-log bucket has no Object Lock, because S3 will not deliver access logs into a bucket with a default retention period. - id: LOG-008 title: "Cross-region replication of audit records with a 15-minute SLA" module: logging enforcement: foundational frameworks: fedramp: [CP-9, CP-9(1), CP-10] nist_800_53_r5: [CP-9, CP-10] cis: [] implementation: - logging:aws_s3_bucket_replication_configuration.log_archive - logging:aws_s3_bucket.log_archive_replica - logging:aws_s3_bucket_object_lock_configuration.log_archive_replica - logging:aws_s3_bucket_lifecycle_configuration.log_archive_replica demo_safe: false billable: true notes: >- High baseline only. Delete-marker replication is deliberately disabled so a deletion in the primary cannot hide the object in the replica. The replica carries its own Object Lock, because replication copies objects and not bucket-level protections. - id: LOG-009 title: "CloudWatch Logs retention for trail events" module: logging enforcement: foundational frameworks: fedramp: [AU-11, AU-6(1)] nist_800_53_r5: [AU-11, AU-6(1)] cis: [] implementation: - logging:aws_cloudwatch_log_group.cloudtrail demo_safe: true billable: true notes: "365 days at Moderate, 1827 at High. Encrypted with the logs CMK when enabled." - id: LOG-010 title: "Fifteen CIS metric filters and alarms on the trail log group" module: logging enforcement: detective frameworks: fedramp: [AU-6, AU-6(1), SI-4(4), AC-7] nist_800_53_r5: [AU-6, AU-6(1), SI-4(4)] cis: ["4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", "4.10", "4.11", "4.12", "4.13", "4.14", "4.15"] implementation: - logging:aws_cloudwatch_log_metric_filter.cis - logging:aws_cloudwatch_metric_alarm.cis demo_safe: true billable: true notes: >- All fifteen of CIS section 4, generated from one table so none can quietly go missing. Each carries a default_value of 0 so a quiet period produces a real datapoint instead of INSUFFICIENT_DATA, which on a dashboard looks identical to "working fine". - id: LOG-011 title: "Alarm on the audit trail itself failing" module: logging enforcement: detective frameworks: fedramp: [AU-5, AU-5(1), SI-4] nist_800_53_r5: [AU-5, AU-5(1)] cis: [] implementation: - logging:aws_cloudwatch_metric_alarm.trail_delivery_failure demo_safe: true billable: true notes: >- Watches for the *absence* of log delivery, because a trail that stops is silent by construction. treat_missing_data is set to breaching for the same reason. - id: LOG-012 title: "Single SNS topic for every security alarm, with an optional subscription" module: logging enforcement: detective frameworks: fedramp: [IR-4, IR-5, AU-6, SI-4] nist_800_53_r5: [IR-4, IR-5, AU-6] cis: ["4.16"] implementation: - logging:aws_sns_topic.security_alarms - logging:aws_sns_topic_policy.security_alarms - logging:aws_sns_topic_subscription.security_contact demo_safe: true billable: false notes: >- Email subscriptions still need the confirmation click; Terraform cannot complete that and the subscription sits in PendingConfirmation until someone does. An unconfirmed subscription means the alarms fire into nothing. - id: LOG-013 title: "Bucket policy denying archive tampering and non-organization access" module: logging enforcement: preventive frameworks: fedramp: [AU-9, SC-7, AC-3] nist_800_53_r5: [AU-9, SC-7] cis: [] implementation: - logging:aws_s3_bucket_policy.log_archive - logging:data.aws_iam_policy_document.log_archive demo_safe: true billable: false notes: >- Denies DeleteBucket, DeleteBucketPolicy, PutBucketVersioning, PutEncryptionConfiguration and PutBucketObjectLockConfiguration for every principal, with no exemption. This is intentionally stronger than the SCP and intentionally blocks `terraform destroy`. # ======================================================================= # DET - Detective controls # ======================================================================= - id: DET-001 title: "Security Hub enabled with per-standard control findings" module: detective enforcement: detective frameworks: fedramp: [CA-7, RA-5, SI-4] nist_800_53_r5: [CA-7, RA-5] cis: ["4.16"] implementation: - detective:aws_securityhub_account.this demo_safe: true billable: true notes: >- control_finding_generator is STANDARD_CONTROL so a resource failing three standards produces three pieces of evidence rather than one ambiguous one. Security Hub makes nothing compliant; it continuously reports which published checks you currently fail. - id: DET-002 title: "CIS AWS Foundations Benchmark v5.0 standard subscription" module: detective enforcement: detective frameworks: fedramp: [CA-7, CM-6] nist_800_53_r5: [CA-7, CM-6] cis: ["1.1", "2.1.1", "3.1", "4.1", "5.1"] implementation: - detective:aws_securityhub_standards_subscription.cis demo_safe: true billable: true notes: >- The standards ARN is version-pinned. AWS publishes new benchmark versions without deprecating the old, and an unpinned subscription silently changes which checks you are measured against between applies. - id: DET-003 title: "NIST SP 800-53 Rev 5 standard subscription" module: detective enforcement: detective frameworks: fedramp: [CA-7, CA-2, RA-5] nist_800_53_r5: [CA-7, CA-2] cis: [] implementation: - detective:aws_securityhub_standards_subscription.nist demo_safe: true billable: true notes: >- Roughly 240 automated checks tagged with 800-53 control identifiers, which is what makes a Security Hub export usable as evidence against a control set rather than as a security score. - id: DET-004 title: "AWS Foundational Security Best Practices standard subscription" module: detective enforcement: detective frameworks: fedramp: [CA-7, SI-2] nist_800_53_r5: [CA-7, SI-2] cis: [] |
| You are visitor 01402860 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |