| new file mode 100644 |
| index 000000000..508beaf85 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-stats-prune-400.tsv |
| @@ -0,0 +1,15 @@ |
| +# Census overlay stats-prune-400, written by census-propose (#369). census-ruling-stats-prune-400, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stats-prune-400.md. |
| +# 3 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 4d07b6e09a2c6d6a23a876ba21fea39cde0cf9e533003a2d78a3148b205ab484 infra/modules/region-host/main.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's module with one optional aws_iam_role_policy, host_console_mail, count 0 unless console_mail_from is set; it grants the host role ses:SendEmail on the one sending identity, the carlos-bab configuration set and its tenants, conditioned on ses:FromAddress equal to console_mail_from; no read is added and nothing on a box reads the file;rev3=census-ruling-sec-host-imdsv2-module;basis=aws_instance.host gains metadata_options (IMDSv2 required, hop limit 1, endpoint enabled), matching scanner-host; tofu configuration only, run on an operator's machine; no read, file or record write is added; applies in place on a running instance with no restart;rev3=census-ruling-hunt-account-root-hardening;basis=adds aws_iam_role_policy host_release_key_deny (count from deny_release_key_reads, default true): an explicit Deny on ssm:GetParameter, GetParameters and GetParameterHistory for parameter/carlos/release-key, and on GetParametersByPath for its ancestor paths; tofu only, run on an operator's machine; no read is added and nothing on a box reads the file;rev3=census-ruling-region-host-store-deny;basis=host_store policy: the explicit Deny on the deployment's own buckets drops s3:DeleteObject and keeps s3:DeleteBucket and s3:CreateBucket (lease release, retention and prune are DeleteObject); tofu only, run on an operator machine; no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Select default fixed resources through counted addresses and explicit moves; group mode selects scoped bucket/SSM policy, partition-aware ARNs and refuses fixed-only settings. Operator Terraform controls the instance role that can read boot parameters and write runtime bucket objects; release-key Deny and fixed-mode policy remain.;rev3=census-ruling-region-ha-g3-fixes;basis=Enable the fixed-host memory alarm with either alert input and use the selected topic for alarm and recovery notifications. Preserve module topic/subscription creation for alerts_email only. No new root runtime read or box authority.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: aws_iam_policy.store_user_boundary is now counted when store_bucket_prefix is set or managed_fleets_enabled is true; its statements are concat of the unchanged object-storage pair (only with a store prefix, moved into local.store_boundary_statements byte for byte) and local.managed_boundary_statements (only with managed fleets: the fleet-data Allows on <managed_fleet_bucket_prefix>* buckets); name unchanged, description conditional on store prefix with lifecycle ignore_changes on description so a later feature switch never replaces the policy; tofu only, run on an operator's machine with the operator's AWS credentials; no box unit, user_data or binary reads the file; no read is added; default (both features off) plans no change;rev3=census-ruling-fixedbox-health-alarms;basis=Fixed host EC2 status-check alarms: auto-recover gains SNS alarm/ok actions (ec2:recover kept); new host_instance_check alarm (StatusCheckFailed_Instance 3 of 3 x 60 s -> ec2:reboot + SNS). tofu only, run on an operator machine; no read is added and nothing on a box reads the file.;rev3=census-ruling-fixed-host-ignore-user-data;basis=aws_instance.host lifecycle ignore_changes gains user_data (was [ami]): a user_data edit no longer plans an in-place update (stop/start) of a live fixed host; a new box still boots with the given script. tofu only, run on an operator machine; no read is added and nothing on a box reads the file.;rev3=census-ruling-w6-ingress-drain;basis=new aws_iam_role_policy.host_ingress_drain, count 1 only in fixed mode with ingress_target_group_arns non-empty: Allow elasticloadbalancing:DescribeTargetGroupAttributes and elasticloadbalancing:DescribeTargetHealth on Resource "*" (neither action takes a resource type). Read-only; no ELB write right. aws_iam_role.host's group-mode precondition gains length(var.ingress_target_group_arns) == 0, so group mode refuses the input. New AWS read right for the box role (the agent's drain reads); nothing a tenant or app can name.;rev3=census-ruling-stats-prune-400;basis=new aws_iam_role_policy for the console host role, count 1 only when enable_analytics_version_prune is true (default false, refused in group mode): s3:ListBucketVersions on the deployment bucket conditioned on s3:prefix apps/*, and s3:DeleteObjectVersion on deployment_bucket_arn/apps/*/*/analytics/*/days/* only; existing grants and denies unchanged; tofu only, run on an operator machine; no read is added and nothing on a box reads the file file:external@0 141a541fbb11b2bdd288590d9d4a9efa9639ba5fcd8a0e369c7949a0e3042c32 |
| +@legacy ced8bcd6a8d4d3f56060f666d1b6b2e786bee74c02f0d860df9e848aaa0eb601 infra/modules/region-host/tests/group.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add mock plans covering group shape, network/AMI checks, launch constraints, boot config/ingress parameters and default fixed absence. Test-only Terraform, no real AWS effects or root runtime reads.;rev3=census-ruling-region-ha-group-rtb;basis=Two mock runs: implicit main route table, explicit association wins; test-only Terraform;rev3=census-ruling-region-ha-p3b1-fixes;basis=Read the plain script local in boot assertions and retain the shell injection probe through the mocked partition DNS suffix, with the same queue URL bound by the launch precondition. Mock plans only; no runtime reads.;rev3=census-ruling-stats-prune-400;basis=adds a mock run asserting group mode refuses enable_analytics_version_prune; test-only Terraform, no runtime reads file:external@0 76bf9d5afefb0346fd675c3a11937f56772b3fd08641fa7f20b73bb5b5bb9cf1 |
| +@legacy f9de94422b83bed0ec5abd11c4b3f4e18b4680bb8c16b398613396c8fa5a3afc infra/modules/region-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's variables with console_mail_from (validated as one lowercase address) and console_mail_region, both empty by default; no read is added and nothing on a box reads the file;rev3=census-ruling-hunt-account-root-hardening;basis=adds deny_release_key_reads (bool, default true); no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Add default-fixed mode and validated group count, zones, pinned image/release/template, ingress, configuration key and transaction-open refusal. Operator-supplied Terraform values select root boot inputs; no direct box runtime read and no group activation by default.;rev3=census-ruling-region-ha-g2-fixes;basis=Add an empty-default set of additional alert topic ARNs, validating concrete SNS topic syntax and excluding wildcards/subscriptions; operator Terraform input, no box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Add optional alerts_topic_arn with concrete same-region SNS ARN validation and mutual exclusion with alerts_email. The caller owns the existing topic policy and subscriptions; no runtime sink is configured and no new root read is added.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: five variables, managed_fleets_enabled (bool, default false, refused unless mode is fixed), managed_fleets_deployment, managed_fleets_regions (concrete ami/subnet/sg IDs, arm64 types, no ID in two regions), managed_fleet_bucket_prefix (1-24 chars, no reserved prefix, must not cover the deployment, data or staging buckets, disjoint from store_bucket_prefix) and managed_fleet_user_path (literal IAM path, disjoint from store_user_path); store_bucket_prefix and store_user_path gain a validation refusing *, ? or ${ only when managed fleets and object storage are both on; operator Terraform input only; no box runtime read and nothing on a box reads the file;rev3=census-ruling-fixedbox-health-alarms;basis=Add optional health_alerts_topic_arn (concrete same-region SNS ARN validation, empty default); enable_auto_recovery description covers both status alarms. Operator Terraform input; no box runtime read.;rev3=census-ruling-w6-ingress-drain;basis=new variable ingress_target_group_arns (list(string), default [], non-nullable) validated as distinct ELB target group ARNs (arn:aws(-x)*:elasticloadbalancing:<region>:<12 digits>:targetgroup/<name>/<16 hex>); drives the IAM policy and output above. No read added.;rev3=census-ruling-stats-prune-400;basis=new variable enable_analytics_version_prune (bool, default false) driving the policy above; operator Terraform input; no box runtime read file:external@0 deabebfd89e4871fd83c21bb2a927ef806f1db1275130c15f39d3e017f80a636 |
| +@legacy 71985453cf78d199770ff72844015a9c4bea9627757cc64e1c3ee831ac8288be infra/modules/region-host/tests/analytics_prune.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-stats-prune-400;basis=new mock-plan test: the analytics version-prune grant is absent by default and, when on, grants exactly the analytics day-file versions; test-only Terraform, no runtime reads file:external@0 4c92921a8a4e3c9492c39b67bc554713f369d47f9d4fd3ce00a01150ca7fde93 |
| +infra/modules/region-host/main.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's module with one optional aws_iam_role_policy, host_console_mail, count 0 unless console_mail_from is set; it grants the host role ses:SendEmail on the one sending identity, the carlos-bab configuration set and its tenants, conditioned on ses:FromAddress equal to console_mail_from; no read is added and nothing on a box reads the file;rev3=census-ruling-sec-host-imdsv2-module;basis=aws_instance.host gains metadata_options (IMDSv2 required, hop limit 1, endpoint enabled), matching scanner-host; tofu configuration only, run on an operator's machine; no read, file or record write is added; applies in place on a running instance with no restart;rev3=census-ruling-hunt-account-root-hardening;basis=adds aws_iam_role_policy host_release_key_deny (count from deny_release_key_reads, default true): an explicit Deny on ssm:GetParameter, GetParameters and GetParameterHistory for parameter/carlos/release-key, and on GetParametersByPath for its ancestor paths; tofu only, run on an operator's machine; no read is added and nothing on a box reads the file;rev3=census-ruling-region-host-store-deny;basis=host_store policy: the explicit Deny on the deployment's own buckets drops s3:DeleteObject and keeps s3:DeleteBucket and s3:CreateBucket (lease release, retention and prune are DeleteObject); tofu only, run on an operator machine; no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Select default fixed resources through counted addresses and explicit moves; group mode selects scoped bucket/SSM policy, partition-aware ARNs and refuses fixed-only settings. Operator Terraform controls the instance role that can read boot parameters and write runtime bucket objects; release-key Deny and fixed-mode policy remain.;rev3=census-ruling-region-ha-g3-fixes;basis=Enable the fixed-host memory alarm with either alert input and use the selected topic for alarm and recovery notifications. Preserve module topic/subscription creation for alerts_email only. No new root runtime read or box authority.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: aws_iam_policy.store_user_boundary is now counted when store_bucket_prefix is set or managed_fleets_enabled is true; its statements are concat of the unchanged object-storage pair (only with a store prefix, moved into local.store_boundary_statements byte for byte) and local.managed_boundary_statements (only with managed fleets: the fleet-data Allows on <managed_fleet_bucket_prefix>* buckets); name unchanged, description conditional on store prefix with lifecycle ignore_changes on description so a later feature switch never replaces the policy; tofu only, run on an operator's machine with the operator's AWS credentials; no box unit, user_data or binary reads the file; no read is added; default (both features off) plans no change;rev3=census-ruling-fixedbox-health-alarms;basis=Fixed host EC2 status-check alarms: auto-recover gains SNS alarm/ok actions (ec2:recover kept); new host_instance_check alarm (StatusCheckFailed_Instance 3 of 3 x 60 s -> ec2:reboot + SNS). tofu only, run on an operator machine; no read is added and nothing on a box reads the file.;rev3=census-ruling-fixed-host-ignore-user-data;basis=aws_instance.host lifecycle ignore_changes gains user_data (was [ami]): a user_data edit no longer plans an in-place update (stop/start) of a live fixed host; a new box still boots with the given script. tofu only, run on an operator machine; no read is added and nothing on a box reads the file.;rev3=census-ruling-w6-ingress-drain;basis=new aws_iam_role_policy.host_ingress_drain, count 1 only in fixed mode with ingress_target_group_arns non-empty: Allow elasticloadbalancing:DescribeTargetGroupAttributes and elasticloadbalancing:DescribeTargetHealth on Resource "*" (neither action takes a resource type). Read-only; no ELB write right. aws_iam_role.host's group-mode precondition gains length(var.ingress_target_group_arns) == 0, so group mode refuses the input. New AWS read right for the box role (the agent's drain reads); nothing a tenant or app can name.;rev3=census-ruling-stats-prune-400;basis=new aws_iam_role_policy for the console host role, count 1 only when enable_analytics_version_prune is true (default false, refused in group mode): s3:ListBucketVersions on the deployment bucket conditioned on s3:prefix apps/*, and s3:DeleteObjectVersion on deployment_bucket_arn/apps/*/*/analytics/*/days/* only; existing grants and denies unchanged; tofu only, run on an operator machine; no read is added and nothing on a box reads the file file:external@0 141a541fbb11b2bdd288590d9d4a9efa9639ba5fcd8a0e369c7949a0e3042c32 |
| +infra/modules/region-host/tests/group.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Add mock plans covering group shape, network/AMI checks, launch constraints, boot config/ingress parameters and default fixed absence. Test-only Terraform, no real AWS effects or root runtime reads.;rev3=census-ruling-region-ha-group-rtb;basis=Two mock runs: implicit main route table, explicit association wins; test-only Terraform;rev3=census-ruling-region-ha-p3b1-fixes;basis=Read the plain script local in boot assertions and retain the shell injection probe through the mocked partition DNS suffix, with the same queue URL bound by the launch precondition. Mock plans only; no runtime reads.;rev3=census-ruling-stats-prune-400;basis=adds a mock run asserting group mode refuses enable_analytics_version_prune; test-only Terraform, no runtime reads file:external@0 76bf9d5afefb0346fd675c3a11937f56772b3fd08641fa7f20b73bb5b5bb9cf1 |
| +infra/modules/region-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's variables with console_mail_from (validated as one lowercase address) and console_mail_region, both empty by default; no read is added and nothing on a box reads the file;rev3=census-ruling-hunt-account-root-hardening;basis=adds deny_release_key_reads (bool, default true); no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Add default-fixed mode and validated group count, zones, pinned image/release/template, ingress, configuration key and transaction-open refusal. Operator-supplied Terraform values select root boot inputs; no direct box runtime read and no group activation by default.;rev3=census-ruling-region-ha-g2-fixes;basis=Add an empty-default set of additional alert topic ARNs, validating concrete SNS topic syntax and excluding wildcards/subscriptions; operator Terraform input, no box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Add optional alerts_topic_arn with concrete same-region SNS ARN validation and mutual exclusion with alerts_email. The caller owns the existing topic policy and subscriptions; no runtime sink is configured and no new root read is added.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: five variables, managed_fleets_enabled (bool, default false, refused unless mode is fixed), managed_fleets_deployment, managed_fleets_regions (concrete ami/subnet/sg IDs, arm64 types, no ID in two regions), managed_fleet_bucket_prefix (1-24 chars, no reserved prefix, must not cover the deployment, data or staging buckets, disjoint from store_bucket_prefix) and managed_fleet_user_path (literal IAM path, disjoint from store_user_path); store_bucket_prefix and store_user_path gain a validation refusing *, ? or ${ only when managed fleets and object storage are both on; operator Terraform input only; no box runtime read and nothing on a box reads the file;rev3=census-ruling-fixedbox-health-alarms;basis=Add optional health_alerts_topic_arn (concrete same-region SNS ARN validation, empty default); enable_auto_recovery description covers both status alarms. Operator Terraform input; no box runtime read.;rev3=census-ruling-w6-ingress-drain;basis=new variable ingress_target_group_arns (list(string), default [], non-nullable) validated as distinct ELB target group ARNs (arn:aws(-x)*:elasticloadbalancing:<region>:<12 digits>:targetgroup/<name>/<16 hex>); drives the IAM policy and output above. No read added.;rev3=census-ruling-stats-prune-400;basis=new variable enable_analytics_version_prune (bool, default false) driving the policy above; operator Terraform input; no box runtime read file:external@0 deabebfd89e4871fd83c21bb2a927ef806f1db1275130c15f39d3e017f80a636 |
| +infra/modules/region-host/tests/analytics_prune.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-stats-prune-400;basis=new mock-plan test: the analytics version-prune grant is absent by default and, when on, grants exactly the analytics day-file versions; test-only Terraform, no runtime reads file:external@0 4c92921a8a4e3c9492c39b67bc554713f369d47f9d4fd3ce00a01150ca7fde93 |
| +@coverage infra/modules/region-host f521acd6cc601bf90d4c024f20affefbe022583a47c4804f1bc3ba8fff9b9608 |
| +@coverage infra/modules/region-host/tests 67454e68911e1b2ea6c5a148914f19d9e1b9c0ad84ea84d24c631cc15bb06abe |
| +@coverage internal/analytics 20e16b5970364088c5cb6d815b97f3923a91593eaade823140161d16b948b2ad |
| +@coverage internal/release 4fbbdc3adb436815e762e486114f551ec1ddf0fe30e98022f54bc229d5c63e1a |