Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DescribeParameter always needs full access #354

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

jaydeland
Copy link
Contributor

@jaydeland jaydeland commented Mar 23, 2023

Description

Just like ListSecrets from Secrets Manager the DecribeParameter action is always required to allow full access

Motivation and Context

With out this the policy will not work when using the external_secrets_ssm_parameter_arns variable

Breaking Changes

no

How Has This Been Tested?

  • I have tested and validated these changes using my fork as a module
  • I have executed pre-commit run -a on my pull request

@jaydeland
Copy link
Contributor Author

pre-commit run -a
Terraform fmt............................................................Passed
Terraform validate.......................................................Passed
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Passed
check for merge conflicts................................................Passed
fix end of files.........................................................Passed

@jaydeland jaydeland changed the title DescribeParameter always needs full access fix: DescribeParameter always needs full access Mar 23, 2023
@jaydeland
Copy link
Contributor Author

@bryantbiggs This is a follow up to: #348

@jaydeland
Copy link
Contributor Author

This is the final policy json when setting external_secrets_ssm_parameter_arns and external_secrets_secrets_manager_arns

{
    "Statement": [
        {
            "Action": "ssm:DescribeParameters",
            "Effect": "Allow",
            "Resource": "*",
            "Sid": ""
        },
        {
            "Action": [
                "ssm:GetParameters",
                "ssm:GetParameter"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:ssm:*:*:parameter/eso/*",
            "Sid": ""
        },
        {
            "Action": "secretsmanager:ListSecrets",
            "Effect": "Allow",
            "Resource": "*",
            "Sid": ""
        },
        {
            "Action": [
                "secretsmanager:ListSecretVersionIds",
                "secretsmanager:GetSecretValue",
                "secretsmanager:GetResourcePolicy",
                "secretsmanager:DescribeSecret"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:secretsmanager:*:*:secret:/eso/*",
            "Sid": ""
        }
    ],
    "Version": "2012-10-17"
}

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had thought it was going to require wildcard, at least we tried to scope it! Thanks for the PR!

@bryantbiggs bryantbiggs merged commit a49f767 into terraform-aws-modules:master Mar 23, 2023
@antonbabenko
Copy link
Member

This PR is included in version 5.14.4 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants