Add cross-account AssumeRole support for Route 53 DNS validation.#749
Open
VA6DAH wants to merge 1 commit into
Open
Add cross-account AssumeRole support for Route 53 DNS validation.#749VA6DAH wants to merge 1 commit into
VA6DAH wants to merge 1 commit into
Conversation
Use STS AssumeRole so Certify can update Route 53 hosted zones in a different AWS account from stored IAM credentials. Assume-role settings (role ARN, session name, optional external ID) live in stored credentials; certificates keep zone ID and propagation delay only. Includes credential UI with conditional field visibility, DNS provider credential detection fixes for API JSON deserialization, MSDNS dropdown freeze guard, SDK pinning for AWSSDK.SecurityToken, and unit tests for parameter classification.
Contributor
|
Thanks for your proposal, it's much appreciated. A few things:
|
Author
|
Hey Chris, Yes. This was written with curser. My initial attempt only touched the route 53 provider but that the change caused the provider to disappear entirely from the list. The only time I got it to work without touching other components all the new fields appeared in the DNS-01 configuration on the certificate config instead of within the credential config.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional STS AssumeRole support to the Amazon Route 53 DNS-01 provider so Certify can update hosted zones in a different AWS account than the IAM user whose access keys are stored in credentials.
Assume-role settings live in stored credentials (access keys, role ARN, session name, optional external ID). Certificate configuration keeps only zone-specific fields (hosted zone ID, propagation delay).
Includes UI/model improvements so Route 53 appears correctly in the credential provider list, assume-role fields show/hide based on a checkbox, and other DNS providers are not regressed.
Why this matters (especially in AWS Organizations)
In many AWS Organizations, DNS is centralized in a shared/network account while applications and certificate workloads run in member accounts. Route 53 hosted zones often cannot (and should not) be managed from the same account that runs the app server.
Without AssumeRole, operators typically must either:
AssumeRole is the standard AWS pattern for this:
sts:AssumeRoleonly.sts:AssumeRoleon one role. Target role: scopedroute53:ChangeResourceRecordSetson specific hosted zones.What changed
Route 53 provider
sts:AssumeRolewith stored access keys, then creates the Route 53 client with temporary session credentials.CertifyTheWeb), and optional External ID.AWSSDK.SecurityToken(pinned with alignedAWSSDK.Core/AWSSDK.Route53versions).AWS Route 53 Credentials
UI / model
ProviderParameter.VisibleWhenParameterKey/Value— conditional field visibility (assume-role sub-fields in Edit Credential).ProviderParameterCredentialFilter— reliable detection of DNS providers/fields that support stored credentials (API JSON omits defaultIsCredential=true).ProviderParameterVisibility— shared show/hide helper.EditCredential— assume-role validation on save; fix provider list refresh when empty.ChallengeConfigItem— certificate UI shows non-credential parameters only; visibility refresh guarded to avoid MSDNS dropdown freeze.Tests
ProviderParameterCredentialFilterTests— Cloudflare, Route 53, DnsMadeEasy, MSDNS parameter classification.Screenshots
Test plan
Notes for reviewers
AWSSDK.SecurityTokenadded alongside pinned Core/Route53 versions to avoidTypeLoadExceptionat plugin load.Directory.Build.props→ 7.0.22.0: local version bump for screenshot builds — happy to revert in a follow-up commit if maintainers prefer a separate version commit.Request Certificate Log