Skip to content

Route53: document use of "region" field #56

Closed

Description

@stephen-dexda

The Route53 docs and API reference list a region field for the route53 solver, with the latter saying "Always set the region when using AccessKeyID and SecretAccessKey".

It's not clear what the value of this should correspond to, since IAM users and access keys are not associated with a region?

Activity

  1. TBBle commented on Apr 23, 2020

    @TBBle
    Contributor

    Looking at the source, it's actually not needed if you are using ambient credentials, e.g. a Service Account with appropriate IAMs Role; it will happily take and ignore an empty string in this case, which should use the ambient credential's region anywhere that's needed.

    However, the CRD rejects that, so I couldn't test that it actually works, or if AWS actually always requires an explicit region here for some reason.

  2. TBBle commented on Apr 23, 2020

    @TBBle
    Contributor

    Looking at cert-manager/cert-manager#1917, it appears region's "requiredness" persisted from when the credentials were mandatory. That's probably what the comment meant?

  3. irbekrm commented on Apr 15, 2021

    @irbekrm
    Contributor

    /priority important-longterm

  4. added
    priority/important-longterm
    on Apr 15, 2021
  5. added
    documentation
    on Apr 15, 2021
  6. wallrj commented on Feb 14, 2023

    @wallrj
    Member

    @stephen-dexda @TBBle Thanks for reporting and commenting on this. It's been a long time, but if either of you have time to improve the documentation, please create a PR and find me on #cert-manager-dev in Slack for code review.

  7. TBBle commented on Feb 14, 2023

    @TBBle
    Contributor

    I'm not in a position to put up PRs, but I'll just highlight that although this bug was filed on the website repo, I think it's actually revealed a bug in the Issuer/ClusterIssuer CRDs themselves that the region field is required, which (if I understand my own earlier comment correctly) blocks the empty string value that the code is correctly set up to handle.

    So right now, a documentation update would have to be "Region is required, and must be provided even if both accessKeyID and accessKeyIDSecretRef are not provided."

    Per https://docs.aws.amazon.com/general/latest/gr/r53.html (to answer the original question) it apparently needs to be us-east-1 or in some cases cn-northwest-1. (It's been literally years and I'm no longer in that job so can't check, so perhaps it works no matter what region you specify, or perhaps I already used us-east-1 here but for unrelated reasons; I don't think I knew about this page before).

    That AWS doc also suggests that leaving the region and endpoint empty in the request would be valid too, so perhaps that field should just be dropped entirely, unless there's a need for manually-specified region elsewhere in the Route53 DNS-01 implementation that I'm overlooking.

    Edit: A quick poke in the cert-manager issue repo suggests people were using their own regions, and things were working, so I guess it's not required that the value be us-east-1. And cert-manager/cert-manager#5455 suggests that the region does (or should) matter, so that the correct STS endpoint is used for the role-assuming when that issue is itself resolved.

  8. wallrj commented on Sep 26, 2024

    @wallrj
    Member

    A beta-release is now available which contains the fix for this issue. Please test and feedback if you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationpriority/important-longterm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions