Repository navigation
feat(infra): isolate runner lake access by tenant (#550) - #1027
Merged
Merged
Conversation
athvin
force-pushed
the
issue/550-tenant-runner-identity
branch
from
November 9, 2026 06:31
14b9c21 to
786318e
Compare
Contributor
terraform plan
dev — 6 to add, 1 to changedata.aws_iam_policy_document.eso: Reading...
data.aws_caller_identity.current: Reading...
module.network.data.aws_availability_zones.available: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=1725605485]
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
module.eks.data.aws_iam_policy_document.node_trust: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Reading...
module.network.data.aws_region.current: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_iam_policy_document.obs_pod_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_iam_policy_document.er_api_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_region.current: Reading...
data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=4006586444]
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=3111493560]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=2205495074]
data.aws_iam_policy_document.bedrock_invoke: Reading...
data.aws_iam_policy_document.bedrock_invoke: Read complete after 0s [id=3601248236]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=2921565705]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_dev_trust: Reading...
data.aws_iam_policy_document.ci_deploy_dev_trust: Read complete after 0s [id=4060172364]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.ci_deploy_dev: Reading...
data.aws_iam_policy_document.ci_deploy_dev: Read complete after 0s [id=1754478413]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
# aws_iam_role_policy.er_runner_lake will be updated in-place
~ resource "aws_iam_role_policy" "er_runner_lake" {
id = "er-dev-runner-pod:er-dev-runner-lake"
name = "er-dev-runner-lake"
~ policy = jsonencode(
~ {
~ Statement = [
~ {
~ Action = [
- "s3:PutObject",
- "s3:ListMultipartUploadParts",
- "s3:GetObject",
- "s3:DeleteObject",
- "s3:AbortMultipartUpload",
] -> "s3:GetBucketLocation"
~ Resource = "arn:aws:s3:::er-dev-lake-797781631727/*" -> "arn:aws:s3:::er-dev-lake-797781631727"
~ Sid = "LakeObjects" -> "BucketLocationOnly"
# (1 unchanged attribute hidden)
},
- {
- Action = [
- "s3:ListBucketMultipartUploads",
- "s3:ListBucket",
- "s3:GetBucketLocation",
]
- Effect = "Allow"
- Resource = "arn:aws:s3:::er-dev-lake-797781631727"
- Sid = "LakeList"
},
- {
- Action = [
- "kms:GenerateDataKey*",
- "kms:Decrypt",
]
- Effect = "Allow"
- Resource = "arn:aws:kms:us-east-2:797781631727:key/0c226b8f-de72-4f5f-b50b-0cf1391bc325"
- Sid = "LakeKey"
},
]
# (1 unchanged attribute hidden)
}
)
# (2 unchanged attributes hidden)
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["ci/isolation-probe-a"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-dev"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "ci"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-93ccc8f077814e800e7a"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["ci/isolation-probe-b"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-dev"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "ci"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-c6090ab88ffa4d30bb25"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_iam_role.tenant["ci/isolation-probe-a"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-dev"
+ "aws:RequestTag/kubernetes-namespace" = "ci"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-93ccc8f077814e800e7a"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-dev-runner-cdd932a93c2249b8a621"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role.tenant["ci/isolation-probe-b"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-dev"
+ "aws:RequestTag/kubernetes-namespace" = "ci"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-c6090ab88ffa4d30bb25"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-dev-runner-20ada9dc46d46007ab8d"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["ci/isolation-probe-a"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727/_isolation/probe-a/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-a/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-dev-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/0c226b8f-de72-4f5f-b50b-0cf1391bc325",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["ci/isolation-probe-b"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727/_isolation/probe-b/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-b/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-dev-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-dev-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/0c226b8f-de72-4f5f-b50b-0cf1391bc325",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
Plan: 6 to add, 1 to change, 0 to destroy.
prod — 6 to add, 1 to changedata.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
module.ses.data.aws_region.current: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.node_trust: Reading...
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.pod_trust: Reading...
module.network.data.aws_region.current: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
module.network.data.aws_availability_zones.available: Reading...
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=1193716550]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=3960055703]
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=2978074842]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=1033619361]
module.ses.data.aws_iam_policy_document.send: Reading...
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
module.ses.data.aws_iam_policy_document.send: Read complete after 0s [id=3767633194]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 0s [id=3634844169]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_prod_trust: Reading...
data.aws_iam_policy_document.ci_deploy_prod_trust: Read complete after 0s [id=4060172364]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
# aws_iam_role_policy.er_runner_lake will be updated in-place
~ resource "aws_iam_role_policy" "er_runner_lake" {
id = "er-prod-runner-pod:er-prod-runner-lake"
name = "er-prod-runner-lake"
~ policy = jsonencode(
~ {
~ Statement = [
~ {
~ Action = [
- "s3:PutObject",
- "s3:ListMultipartUploadParts",
- "s3:GetObject",
- "s3:DeleteObject",
- "s3:AbortMultipartUpload",
] -> "s3:GetBucketLocation"
~ Resource = "arn:aws:s3:::er-prod-lake-797781631727/*" -> "arn:aws:s3:::er-prod-lake-797781631727"
~ Sid = "LakeObjects" -> "BucketLocationOnly"
# (1 unchanged attribute hidden)
},
- {
- Action = [
- "s3:ListBucketMultipartUploads",
- "s3:ListBucket",
- "s3:GetBucketLocation",
]
- Effect = "Allow"
- Resource = "arn:aws:s3:::er-prod-lake-797781631727"
- Sid = "LakeList"
},
- {
- Action = [
- "kms:GenerateDataKey*",
- "kms:Decrypt",
]
- Effect = "Allow"
- Resource = "arn:aws:kms:us-east-2:797781631727:key/aac8b63d-fd14-4c13-896e-ceaa41dcf0ce"
- Sid = "LakeKey"
},
]
# (1 unchanged attribute hidden)
}
)
# (2 unchanged attributes hidden)
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["app/isolation-probe-a"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-prod"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "app"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-93ccc8f077814e800e7a"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_eks_pod_identity_association.tenant["app/isolation-probe-b"] will be created
+ resource "aws_eks_pod_identity_association" "tenant" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-prod"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "app"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "er-runner-c6090ab88ffa4d30bb25"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
}
# module.tenant_runners.aws_iam_role.tenant["app/isolation-probe-a"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-prod"
+ "aws:RequestTag/kubernetes-namespace" = "app"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-93ccc8f077814e800e7a"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-prod-runner-79b3a4bd146119bda02f"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role.tenant["app/isolation-probe-b"] will be created
+ resource "aws_iam_role" "tenant" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-prod"
+ "aws:RequestTag/kubernetes-namespace" = "app"
+ "aws:RequestTag/kubernetes-service-account" = "er-runner-c6090ab88ffa4d30bb25"
}
}
+ Effect = "Allow"
+ Principal = {
+ Service = "pods.eks.amazonaws.com"
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "er-prod-runner-9ba07546e1359bb14800"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["app/isolation-probe-a"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727/_isolation/probe-a/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-a/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-prod-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/aac8b63d-fd14-4c13-896e-ceaa41dcf0ce",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# module.tenant_runners.aws_iam_role_policy.lake["app/isolation-probe-b"] will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "tenant-lake"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727/_isolation/probe-b/*",
]
+ Sid = "TenantObjects"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "_isolation/probe-b/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "TenantList"
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-prod-lake-797781631727",
]
+ Sid = "BucketLocation"
},
+ {
+ Action = [
+ "kms:Decrypt",
+ "kms:GenerateDataKey",
]
+ Condition = {
+ StringEquals = {
+ "kms:EncryptionContext:aws:s3:arn" = "arn:aws:s3:::er-prod-lake-797781631727"
+ "kms:ViaService" = "s3.us-east-2.amazonaws.com"
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:kms:us-east-2:797781631727:key/aac8b63d-fd14-4c13-896e-ceaa41dcf0ce",
]
+ Sid = "LakeKeyViaS3"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
Plan: 6 to add, 1 to change, 0 to destroy.
|
athvin
marked this pull request as ready for review
November 9, 2026 06:52
athvin
force-pushed
the
issue/550-tenant-runner-identity
branch
4 times, most recently
from
November 9, 2026 09:45
f9b9f8c to
e2c3ffe
Compare
athvin
force-pushed
the
issue/550-tenant-runner-identity
branch
from
November 9, 2026 09:50
e2c3ffe to
dc37858
Compare
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #550
What
Give each enrolled org a distinct runner ServiceAccount and prefix-scoped Pod Identity role, driven by one Terraform/Helm registry. The executor selects it from the claimed task org; the shared fallback loses lake object access.
Why
The shared runner role currently permits access across the lake bucket. Tenant A must receive AccessDenied when explicitly handed tenant B’s prefix.
Proof
Full local
make checkpassed after incorporating the CI-tool changes. Full Rust CI 42594625315 passed every product gate. Later frontend-only rebases and one empty dispatch-recovery commit left the six topic patches unchanged; final headd24cf752satisfied all 15 required contexts with no failed detect or pending run, including Rust 42596948629 and infra 42596948627.Real Postgres/DuckLake tests, six Terraform policy tests, 49 helper tests, Helm/schema checks and adversarial probe tests pass. Dev/prod each plan +6/~1/-0; core/state-backend unchanged. Merged as
c892d9eaat 09:59:07 UTC; application and live acceptance are being verified in the ledger below.Risk & rollback
Unenrolled orgs retain local/EFS execution with no S3 object permissions. Enrollment must match provisioning’s data prefix. CI owns IAM application and the bounded fixture probe. Both fixed synthetic marker keys remain per environment; overwritten versions follow the bucket lifecycle. No live AWS success is claimed yet. Revert the merge to restore the prior shared identity behavior.
Post-merge ledger
Closed by: Codex · session
01a1be1a-66a7-72f3-8e78-32c20c5e0da9onMac-87.lan· 2026-11-10T18:58:47.558166+00:00 — final dev/prod live-boundary follow-up resolved through #1079.3c09bbc2bc1c781978cc205c871e35d70d88e2ea: Rust 42610044690, infra 42610044722 (all applies), frontend 42610044721, images 42610044701 and devcontainer 42610044786 succeeded. Watched through 2026-11-09T12:04:34Z without a new push-workflow failure. The separately dispatched dev runner acceptance probe remains blocked, recorded below/in feat(infra): isolate runner lake access by tenant (#550) #1027.images— run 42597514271 succeeded for the merge SHA; the API image was built and unchanged web image reuse passed the source comparison.deploy— descendant06bc5f0d31879af9c3007d814ffcb1acbbb9d5e7contains this merge (ancestry verified). Deploy 42639904666 cut prod to blue and dev to green. Independent CloudWatch Logs Insights readback founder-server listeningfrom prodapp.web-api-blue-59f8bbcbbb-vhd24.er-serverat 15:00:11.353Z (query1289ab65-8954-43c5-bc79-9524c430c81b) and devci.web-api-green-557958f6cb-csvzk.er-serverat 14:59:50.436Z (queryfd2d28bc-d3f6-4655-aecc-c985b1f65ca4), 2026-11-09.f2baff25); the live boundary is proven in both environments.Specific to this change
Independent fallback IAM policy readback — production-readiness audit 2026-11-09 used
er-readonlyto read bother-prod-runner-lakeander-dev-runner-lake. Each shared fallback role now grants onlys3:GetBucketLocationon its own lake bucket; neither grants object access. The earlier local read blockage is resolved.Terraform applied the reviewed tenant associations/prefix policies and fallback narrowing in both environments — main infra run 42610044722 at descendant
3c09bbc2, all core/dev/prod apply jobs successful. The exact merge rerun 42597514286 remains stuck in GitHub rerun scheduling; the later applied main includes Per-tenant runner ServiceAccounts #550.Registry enrollment and two tenant ServiceAccounts without runner RBAC verified in both environments by runner-isolation run 42611149254; both dispatchers successfully rolled out before the probe.
Live S3 boundary — runner isolation 42880252276 passed dev and prod on
2354ff96at 2026-11-10T18:57Z after fix(infra): repair development OpenAPI schema serialization (#1058) #1079 repaired the development metrics-server schema. Both fixture tenants in each environment passed own-prefix put/get/list and all cross-prefix put/get/list/delete plus bucket-root-list denials. Jobs and ConfigMaps were cleaned up. Strict validation and all acceptance assertions were unchanged.Context — plan, discoveries, measurements, files
Plan
Selection: #521/#518 depend on the public API/configuration work still in Todo; #516 retains peer-owned #803; #514 depends on #511/shared contracts and its remaining children are Todo. #550 is the first eligible unclaimed P1 item. PR #1019 is merged, deployed and verified; its ledger is closed.
Files expected: infra/terraform shared runner-identity module and dev/prod wiring; shared tenant-runner configuration; er-platform ServiceAccounts/task template/dispatcher config; er-server executor and existing tests; scripts/ci deployment/probe helpers and workflow; infra-platform/AWS operations/engine references as needed.
Discoveries
The original live-probe cleanup could produce a false positive: a faster pod removed its own marker before its partner’s GetObject. AWS returns AccessDenied for a missing object without ListBucket permission (GetObject API). The final probe completes both prepare Jobs before either verify Job and retains both fixed markers. An independent verifier reproduced old 7b450db passing despite a foreign GetObject grant, then confirmed both fixed probes reject it; correct-policy probes pass, and markers survive success/failure. The verification used a temporary simulated S3 store, not live AWS. Fresh reuse review found no candidates. Eight Job manifests validate, the probe fault suite passes, and make skills-check passes. These probe changes are carried unchanged in final head
1aa15727; live AWS acceptance remains pending.The issue’s statement that Rust cannot open an S3 lake is also stale: #792 added ObjectStoreConfig and the credential-chain attach path, confirmed in
dedupe-coreand theer-cli/tests/s3_lake.rsregression. S3-backed orgs must be enrolled with their actual data prefix before using the restricted roles. Local/EFS orgs need no enrollment. The live probe proves the AWS boundary using synthetic fixture orgs; it does not claim to migrate customer lakes.The issue's interim-service-user description is stale: that user has been retired, but the shared er-dev-runner-pod / er-prod-runner-pod roles still grant the entire lake bucket. Before this change, the chart hardcoded er-runner and the typed manifest substitution had no tenant identity field. Provisioning already derives an org prefix and dataset sub-prefixes. The scope here is org/tenant S3 isolation; dataset isolation remains a separate lake boundary.
AWS documentation confirms Pod Identity session tags include cluster ARN, namespace and ServiceAccount; account names alone are not globally unique. Source: https://docs.aws.amazon.com/eks/latest/best-practices/identity-and-access-management.html . No new IAM credential provider or IRSA path is needed.
Measurements
Merged final head
d24cf752asc892d9ea5c89b342aadc64f4f27b8f55b7265513at 09:59:07 UTC. All 15 required contexts satisfied, no failed detect, no unfinished workflow and no active merge bus; final basec47822d3was included. Post-merge watch/apply/deployment/live acceptance now run through the open ledger. The earlier download/dispatch incidents below are historical, not current blockers.Final base refresh includes peer sign-in fix
c47822d3. The six topic patches remain byte-for-byte equivalent. GitHub recorded force-push headdc378582but created zero Actions runs/check suites for more than three minutes; workflows remained active and the PR was mergeable. An empty commitd24cf75225fd4bda48849b5ae1a29d22f4996e30retriggers synchronization without changing the tree. Await exact-head checks before merge. Previous refreshed heade2c3ffe3passed Rust 42595846055 and infra 42595846162; its base difference is only the independent sign-in frontend files.Fresh head
f9b9f8c6: infra 42594625351 succeeds on its initial run. Both dev/prod plans remain +6/~1/-0, core/state-backend unchanged; chart and helper gates pass. Actionlint passes in Rust 42594625315, whose remaining test groups are still running with no failures. The prior download blockers have recovered; no renewed failed-job rerun has been needed.Resumed at the user’s “keep going” instruction on 2026-11-09 at 09:27 UTC. The earlier retry stop is historical: work is authorized to continue with a fresh bounded retry cycle.
mainnow includes the cached, checksum-verified tool installer with bounded curl retries (#1031), an observability deployment fix, and marketing/docs work. The branch rebases cleanly onto8c9111b0b07afc018ae2c56d6137456ca2a07719asf9b9f8c63420d59db7b1b9c520e56360dab3c04f; range-diff confirms all six topic patches unchanged. Fullmake checkpassed on the combined tree (/tmp/tenant-runner-make-check-ci-base.log);f9b9f8c6is pushed and fresh CI is pending. Local provider checksum/signature and actionlint GETs now return HTTP 200; fresh CI still must prove runner recovery.Prior blocked head:
1aa157277220b200d65b6579427168a378c4d483, based onef9ab24f32005d746fb3a52acdc07722dceb7f69. The rebase incorporates only the upstream offline-kubectl hook fix; range-diff confirms all six topic patches unchanged. The working tree is clean.workflow pins (S9)fails, before linting, downloading actionlint with HTTP 504. Both ordinary failed-job retries consumed.make check/tmp/tenant-runner-make-check-hook-base.log.make check-e2e/tmp/tenant-runner-e2e-rebased.log. No product source changed in that rebase.The download failures are external to the assertions, not evidence that the skipped checks passed. Local downloads returned HTTP 200 while CI runners still received 504, so local recovery is insufficient. Existing #849 tracks download resilience. Those earlier allowances were exhausted before the user resumed work; see the current status above. No merge, apply, deployment or live S3 acceptance has occurred.
Fresh-context instrumentation, tier and reuse reviews passed on
5e74b3cd/cd4ddd50; subsequent live-enrollment and probe-ordering deltas received fresh reuse reviews. A separate adversarial verifier reproduced the old probe’s missing-marker false positive and confirmed the final two-phase probe rejects broad foreign GetObject permissions. No SQL review dimension was routed because no SQL/entity declaration changed.The submitted-manifest regression
pg_run_all_dag::lake_maintain_runs_end_to_end_through_the_executorpasses against real Postgres with spoofed org/ServiceAccount parameters. Identity-selection, wildcard-IAM and missing-enrollment regressions were each observed failing before restoring green. Evidence:/tmp/tenant-runner-identity-red.log,/tmp/tenant-runner-iam-red.log,/tmp/tenant-runner-chart-red.log.Read-only IAM baselines confirm the current shared roles still grant bucket-wide object/list and KMS access.
/tmp/tenant-runner-live-expected.jsonrecords expected tenant identities. The local guard rejected kubectl reads; the main-only workflow therefore checks actual rolled-out ServiceAccounts, dispatcher enrollment and absence of runner RBAC before its S3 probes. Fixed synthetic markers are deliberately retained; Jobs and ConfigMaps are cleaned up.Files
infra/terraform/modules/tenant-runner, dev/prod identity wiring, the shared Helm registry/accounts/dispatcher config, the executor and its existing harnesses, the main-only isolation workflow/checkers, and routed infrastructure/security references.Pending apply recovery
The reviewed #1046 infrastructure plan on head
9295aa3df41920831a0a36113e41c8f8e57772aeincludes these still-unapplied tenant roles, Pod Identity associations and fallback-policy narrowing: dev 11 additions/1 change/0 destroys (including its five new observability resources), prod 6 additions/1 change/0 destroys. Infra run 42603861421 succeeded. After #1046 lands and its main apply succeeds, run the existing runner-isolation acceptance workflow; neither the plan nor the earlier successful app deployment establishes live IAM isolation. The original infra rerun 42597514286 remains an Actions queue failure, not successful application.