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

Further tighten IAM permissions for cert-manager DNS01 challenges #15680

Closed
andsens opened this issue Jul 20, 2023 · 2 comments
Closed

Further tighten IAM permissions for cert-manager DNS01 challenges #15680

andsens opened this issue Jul 20, 2023 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@andsens
Copy link
Contributor

andsens commented Jul 20, 2023

/kind feature

Big thumbs up for already tightening the rather loose policy that cert-manager suggests in their guide by restricting the hosted zone. I have a suggestion for tighten it even further. Split up the ChangeResourceRecordSets and ListResourceRecordSets and restrict any changes to TXT records on _acme-challenge.* subdomains.

{
  "Effect": "Allow",
  "Action": "route53:ChangeResourceRecordSets",
  "Resource": "arn:aws:route53:::hostedzone/XXXXXXXXXXXXXX",
  "Condition": {
    "ForAllValues:StringLike":{
      "route53:ChangeResourceRecordSetsNormalizedRecordNames": ["_acme-challenge.*"]
    },
    "ForAllValues:StringEquals":{
      "route53:ChangeResourceRecordSetsRecordTypes": ["TXT"]
    }
  }
}

I modified the policy kops created with the suggested change and it works like a charm :-)

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 20, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2024
@andsens
Copy link
Contributor Author

andsens commented Jan 24, 2024

/remove-lifecycle stale

Might send a PR if I get the time.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2024
andsens added a commit to orbit-online/kops that referenced this issue Mar 18, 2024
This change restricts which record types and domain prefixes
cert-manager is allowed to change for DNS01 acme challenges.

Only _acme-challenge.* TXT records may be created/updated/removed.

Implements kubernetes#15680
andsens added a commit to orbit-online/kops that referenced this issue Mar 19, 2024
This change restricts which record types and domain prefixes
cert-manager is allowed to change for DNS01 acme challenges.

Only _acme-challenge.* TXT records may be created/updated/removed.

Implements kubernetes#15680
@andsens andsens closed this as completed Mar 19, 2024
hakman pushed a commit to hakman/kops that referenced this issue Mar 20, 2024
This change restricts which record types and domain prefixes
cert-manager is allowed to change for DNS01 acme challenges.

Only _acme-challenge.* TXT records may be created/updated/removed.

Implements kubernetes#15680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants