You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose adding support for a condition block in the IAM policy statement for privileged_principal_arns within the terraform-aws-s3-bucket module. This enhancement will allow users to specify conditions for access, improving security and flexibility.
Current Behavior:
Currently, the module allows specifying privileged_principal_arns, which grants specified principals certain permissions on the S3 bucket. However, there is no capability to add conditions to these permissions, potentially leading to overly broad access.
Expected Behavior
Proposed Change:
Enable the addition of a condition block in the IAM policy for privileged_principal_arns. This would allow users to define conditions under which the specified principals are granted access.
In this example, the condition block restricts access to the S3 bucket to requests originating from a specific VPC endpoint, enhancing security.
Expected Outcome:
The terraform-aws-s3-bucket module will support an additional, optional condition argument for policies related to privileged_principal_arns. This will allow for more granular and secure access control.
Use Case
A company has deployed an AWS S3 bucket for storing sensitive documents. They want to ensure that this bucket is only accessible from their internal AWS VPC to enhance security. The bucket is managed using the terraform-aws-s3-bucket module from CloudPosse. However, the current version of the module does not support adding conditions to the IAM policies for privileged_principal_arns, which is necessary for restricting access based on the source VPC endpoint.
Describe Ideal Solution
Add a new env variable called privileged_principal_arns_with_condition and block into main.tf under data "aws_iam_policy_document" "bucket_policy" block.
Describe the Feature
Feature Request:
I propose adding support for a condition block in the IAM policy statement for privileged_principal_arns within the terraform-aws-s3-bucket module. This enhancement will allow users to specify conditions for access, improving security and flexibility.
Current Behavior:
Currently, the module allows specifying privileged_principal_arns, which grants specified principals certain permissions on the S3 bucket. However, there is no capability to add conditions to these permissions, potentially leading to overly broad access.
Expected Behavior
Proposed Change:
Enable the addition of a condition block in the IAM policy for privileged_principal_arns. This would allow users to define conditions under which the specified principals are granted access.
Use Case Example:
In this example, the condition block restricts access to the S3 bucket to requests originating from a specific VPC endpoint, enhancing security.
Expected Outcome:
The terraform-aws-s3-bucket module will support an additional, optional condition argument for policies related to privileged_principal_arns. This will allow for more granular and secure access control.
Use Case
A company has deployed an AWS S3 bucket for storing sensitive documents. They want to ensure that this bucket is only accessible from their internal AWS VPC to enhance security. The bucket is managed using the terraform-aws-s3-bucket module from CloudPosse. However, the current version of the module does not support adding conditions to the IAM policies for privileged_principal_arns, which is necessary for restricting access based on the source VPC endpoint.
Describe Ideal Solution
Add a new env variable called
privileged_principal_arns_with_condition
and block intomain.tf
underdata "aws_iam_policy_document" "bucket_policy"
block.Alternatives Considered
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: