Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Incorrect attribute_condition in 'cowip' Workload Identity Pool Provider #22

Description

@kishan-dhrangadhariya

Description:
The attribute_condition for the resource:
module.multipartykeyhosting_secondary.module.workload_identity_pool.google_iam_workload_identity_pool_provider.workload_identity_pool appears to be incorrect.

Affected Files:

  • coordinator/terraform/gcp/environments_mp_secondary/demo/mpkhs_secondary/mpkhs_secondary.tf
  • coordinator/terraform/gcp/applications/multipartykeyhosting_secondary/main.tf
  • coordinator/terraform/gcp/modules/workloadidentitypoolprovider/main.tf

Current Value:

attribute_condition = (var.enable_attestation ?
    <<-EOT
    assertion.swname == '${var.assertion_tee_swname}'
    && ${jsonencode(var.assertion_tee_support_attributes)}.all(a, a in assertion.submods.confidential_space.support_attributes)
    && (${join(" || ", [for allowed_wip_iam_principal in var.allowed_wip_iam_principals : "'${allowed_wip_iam_principal}' in assertion.google_service_accounts"])})
    EOT
    : "")

Proposed Fix:

attribute_condition = (var.enable_attestation ? <<-EOT
    assertion.swname == "${var.assertion_tee_swname}"
    && ${jsonencode(var.assertion_tee_support_attributes)}.all(a, a in assertion.submods.confidential_space.support_attributes)
    ${length(var.allowed_wip_iam_principals) > 0 ? "&& (" + join(" || ", [for allowed_wip_iam_principal in var.allowed_wip_iam_principals : "'${allowed_wip_iam_principal}' in assertion.google_service_accounts"]) + ")" : ""}
    EOT
    : "")

Potential Impact:

The file coordinator/terraform/gcp/modules/workloadidentitypoolprovider/main.tf is also referenced in the following resources:

  • coordinator/terraform/gcp/environments_mp_secondary/demo/operator_wipp/operator_wipp.tf
  • coordinator/terraform/gcp/applications/operator_workloadidentitypoolprovider/main.tf
  • coordinator/terraform/gcp/environments_mp_primary/demo/operator_wipp/operator_wipp.tf
  • coordinator/terraform/gcp/applications/operator_workloadidentitypoolprovider/main.tf

Applying the proposed fix will break the above-mentioned resources, which rely on the current implementation.

Next Steps:

Avoid referencing coordinator/terraform/gcp/modules/workloadidentitypoolprovider/main.tf from coordinator/terraform/gcp/environments_mp_secondary/demo/mpkhs_secondary/mpkhs_secondary.tf
Create a different implementation for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions