infra: store_conversion switch for provenance and uploads
Add the region-host switch media conversion needs. Off by default, and off renders every policy byte for byte as before. On, host_store_conversion grants the nine bucket settings actions the mediaaws adapter calls, on buckets under the store prefix, and denies CORS, lifecycle and tag writes on the deployment and data buckets. The store user boundary gains s3:AbortMultipartUpload and s3:ListMultipartUploadParts on its object statement. Neither multipart action reaches a termination proof: a store user's inline policy names its one bucket, both act only on an upload in progress, and a proof is written by a single conditional PUT. The termination test now checks both actions, and the statements digest moves with the source. The policy block's own digest does not. The grant counts toward the role's 10,240-character inline total. The fullest console fixture goes over by 23 characters with it, and the plan refuses that combination.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 files changed,
+364
−5
docs/superpowers/notes/media-conversion-copy-deck.md+11 −0infra/modules/region-host/README.md+4 −0infra/modules/region-host/main.tf+83 −2infra/modules/region-host/managed_fleets.tf+1 −1infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl+58 −0infra/modules/region-host/tests/store_conversion.tftest.hcl+199 −0infra/modules/region-host/variables.tf+6 −0internal/objstore/termination_credentials_test.go+2 −2
diff --git a/docs/superpowers/notes/media-conversion-copy-deck.md b/docs/superpowers/notes/media-conversion-copy-deck.md| index db1a2c26d..044627e52 100644 |
| --- a/docs/superpowers/notes/media-conversion-copy-deck.md |
| +++ b/docs/superpowers/notes/media-conversion-copy-deck.md |
| @@ -710,3 +710,14 @@ reaper's lines reach only the task's stop reason and the function's own log. |
| | `engine.reaper.stop_reason` | `carlos media reaper: older than %d minutes`, the stop reason ECS records. `%d` is `MAX_AGE_MINUTES` (pending Luna pass; plan 3 Task 11) | |
| | `engine.reaper.undescribed` | `carlos media reaper: a task could not be described` (pending Luna pass; plan 3 Task 11) | |
| | `engine.reaper.not_stopped` | `carlos media reaper: %d of %d tasks were not stopped` (pending Luna pass; plan 3 Task 11) | |
| + |
| +### The region-host store_conversion switch (plan 3 Task 12) |
| + |
| +The module's README section, its variable description and its plan-time |
| +refusal, for whoever deploys it. |
| + |
| +| Key | Text | |
| +|---|---| |
| +| `infra.region_host.readme.store_conversion` | The `Media conversion and browser uploads` section of `infra/modules/region-host/README.md` (pending Luna pass; plan 3 Task 12) | |
| +| `infra.region_host.store_conversion.description` | The `description` of `variable "store_conversion"` in `infra/modules/region-host/variables.tf` (pending Luna pass; plan 3 Task 12) | |
| +| `infra.region_host.store_conversion.refused` | `store_conversion needs store_bucket_prefix: with no prefix there are no object stores on this deployment to convert, and the grant would name every bucket in the account.` (pending Luna pass; plan 3 Task 12) | |
diff --git a/infra/modules/region-host/README.md b/infra/modules/region-host/README.md| index 43e788b06..628b85426 100644 |
| --- a/infra/modules/region-host/README.md |
| +++ b/infra/modules/region-host/README.md |
| @@ -106,6 +106,10 @@ looks exactly like a deploy that did nothing. |
| `store_scanning = true` lets this host's role read and tag objects under `store_bucket_prefix` (`s3:GetObject`, `s3:GetObjectTagging` and `s3:PutObjectTagging`), which is what the console's virus scanner needs. It is off by default, so a deployment that has not switched scanning on plans no change and its console still never reads tenant data. Set it on the console's box only, and only on a deployment that runs a [scanner-host](../scanner-host/README.md). It requires `store_bucket_prefix`. |
| +## Media conversion and browser uploads |
| + |
| +`store_conversion = true` lets this host’s role check the buckets under `store_bucket_prefix` before media conversion uses them, and set them up for browser uploads. The role can read each bucket’s policy, encryption and versioning, and read and change its CORS rules, lifecycle rules and tags. Store users can also list the parts of their multipart uploads and abort those uploads. The role can never change CORS rules, lifecycle rules or tags on the deployment and data buckets, even if the prefix matches their names. It is off by default, so a deployment that has not switched it on plans no change. Set it on the console’s box only, along with `CARLOS_STORE_CONVERSION=1` on the console. It requires `store_bucket_prefix`. |
| + |
| ## Checking it worked |
| ```sh |
diff --git a/infra/modules/region-host/main.tf b/infra/modules/region-host/main.tf| index 23c9ea29b..1d2205690 100644 |
| --- a/infra/modules/region-host/main.tf |
| +++ b/infra/modules/region-host/main.tf |
| @@ -805,6 +805,14 @@ data "aws_caller_identity" "current" {} |
| # at creation: IAM cannot change a policy's description in place, so a change |
| # would replace a policy every existing user is bound to. An existing store |
| # boundary keeps its text; one first created for managed fleets says so. |
| +# |
| +# store_conversion adds the two multipart actions objstore's inline policy |
| +# already asks for, so an app's server can list and abandon a browser upload. |
| +# With the switch off the document renders exactly as it did before. Neither |
| +# action reaches the termination proofs in the data bucket, even under a |
| +# prefix that matches that bucket: a store user's inline policy names its one |
| +# bucket, and both actions act only on an upload in progress, never on a |
| +# finished object. |
| locals { |
| store_boundary_statements = [ |
| { |
| @@ -813,8 +821,11 @@ locals { |
| Resource = "arn:aws:s3:::${var.store_bucket_prefix}*" |
| }, |
| { |
| - Effect = "Allow" |
| - Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"] |
| + Effect = "Allow" |
| + Action = concat( |
| + ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], |
| + var.store_conversion ? ["s3:AbortMultipartUpload", "s3:ListMultipartUploadParts"] : [], |
| + ) |
| Resource = "arn:aws:s3:::${var.store_bucket_prefix}*/*" |
| }, |
| ] |
| @@ -981,6 +992,76 @@ resource "aws_iam_role_policy" "host_store_scan" { |
| } |
| } |
| +# ---- media conversion and browser uploads (opt-in) -------------------------- |
| +# |
| +# Exactly the calls internal/mediaaws's bucket settings adapter makes, by the |
| +# action IAM authorises each one with: |
| +# |
| +# GetBucketPolicy s3:GetBucketPolicy |
| +# GetBucketEncryption s3:GetEncryptionConfiguration |
| +# GetBucketVersioning s3:GetBucketVersioning |
| +# GetBucketCors s3:GetBucketCORS |
| +# PutBucketCors, DeleteBucketCors s3:PutBucketCORS |
| +# GetBucketLifecycleConfiguration s3:GetLifecycleConfiguration |
| +# PutBucketLifecycleConfiguration, |
| +# DeleteBucketLifecycle s3:PutLifecycleConfiguration |
| +# GetBucketTagging s3:GetBucketTagging |
| +# PutBucketTagging s3:PutBucketTagging |
| +# |
| +# HeadBucket (s3:ListBucket) and GetBucketLocation are already in host_store, |
| +# which exists whenever this policy can. |
| +# |
| +# The Deny is the same care host_store takes: a prefix such as "carlos-" also |
| +# matches carlos-<deployment>-<acct>, and a lifecycle write replaces the whole |
| +# configuration, so an uploads enable aimed at the wrong bucket would wipe the |
| +# deployment bucket's retention rules. Bucket-level writes only, and nothing |
| +# on this role sets these on those buckets. An empty ARN is left out, and with |
| +# no bucket to name the statement is too: IAM refuses an empty Resource. |
| +locals { |
| + store_conversion_denied_buckets = compact([var.deployment_bucket_arn, var.data_bucket_arn]) |
| +} |
| + |
| +resource "aws_iam_role_policy" "host_store_conversion" { |
| + count = var.store_conversion ? 1 : 0 |
| + name = "${var.iam_name}-store-conversion" |
| + role = aws_iam_role.host.id |
| + policy = jsonencode({ |
| + Version = "2012-10-17" |
| + Statement = concat( |
| + [ |
| + { |
| + Effect = "Allow" |
| + Action = [ |
| + "s3:GetBucketPolicy", |
| + "s3:GetEncryptionConfiguration", |
| + "s3:GetBucketVersioning", |
| + "s3:GetBucketCORS", |
| + "s3:PutBucketCORS", |
| + "s3:GetLifecycleConfiguration", |
| + "s3:PutLifecycleConfiguration", |
| + "s3:GetBucketTagging", |
| + "s3:PutBucketTagging", |
| + ] |
| + Resource = "arn:aws:s3:::${var.store_bucket_prefix}*" |
| + }, |
| + ], |
| + length(local.store_conversion_denied_buckets) == 0 ? [] : [ |
| + { |
| + Effect = "Deny" |
| + Action = ["s3:PutBucketCORS", "s3:PutLifecycleConfiguration", "s3:PutBucketTagging"] |
| + Resource = local.store_conversion_denied_buckets |
| + }, |
| + ], |
| + ) |
| + }) |
| + lifecycle { |
| + precondition { |
| + condition = var.store_bucket_prefix != "" |
| + error_message = "store_conversion needs store_bucket_prefix: with no prefix there are no object stores on this deployment to convert, and the grant would name every bucket in the account." |
| + } |
| + } |
| +} |
| + |
| # --- Termination evidence (region HA spec 1 §5.9) --------------------------- |
| # EC2 tells EventBridge when an instance in this account and region reaches |
| # "terminated"; the rule forwards that to a queue the region's boxes read. |
diff --git a/infra/modules/region-host/managed_fleets.tf b/infra/modules/region-host/managed_fleets.tf| index 7c9f2294c..f5fc3732c 100644 |
| --- a/infra/modules/region-host/managed_fleets.tf |
| +++ b/infra/modules/region-host/managed_fleets.tf |
| @@ -293,7 +293,7 @@ locals { |
| aws_iam_role_policy.host_costexplorer[*].policy, aws_iam_role_policy.host_ssm_parameter_scope[*].policy, |
| aws_iam_role_policy.host_release_key_deny[*].policy, aws_iam_role_policy.host_store[*].policy, |
| aws_iam_role_policy.host_console_mail[*].policy, aws_iam_role_policy.host_store_scan[*].policy, |
| - aws_iam_role_policy.alert_publish[*].policy, |
| + aws_iam_role_policy.host_store_conversion[*].policy, aws_iam_role_policy.alert_publish[*].policy, |
| ) |
| } |
diff --git a/infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl b/infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl| index db56d347f..358bef50e 100644 |
| --- a/infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl |
| +++ b/infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl |
| @@ -461,6 +461,64 @@ run "role_inline_limit" { |
| expect_failures = [aws_iam_role_policy.host_managed_fleets] |
| } |
| +# The media conversion grant counts toward the same total. The policy_union |
| +# console fits without it and goes over with it, so the plan refuses rather |
| +# than IAM refusing the apply half-way. |
| +run "role_inline_limit_counts_store_conversion" { |
| + command = plan |
| + variables { |
| + managed_fleets_enabled = true |
| + managed_fleets_regions = { |
| + "eu-west-1" = { |
| + image = "ami-0123456789abcdef0" |
| + subnets = ["subnet-0123456789abcdef0", "subnet-0123456789abcdef1"] |
| + security_groups = ["sg-0123456789abcdef0"] |
| + instance_types = ["t4g.small", "t4g.medium"] |
| + } |
| + } |
| + store_bucket_prefix = "carlos-store-test-" |
| + store_scanning = true |
| + store_conversion = true |
| + enable_cost_explorer = true |
| + console_mail_from = "noreply@example.com" |
| + console_mail_region = "eu-west-1" |
| + route53_zone_ids = ["Z0123456789ABCDEFGHIJ"] |
| + steering_zone_ids = ["Z0123456789ABCDEFGHIJ"] |
| + steering_record_names = ["*.example.com"] |
| + alerts_email = "ops@example.com" |
| + } |
| + expect_failures = [aws_iam_role_policy.host_managed_fleets] |
| +} |
| + |
| +# Fleet users share the boundary. The conversion switch adds the two multipart |
| +# actions to the store's object statement and leaves the fleet statements alone. |
| +run "store_conversion_leaves_the_fleet_boundary_alone" { |
| + command = plan |
| + variables { |
| + managed_fleets_enabled = true |
| + managed_fleets_regions = { |
| + "eu-west-1" = { |
| + image = "ami-0123456789abcdef0" |
| + subnets = ["subnet-0123456789abcdef0", "subnet-0123456789abcdef1"] |
| + security_groups = ["sg-0123456789abcdef0"] |
| + instance_types = ["t4g.small", "t4g.medium"] |
| + } |
| + } |
| + store_bucket_prefix = "carlos-store-test-" |
| + store_conversion = true |
| + } |
| + assert { |
| + condition = jsondecode(aws_iam_policy.store_user_boundary[0].policy).Statement == concat( |
| + [ |
| + { Effect = "Allow", Action = ["s3:ListBucket", "s3:GetBucketLocation"], Resource = "arn:aws:s3:::carlos-store-test-*" }, |
| + { Effect = "Allow", Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts"], Resource = "arn:aws:s3:::carlos-store-test-*/*" }, |
| + ], |
| + jsondecode(file("../../../internal/awsmanaged/testdata/managed-boundary-policy.json")).Statement, |
| + ) |
| + error_message = "with both features on the boundary is the store statements with multipart, followed by the unchanged fleet fixture" |
| + } |
| +} |
| + |
| # ---- refused configurations: each fails the plan before any resource ---- |
| run "bad_empty_deployment" { |
diff --git a/infra/modules/region-host/tests/store_conversion.tftest.hcl b/infra/modules/region-host/tests/store_conversion.tftest.hcl| new file mode 100644 |
| index 000000000..7e2f1e9e3 |
| --- /dev/null |
| +++ b/infra/modules/region-host/tests/store_conversion.tftest.hcl |
| @@ -0,0 +1,199 @@ |
| +# Plan-time tests for the media conversion grant. mock_provider means no AWS |
| +# account and no credentials: these assert what the module WOULD create. |
| +# |
| +# The statements are picked out by Effect and compared whole, so a statement |
| +# that is missing or extra fails an assertion instead of an index lookup. |
| +mock_provider "aws" {} |
| + |
| +override_data { |
| + target = data.aws_vpcs.default |
| + values = { ids = ["vpc-0aaaaaaaaaaaaaaaa"] } |
| +} |
| + |
| +# The termination queue's ARN feeds an EventBridge target, which the provider |
| +# validates as an ARN; the mock's random string is not one. |
| +override_resource { |
| + target = aws_sqs_queue.terminations |
| + values = { arn = "arn:aws:sqs:eu-west-1:123456789012:carlos-test-host-terminations" } |
| +} |
| + |
| +variables { |
| + name = "carlos-test-ie" |
| + sg_description = "carlos test host" |
| + iam_name = "carlos-test-host" |
| + instance_type = "t4g.small" |
| + root_volume_size = 20 |
| + user_data = "#!/bin/sh\n" |
| + deployment_bucket_arn = "arn:aws:s3:::carlos-test-platform" |
| + data_bucket_arn = "arn:aws:s3:::carlos-test-ie" |
| + ssm_parameter_arn = "arn:aws:ssm:eu-west-1:123456789012:parameter/carlos/*" |
| + store_bucket_prefix = "carlos-store-test-" |
| +} |
| + |
| +# Off, the boundary must render the very bytes it rendered before the switch |
| +# existed: every store user in the account is bound to this document. |
| +run "off_by_default" { |
| + command = plan |
| + assert { |
| + condition = length(aws_iam_role_policy.host_store_conversion) == 0 |
| + error_message = "store_conversion defaults to false and must create nothing" |
| + } |
| + assert { |
| + condition = aws_iam_policy.store_user_boundary[0].policy == "{\"Statement\":[{\"Action\":[\"s3:ListBucket\",\"s3:GetBucketLocation\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:s3:::carlos-store-test-*\"},{\"Action\":[\"s3:GetObject\",\"s3:PutObject\",\"s3:DeleteObject\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:s3:::carlos-store-test-*/*\"}],\"Version\":\"2012-10-17\"}" |
| + error_message = "with store_conversion off the boundary must stay byte for byte what it was" |
| + } |
| +} |
| + |
| +run "on_grants_exactly_the_nine_bucket_settings_actions" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + } |
| + assert { |
| + condition = length(aws_iam_role_policy.host_store_conversion) == 1 |
| + error_message = "store_conversion = true must create the conversion policy" |
| + } |
| + assert { |
| + condition = aws_iam_role_policy.host_store_conversion[*].name == ["carlos-test-host-store-conversion"] |
| + error_message = "the policy is named <iam_name>-store-conversion" |
| + } |
| + assert { |
| + condition = [ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st if st.Effect == "Allow" |
| + ] == [{ |
| + Effect = "Allow" |
| + Action = [ |
| + "s3:GetBucketPolicy", |
| + "s3:GetEncryptionConfiguration", |
| + "s3:GetBucketVersioning", |
| + "s3:GetBucketCORS", |
| + "s3:PutBucketCORS", |
| + "s3:GetLifecycleConfiguration", |
| + "s3:PutLifecycleConfiguration", |
| + "s3:GetBucketTagging", |
| + "s3:PutBucketTagging", |
| + ] |
| + Resource = "arn:aws:s3:::carlos-store-test-*" |
| + }] |
| + error_message = "one Allow: exactly the nine actions internal/mediaaws calls, on buckets under the store prefix and nothing else" |
| + } |
| + assert { |
| + condition = length(flatten([ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st.Action if st.Effect == "Allow" |
| + ])) == 9 |
| + error_message = "the grant is nine actions" |
| + } |
| +} |
| + |
| +# A prefix such as carlos- also matches carlos-<deployment>-<acct>, and a |
| +# lifecycle write replaces the whole configuration, so the deployment's own |
| +# buckets are refused by name. |
| +run "on_denies_settings_writes_on_the_deployment_buckets" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + } |
| + assert { |
| + condition = [ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st if st.Effect == "Deny" |
| + ] == [{ |
| + Effect = "Deny" |
| + Action = ["s3:PutBucketCORS", "s3:PutLifecycleConfiguration", "s3:PutBucketTagging"] |
| + Resource = ["arn:aws:s3:::carlos-test-platform", "arn:aws:s3:::carlos-test-ie"] |
| + }] |
| + error_message = "one Deny: the three settings writes, on the deployment bucket and the data bucket" |
| + } |
| +} |
| + |
| +run "the_deny_holds_when_the_prefix_matches_the_deployment_buckets" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + store_bucket_prefix = "carlos-" |
| + } |
| + assert { |
| + condition = [ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st.Resource if st.Effect == "Allow" |
| + ] == ["arn:aws:s3:::carlos-*"] |
| + error_message = "the Allow follows the store prefix" |
| + } |
| + assert { |
| + condition = [ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st.Resource if st.Effect == "Deny" |
| + ] == [["arn:aws:s3:::carlos-test-platform", "arn:aws:s3:::carlos-test-ie"]] |
| + error_message = "a prefix that matches the deployment's buckets must still be refused on them" |
| + } |
| +} |
| + |
| +# An empty ARN in a Resource list is a policy IAM refuses, so it is left out, |
| +# and a Deny with nothing to name is left out whole. |
| +run "the_deny_skips_an_empty_deployment_bucket" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + deployment_bucket_arn = "" |
| + } |
| + assert { |
| + condition = [ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st.Resource if st.Effect == "Deny" |
| + ] == [["arn:aws:s3:::carlos-test-ie"]] |
| + error_message = "with no deployment bucket the Deny names the data bucket alone" |
| + } |
| +} |
| + |
| +run "the_deny_skips_an_empty_data_bucket" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + data_bucket_arn = "" |
| + } |
| + assert { |
| + condition = [ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st.Resource if st.Effect == "Deny" |
| + ] == [["arn:aws:s3:::carlos-test-platform"]] |
| + error_message = "with no data bucket the Deny names the deployment bucket alone" |
| + } |
| +} |
| + |
| +run "no_deny_when_there_is_no_bucket_to_name" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + deployment_bucket_arn = "" |
| + data_bucket_arn = "" |
| + } |
| + assert { |
| + condition = length([ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st if st.Effect == "Deny" |
| + ]) == 0 |
| + error_message = "a Deny with an empty Resource list is not a valid policy" |
| + } |
| + assert { |
| + condition = length([ |
| + for st in flatten([for p in aws_iam_role_policy.host_store_conversion : jsondecode(p.policy).Statement]) : st if st.Effect == "Allow" |
| + ]) == 1 |
| + error_message = "the Allow stays when there is nothing to deny" |
| + } |
| +} |
| + |
| +# On, the boundary gains the two multipart actions on the object statement and |
| +# not one other byte. |
| +run "on_adds_only_the_multipart_actions_to_the_boundary" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + } |
| + assert { |
| + condition = aws_iam_policy.store_user_boundary[0].policy == "{\"Statement\":[{\"Action\":[\"s3:ListBucket\",\"s3:GetBucketLocation\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:s3:::carlos-store-test-*\"},{\"Action\":[\"s3:GetObject\",\"s3:PutObject\",\"s3:DeleteObject\",\"s3:AbortMultipartUpload\",\"s3:ListMultipartUploadParts\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:s3:::carlos-store-test-*/*\"}],\"Version\":\"2012-10-17\"}" |
| + error_message = "with store_conversion on the boundary is the old document plus the two multipart actions on the object statement" |
| + } |
| +} |
| + |
| +run "refused_without_a_store_prefix" { |
| + command = plan |
| + variables { |
| + store_conversion = true |
| + store_bucket_prefix = "" |
| + } |
| + expect_failures = [aws_iam_role_policy.host_store_conversion] |
| +} |
diff --git a/infra/modules/region-host/variables.tf b/infra/modules/region-host/variables.tf| index 2458261ac..b06b44e71 100644 |
| --- a/infra/modules/region-host/variables.tf |
| +++ b/infra/modules/region-host/variables.tf |
| @@ -300,6 +300,12 @@ variable "store_scanning" { |
| default = false |
| } |
| +variable "store_conversion" { |
| + description = "Let this host's role check and set the bucket settings media conversion and browser uploads rely on, for buckets under store_bucket_prefix, and let store users list and abort their multipart uploads. Off by default: the role gets no new grant and the store user boundary does not change. Set it only on the box that runs the console, together with CARLOS_STORE_CONVERSION=1 on the console. Requires store_bucket_prefix." |
| + type = bool |
| + default = false |
| +} |
| + |
| variable "relay" { |
| description = "Open the platform STUN/TURN relay's ports (udp+tcp 3478, udp 49152-65535). Off by default; a box also needs /etc/carlos/relay-masters before the unit starts." |
| type = bool |
diff --git a/internal/objstore/termination_credentials_test.go b/internal/objstore/termination_credentials_test.go| index 5d0774a31..4b36b6657 100644 |
| --- a/internal/objstore/termination_credentials_test.go |
| +++ b/internal/objstore/termination_credentials_test.go |
| @@ -22,7 +22,7 @@ func TestTerminationProofCredentials(t *testing.T) { |
| if err := json.Unmarshal([]byte(storePolicyJSON("arn:aws:s3:::tenant-store", nil, deny)), &p); err != nil { |
| t.Fatal(err) |
| } |
| - for _, op := range []string{"s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:PutObjectTagging"} { |
| + for _, op := range []string{"s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:PutObjectTagging", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts"} { |
| allowed := false |
| for _, s := range p.Statement { |
| if s.Effect != "Allow" { |
| @@ -153,7 +153,7 @@ func boundaryResources(t *testing.T, tf, open string) []string { |
| // that no store, app or fleet credential reaches the termination proof. |
| var terminationBoundaryWant = map[string]string{ |
| "store boundary policy": "0fd3b69dba6c26c85fc98947db4ecc879d13a39aba7eee318029a743d75b1c18", |
| - "store boundary statements": "f4f29e497fbd5afa34d88dfd94692f480efa733c927698c9d6148c7b5fdff2c9", |
| + "store boundary statements": "3a34ff61746c2d6438a3e902c36c32dc33740b1f82b13cae35bb7ec43ca0f2bc", |
| "fleet boundary statements": "9f1f81aaff4e195096dae1b1c086d180071d43c76ef8750b684ea88da862b4c5", |
| "fleet bucket local": "2825c8094b6fb80aa0a25683134a22a5efb59a1a02227f528dba9a9ecdb15197", |
| "fleet object locals": "db659c3347257caaec610263af06c2126ce8a9b3e96f7c4e88ede9518a2ec6c7", |