carlos / platform Public

infra: only operators and consoles may write the published floors

The deployment bucket policy denies PutObject, DeleteObject and
DeleteObjectVersion on control/moves-protocol.json and its root-signed
authorization to all but operator_role_arns, and on
control/seeds-protocol.json to all but operators and the new
seeds_floor_writer_role_arns, so a box role cannot forge or tear a floor.
Not applied anywhere; each root's apply is Paul's call.
Review: Astra R1 READY AFTER FIXES (rollout P2s only, recorded in the
report); census APPROVE (INFRADENY-R1-astra).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from infra-floor-keys-deny into main.
claude agent, operated by paul@keymail.dev f9c1bd4779fcab758ff3a047f6d141d995154cdf parent 6d4b366
6 files changed, +173 −1
  • docs/superpowers/notes/census-proposal-infra-floor-keys-deny.md +25 −0
  • infra/modules/deployment-buckets/main.tf +39 −0
  • infra/modules/deployment-buckets/tests/published_floors.tftest.hcl +82 −0
  • infra/modules/deployment-buckets/variables.tf +15 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-infra-floor-keys-deny.tsv +11 −0

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-93AIhn
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.40
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec

amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/notes/census-proposal-infra-floor-keys-deny.md b/docs/superpowers/notes/census-proposal-infra-floor-keys-deny.md
new file mode 100644
index 000000000..d8170108d
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-infra-floor-keys-deny.md
@@ -0,0 +1,25 @@
+# Census approval: infra-floor-keys-deny
+
+Ruling `census-ruling-infra-floor-keys-deny`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `infra/modules/deployment-buckets/main.tf` `external` | body | unchanged (1) | the deployment bucket policy gains OnlyOperatorsWriteMovesFloor (Deny s3:PutObject, s3:DeleteObject, s3:DeleteObjectVersion on control/moves-protocol.json and control/moves-protocol-auth.json, ArnNotLike operator_role_arns) and OnlyPublishersWriteSeedsFloor (the same actions on control/seeds-protocol.json, ArnNotLike operator_role_arns plus seeds_floor_writer_role_arns), Principal *, the nobody ARN when the list is empty, the same shape as OnlyOperatorsWriteBinds; a local joins the two lists; nothing wider is named and no other statement changes. Only narrows writers of objects root reads; tofu only, run on an operator machine; no read is added |
+| `infra/modules/deployment-buckets/variables.tf` `external` | body | unchanged (1) | adds variable seeds_floor_writer_role_arns (list of exact IAM role ARNs, default empty, wildcards refused by validation); operator_role_arns description names the floors; no read |
+
+Envelopes re-pinned: `infra/modules/deployment-buckets`, `infra/modules/deployment-buckets/tests`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `infra/modules/deployment-buckets/main.tf` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-db-region-forward-2;basis=the db-reads/ lifecycle rules (db region forward spec §5.7, J4): two rules beside geoip-noncurrent on the deployment bucket's lifecycle configuration, prepared and not applied until Paul approves docs/superpowers/notes/db-reads-lifecycle-approval.md; no read, no IAM change;rev3=census-ruling-data-lifecycle-336;basis=adds aws_s3_bucket_lifecycle_configuration "data" on the data bucket: noncurrent versions expire after var.data_noncurrent_days, expired delete markers go, multipart aborts after 7 days; no read, no IAM change;rev3=census-ruling-media-results-cleanup;basis=two lifecycle rules for media-results/ (media-results-expire: current objects after 1 day, noncurrent versions 1 day after they become noncurrent, multipart aborts after 1 day; media-results-delete-markers: expired delete markers) join the existing rules in aws_s3_bucket_lifecycle_configuration.deployment; comment only otherwise; existing rules unchanged; no read, no IAM change;rev3=census-ruling-store-write-credential;basis=the deployment bucket policy gains ConsoleFloorsAreCreateOnly (Deny s3:PutObject without If-None-Match) and ConsoleFloorsAreNeverDeleted (Deny s3:DeleteObject and s3:DeleteObjectVersion), both Principal * on control/console-floors/* only, the same shape as the box evidence statements; nothing wider is named. tofu only, run on an operator machine; no read is added and nothing on a box reads the file
+- `infra/modules/deployment-buckets/variables.tf` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-data-lifecycle-336;basis=adds variable data_noncurrent_days (number, default 7, validated whole and >= 1); no read
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `infra/modules/deployment-buckets/tests/published_floors.tftest.hcl:external`: reads +file:external; written legacy, accepted-legacy, frozen
+
+Seal: `a6a19c800d55f99ed1c70068e38ffa66aef7af8f55199e97e986d9bbb0e0d80d` → `3d13ade9d1fce3bc1a7d7250d75f2cc5ea3563ca6426401f428ca3a86af19619`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-infra-floor-keys-deny.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/infra/modules/deployment-buckets/main.tf b/infra/modules/deployment-buckets/main.tf
index 4fcbe3bbd..508991f57 100644
--- a/infra/modules/deployment-buckets/main.tf
+++ b/infra/modules/deployment-buckets/main.tf
@@ -209,6 +209,7 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "data" {
locals {
box_evidence_prefixes = ["control/boxes", "control/box-volumes", "control/box-enrollment", "control/box-fences"]
+ seeds_floor_writers = concat(var.operator_role_arns, var.seeds_floor_writer_role_arns)
}
resource "aws_s3_bucket_policy" "deployment_box_records" {
@@ -288,6 +289,44 @@ resource "aws_s3_bucket_policy" "deployment_box_records" {
}
}
},
+ # The published floors. Every box role may write this whole bucket,
+ # so tenant code that reaches one could publish a forged high floor
+ # or delete a real one. The moves floor and its root-signed
+ # authorization are an operator action (an operator shell, or
+ # hostfloor.Publish on a trusted host); nothing on a box and no
+ # console writes either. A deleted authorization tears the pair and
+ # the console refuses platform updates, so it is covered too. The
+ # seeds floor is published by a console (`carlos system seeds-floor
+ # publish`), so the consoles named in seeds_floor_writer_role_arns
+ # may write it as well. Exactly these three keys; with nobody named,
+ # the Deny covers everyone.
+ {
+ Sid = "OnlyOperatorsWriteMovesFloor"
+ Effect = "Deny"
+ Principal = "*"
+ Action = ["s3:PutObject", "s3:DeleteObject", "s3:DeleteObjectVersion"]
+ Resource = [
+ "${aws_s3_bucket.deployment.arn}/control/moves-protocol.json",
+ "${aws_s3_bucket.deployment.arn}/control/moves-protocol-auth.json",
+ ]
+ Condition = {
+ ArnNotLike = {
+ "aws:PrincipalArn" = length(var.operator_role_arns) > 0 ? var.operator_role_arns : ["arn:aws:iam::000000000000:role/nobody"]
+ }
+ }
+ },
+ {
+ Sid = "OnlyPublishersWriteSeedsFloor"
+ Effect = "Deny"
+ Principal = "*"
+ Action = ["s3:PutObject", "s3:DeleteObject", "s3:DeleteObjectVersion"]
+ Resource = "${aws_s3_bucket.deployment.arn}/control/seeds-protocol.json"
+ Condition = {
+ ArnNotLike = {
+ "aws:PrincipalArn" = length(local.seeds_floor_writers) > 0 ? local.seeds_floor_writers : ["arn:aws:iam::000000000000:role/nobody"]
+ }
+ }
+ },
]
})
}
diff --git a/infra/modules/deployment-buckets/tests/published_floors.tftest.hcl b/infra/modules/deployment-buckets/tests/published_floors.tftest.hcl
new file mode 100644
index 000000000..8fb16b2a1
--- /dev/null
+++ b/infra/modules/deployment-buckets/tests/published_floors.tftest.hcl
@@ -0,0 +1,82 @@
+# The two published floors (control/moves-protocol.json, with its
+# authorization control/moves-protocol-auth.json, and
+# control/seeds-protocol.json): every box role can write the whole
+# deployment bucket, so without these statements tenant code that reaches
+# a box role could publish a forged high floor or delete a real one (a
+# deleted authorization tears the pair, and the console then refuses
+# updates). Only operators write the moves floor pair; operators and the
+# named consoles write the seeds floor (`carlos system seeds-floor
+# publish` is a console door).
+# Each statement is checked whole, so a wider key, another action or
+# another exempt principal fails here.
+
+mock_provider "aws" {}
+
+override_resource {
+ target = aws_s3_bucket.deployment
+ values = { arn = "arn:aws:s3:::dep" }
+}
+
+variables {
+ deployment_bucket_name = "dep"
+ data_bucket_name = "data"
+}
+
+run "only_operators_write_the_moves_floor" {
+ command = plan
+ variables {
+ operator_role_arns = ["arn:aws:iam::123456789012:role/operator-*"]
+ seeds_floor_writer_role_arns = ["arn:aws:iam::123456789012:role/console"]
+ }
+ assert {
+ condition = jsonencode([
+ for s in jsondecode(aws_s3_bucket_policy.deployment_box_records.policy).Statement : s if s.Sid == "OnlyOperatorsWriteMovesFloor"
+ ]) == jsonencode([{
+ Action = ["s3:PutObject", "s3:DeleteObject", "s3:DeleteObjectVersion"]
+ Condition = { ArnNotLike = { "aws:PrincipalArn" = ["arn:aws:iam::123456789012:role/operator-*"] } }
+ Effect = "Deny"
+ Principal = "*"
+ Resource = [
+ "arn:aws:s3:::dep/control/moves-protocol.json",
+ "arn:aws:s3:::dep/control/moves-protocol-auth.json",
+ ]
+ Sid = "OnlyOperatorsWriteMovesFloor"
+ }])
+ error_message = "OnlyOperatorsWriteMovesFloor must Deny writes and deletes of the moves floor and its authorization (control/moves-protocol.json, control/moves-protocol-auth.json) alone to everyone but the operators; a console role is not exempt"
+ }
+ assert {
+ condition = jsonencode([
+ for s in jsondecode(aws_s3_bucket_policy.deployment_box_records.policy).Statement : s if s.Sid == "OnlyPublishersWriteSeedsFloor"
+ ]) == jsonencode([{
+ Action = ["s3:PutObject", "s3:DeleteObject", "s3:DeleteObjectVersion"]
+ Condition = { ArnNotLike = { "aws:PrincipalArn" = [
+ "arn:aws:iam::123456789012:role/operator-*",
+ "arn:aws:iam::123456789012:role/console",
+ ] } }
+ Effect = "Deny"
+ Principal = "*"
+ Resource = "arn:aws:s3:::dep/control/seeds-protocol.json"
+ Sid = "OnlyPublishersWriteSeedsFloor"
+ }])
+ error_message = "OnlyPublishersWriteSeedsFloor must Deny writes and deletes of control/seeds-protocol.json alone to everyone but the operators and the named consoles"
+ }
+}
+
+run "no_publishers_named_denies_everyone" {
+ command = plan
+ assert {
+ condition = jsonencode([
+ for s in jsondecode(aws_s3_bucket_policy.deployment_box_records.policy).Statement : s.Condition.ArnNotLike["aws:PrincipalArn"]
+ if contains(["OnlyOperatorsWriteMovesFloor", "OnlyPublishersWriteSeedsFloor"], s.Sid)
+ ]) == jsonencode([["arn:aws:iam::000000000000:role/nobody"], ["arn:aws:iam::000000000000:role/nobody"]])
+ error_message = "With no operators and no consoles named, both floor statements must exempt nobody."
+ }
+}
+
+run "wildcard_seeds_floor_writers_are_refused" {
+ command = plan
+ variables {
+ seeds_floor_writer_role_arns = ["arn:aws:iam::123456789012:role/*"]
+ }
+ expect_failures = [var.seeds_floor_writer_role_arns]
+}
diff --git a/infra/modules/deployment-buckets/variables.tf b/infra/modules/deployment-buckets/variables.tf
index e1af55cd3..f0fc32127 100644
--- a/infra/modules/deployment-buckets/variables.tf
+++ b/infra/modules/deployment-buckets/variables.tf
@@ -9,7 +9,7 @@ variable "data_bucket_name" {
}
variable "operator_role_arns" {
- description = "IAM role ARNs of human operators. Only these may write a box bind (control/boxes/*.bind.json). Empty means nobody can: the safe default until operators are named."
+ description = "IAM role ARNs of human operators. Only these may write a box bind (control/boxes/*.bind.json) or the moves floor and its authorization (control/moves-protocol.json, control/moves-protocol-auth.json), and they may write the seeds floor. Empty means nobody can: the safe default until operators are named."
type = list(string)
default = []
}
@@ -28,6 +28,20 @@ variable "box_fence_writer_role_arns" {
}
}
+variable "seeds_floor_writer_role_arns" {
+ description = "Exact IAM role ARNs of the consoles that publish the seeds floor (control/seeds-protocol.json, `carlos system seeds-floor publish`). Operators may write it too. Empty with no operators named means nobody can, and the publish door fails."
+ type = list(string)
+ default = []
+
+ validation {
+ condition = alltrue([
+ for arn in var.seeds_floor_writer_role_arns :
+ can(regex("^arn:[a-z0-9-]+:iam::[0-9]{12}:role/[^*?]+$", arn))
+ ])
+ error_message = "Seeds floor writers must be exact IAM role ARNs without wildcards."
+ }
+}
+
variable "data_noncurrent_days" {
description = "Days a replaced or deleted object in the data bucket is kept as a noncurrent version before it expires. Defaults to the 7-day restore window. Longer retention for a plan belongs in litestream's per-instance retention, not here."
type = number
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 7761db7d1..a8e3d1999 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -316,3 +316,4 @@ plan14-root-reads-catchall-stamp-now.tsv c9940b1b6fb0146a30a2fb2b557f898ac6d28ba
plan14-root-reads-gvisor-followups.tsv bf71949458c3c44c86b778a2a3e0d0b352268f5640c28b6b5d2f25bc2a5318b2
plan14-root-reads-instance-usage.tsv e3c8bc6a560e863ed44c7ab2f9367a4347ec767d8da2c3b1f1eafc90e45c89e8
plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv a6a19c800d55f99ed1c70068e38ffa66aef7af8f55199e97e986d9bbb0e0d80d
+plan14-root-reads-infra-floor-keys-deny.tsv 3d13ade9d1fce3bc1a7d7250d75f2cc5ea3563ca6426401f428ca3a86af19619
diff --git a/internal/provision/testdata/plan14-root-reads-infra-floor-keys-deny.tsv b/internal/provision/testdata/plan14-root-reads-infra-floor-keys-deny.tsv
new file mode 100644
index 000000000..3e5b9b729
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-infra-floor-keys-deny.tsv
@@ -0,0 +1,11 @@
+# Census overlay infra-floor-keys-deny, written by census-propose (#369). census-ruling-infra-floor-keys-deny, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-infra-floor-keys-deny.md.
+# 2 body, 0 sites, 2 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 975fa23004ac84f84aaa60c7f18ce88b2f1a87125dc8ff3b47dec6078b8b41d0 infra/modules/deployment-buckets/main.tf external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-db-region-forward-2;basis=the db-reads/ lifecycle rules (db region forward spec §5.7, J4): two rules beside geoip-noncurrent on the deployment bucket's lifecycle configuration, prepared and not applied until Paul approves docs/superpowers/notes/db-reads-lifecycle-approval.md; no read, no IAM change;rev3=census-ruling-data-lifecycle-336;basis=adds aws_s3_bucket_lifecycle_configuration "data" on the data bucket: noncurrent versions expire after var.data_noncurrent_days, expired delete markers go, multipart aborts after 7 days; no read, no IAM change;rev3=census-ruling-media-results-cleanup;basis=two lifecycle rules for media-results/ (media-results-expire: current objects after 1 day, noncurrent versions 1 day after they become noncurrent, multipart aborts after 1 day; media-results-delete-markers: expired delete markers) join the existing rules in aws_s3_bucket_lifecycle_configuration.deployment; comment only otherwise; existing rules unchanged; no read, no IAM change;rev3=census-ruling-store-write-credential;basis=the deployment bucket policy gains ConsoleFloorsAreCreateOnly (Deny s3:PutObject without If-None-Match) and ConsoleFloorsAreNeverDeleted (Deny s3:DeleteObject and s3:DeleteObjectVersion), both Principal * on control/console-floors/* only, the same shape as the box evidence statements; nothing wider is named. tofu only, run on an operator machine; no read is added and nothing on a box reads the file;rev3=census-ruling-infra-floor-keys-deny;basis=the deployment bucket policy gains OnlyOperatorsWriteMovesFloor (Deny s3:PutObject, s3:DeleteObject, s3:DeleteObjectVersion on control/moves-protocol.json and control/moves-protocol-auth.json, ArnNotLike operator_role_arns) and OnlyPublishersWriteSeedsFloor (the same actions on control/seeds-protocol.json, ArnNotLike operator_role_arns plus seeds_floor_writer_role_arns), Principal *, the nobody ARN when the list is empty, the same shape as OnlyOperatorsWriteBinds; a local joins the two lists; nothing wider is named and no other statement changes. Only narrows writers of objects root reads; tofu only, run on an operator machine; no read is added file:external@0 473f7b112f8f3f8de83a71ecf7461aaf3435a75024a75b062623a7c8d8c274fe
+@legacy 50de54326d42fb20b0eaca4fddf0e13f518eb050aaf1ed1cf9bdc412671a1c12 infra/modules/deployment-buckets/variables.tf external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-data-lifecycle-336;basis=adds variable data_noncurrent_days (number, default 7, validated whole and >= 1); no read;rev3=census-ruling-infra-floor-keys-deny;basis=adds variable seeds_floor_writer_role_arns (list of exact IAM role ARNs, default empty, wildcards refused by validation); operator_role_arns description names the floors; no read file:external@0 f3f80c2da50961544668e87430eed5dc7594e48f9abe9ac0a7cd781fba909f43
+@legacy cdc293d7df731c6d41277099d6165f276557da901d2b91ee8595c3a7b6324497 infra/modules/deployment-buckets/tests/published_floors.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-infra-floor-keys-deny;basis=new tftest (mock provider, plan only) asserting both floor statements whole, the nobody default, and the wildcard refusal; run only by tofu test, never on a box; no read file:external@0 db03e4f523fe2fea248faa82a5118c2384ca2775c3c06d414d953a0860d121f8
+infra/modules/deployment-buckets/main.tf external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-db-region-forward-2;basis=the db-reads/ lifecycle rules (db region forward spec §5.7, J4): two rules beside geoip-noncurrent on the deployment bucket's lifecycle configuration, prepared and not applied until Paul approves docs/superpowers/notes/db-reads-lifecycle-approval.md; no read, no IAM change;rev3=census-ruling-data-lifecycle-336;basis=adds aws_s3_bucket_lifecycle_configuration "data" on the data bucket: noncurrent versions expire after var.data_noncurrent_days, expired delete markers go, multipart aborts after 7 days; no read, no IAM change;rev3=census-ruling-media-results-cleanup;basis=two lifecycle rules for media-results/ (media-results-expire: current objects after 1 day, noncurrent versions 1 day after they become noncurrent, multipart aborts after 1 day; media-results-delete-markers: expired delete markers) join the existing rules in aws_s3_bucket_lifecycle_configuration.deployment; comment only otherwise; existing rules unchanged; no read, no IAM change;rev3=census-ruling-store-write-credential;basis=the deployment bucket policy gains ConsoleFloorsAreCreateOnly (Deny s3:PutObject without If-None-Match) and ConsoleFloorsAreNeverDeleted (Deny s3:DeleteObject and s3:DeleteObjectVersion), both Principal * on control/console-floors/* only, the same shape as the box evidence statements; nothing wider is named. tofu only, run on an operator machine; no read is added and nothing on a box reads the file;rev3=census-ruling-infra-floor-keys-deny;basis=the deployment bucket policy gains OnlyOperatorsWriteMovesFloor (Deny s3:PutObject, s3:DeleteObject, s3:DeleteObjectVersion on control/moves-protocol.json and control/moves-protocol-auth.json, ArnNotLike operator_role_arns) and OnlyPublishersWriteSeedsFloor (the same actions on control/seeds-protocol.json, ArnNotLike operator_role_arns plus seeds_floor_writer_role_arns), Principal *, the nobody ARN when the list is empty, the same shape as OnlyOperatorsWriteBinds; a local joins the two lists; nothing wider is named and no other statement changes. Only narrows writers of objects root reads; tofu only, run on an operator machine; no read is added file:external@0 473f7b112f8f3f8de83a71ecf7461aaf3435a75024a75b062623a7c8d8c274fe
+infra/modules/deployment-buckets/variables.tf external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-data-lifecycle-336;basis=adds variable data_noncurrent_days (number, default 7, validated whole and >= 1); no read;rev3=census-ruling-infra-floor-keys-deny;basis=adds variable seeds_floor_writer_role_arns (list of exact IAM role ARNs, default empty, wildcards refused by validation); operator_role_arns description names the floors; no read file:external@0 f3f80c2da50961544668e87430eed5dc7594e48f9abe9ac0a7cd781fba909f43
+infra/modules/deployment-buckets/tests/published_floors.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-infra-floor-keys-deny;basis=new tftest (mock provider, plan only) asserting both floor statements whole, the nobody default, and the wildcard refusal; run only by tofu test, never on a box; no read file:external@0 db03e4f523fe2fea248faa82a5118c2384ca2775c3c06d414d953a0860d121f8
+@coverage infra/modules/deployment-buckets 6fbd830a211ce2cd964425dda55cae4feada0dee657df76f47d2452c2c471839
+@coverage infra/modules/deployment-buckets/tests 01f7c35c54c468b5ff1d2a1c35474d2498c0c8548d8ab04f3e6d2ca369a96310