ROSAENG-67407: add Route53 managed-DNS permissions to CPO managed policy #2890
All Vouch review confidence checks passed
Residual risk 0.40 = Change Risk (0.75) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #2890"
general
weight: 0.35
joshbranham
AWS Managed Policy Change: Managed DNS (HCP Control Plane Operator)
1. Overview
Brief Description: Add the Route53 permissions the HCP Control Plane Operator (CPO) needs for managed DNS, where the CPO creates and reconciles the cluster's Route53 hosted zones (the private
.hypershift.localzone and the public and private ingress zones) instead of requiring them to be pre-created externally.| Field | Value |
|---|---|
| Enhancement | managed-ingress-dns-for-aws-hosted-control-planes |
| Related JIRA | ROSAENG-67407 |
| Feature Documentation | Implementation CNTRLPLANE-4302; code in
hypershiftsupport/awsutil/route53.goand the PrivateLink / HCP reconcilers |Policy Changes: Modifies the CPO managed policy (
ROSAControlPlaneOperatorPolicy) in the commercial partition only:resources/sts/hypershift/openshift_hcp_control_plane_operator_credentials_policy.json(commercial)The FedRAMP/GovCloud policy (
resources/sts/4.14/fedramp-hypershift/) is intentionally not modified here; AWS requests the equivalent GovCloud permissions internally. This MCC change is the source of truth for what is submitted to AWS to publish a new version of the managed policy; the inline dev/test copy in HyperShift (cmd/infra/aws/iam.go) is kept in sync by the feature implementation.Background: these permissions already exist in the installer role
Managed DNS covers three hosted zones:
1. the private
.hypershift.localzone, used for internal VPC endpoint connectivity;2. the public ingress zone, used for customer-facing DNS records and certificate validation;
3. the private ingress zone, used for VPC-internal DNS resolution.
Today, in ROSA HCP v1, these zones are pre-created by Clusters Service that leverages the installer role. Therefore, the Route53 actions in this change already live in the cluster installer role (
sts_hcp_installer_permission_policy.json). Managed DNS moves zone and record lifecycle to the CPO - which will be leveraged for ROSA HyperFleet (and possibly ROSA HCP v1 in the future).2. Policy Analysis
Policy Chains Table
| Chain Name | Sid Flow | Purpose |
|---|---|---|
| Managed DNS Zone Management |
ReadPermissions(route53:ListHostedZones) thenManageHostedZones(CreateHostedZone) thenTagHostedZones(ChangeTagsForResource) thenListResourceRecordSets+ChangeResourceRecordSetsRestrictedRecordNames(ChangeResourceRecordSets) | Look up zones by name, create the.hypershift.localand ingress hosted zones, tag them with the clusterResourceTags, and write the ACME_acme-challengeDNS01 delegation CNAME in the public ingress zone. The.appswildcard records are written separately by the in-cluster ingress operator via the CPO'sdns.configoverride, not by this policy. || Managed DNS Teardown |
ReadPermissions(ListHostedZones) thenManageHostedZones(GetHostedZone) thenListResourceRecordSetsthenChangeResourceRecordSetsRestrictedRecordNames(ChangeResourceRecordSets) thenManageHostedZones(DeleteHostedZone) | On cluster delete, look up the zone, delete its records, and delete the zone. |Permission Justification Matrix
| Permission | Justification (why needed) | Permission interaction | Conditions applied | Unconditioned rationale |
|---|---|---|---|---|
|
route53:CreateHostedZone(new) | Create the private.hypershift.localzone and the public and private ingress zones in the customer account. | Produces the zones that are then tagged and populated. | None (Resource: ""). | AWS supports no resource-level permissions and no tag-on-create condition keys forCreateHostedZone, so it must be"". Same scope the installer role already grants. ||
route53:GetHostedZone(new) | Zone verification and NS record retrieval for delegation. | Reads zones created byCreateHostedZone; gatesDeleteHostedZone. |Resource: ""(the action is inherently hosted-zone only). | Zone IDs are created at runtime and cannot be enumerated in a static managed policy. The action only acts on hosted zones, so""grants nothing beyond them. Same scope the installer role already grants. ||
route53:DeleteHostedZone(new) | Zone cleanup on cluster deletion, and recovery when a zone is deleted out of band. | Terminal step of the teardown chain. |Resource: ""(the action is inherently hosted-zone only). | Runtime zone IDs, as above. A tag-based condition is not viable because zones are tagged after creation, so aResourceTagprecondition would break the create then get then tag sequence. Same scope the installer role already grants. ||
route53:ChangeTagsForResource(new) | Tag created zones with the clusterResourceTags. | Runs immediately afterCreateHostedZone. |Resource: arn:aws:route53:::hostedzone/(resource-type scoped). | Cannot requireaws:ResourceTagbecause this call is what sets the tag. Scoped to thehostedzoneresource type so it cannot tag other taggable Route53 resources such as health checks. ||
route53:ChangeResourceRecordSets(existing, condition extended) | Write the ACME_acme-challengeDNS01 delegation CNAME in the public ingress zone, and clean up records before zone deletion. (The.appswildcards are written by the in-cluster ingress operator, not by this policy.) | Operates within zones created or returned by the chain above. |ForAllValues:StringLikeonroute53:ChangeResourceRecordSetsNormalizedRecordNamesrestricted to.hypershift.local,.openshiftapps.com,.devshift.org,.openshiftusgov.com,.devshiftusgov.com. | Conditioned..hypershift.localis the pre-existing scope. The ACME record lives under the cluster's managed base domain, so the condition is extended with the same managed-domain suffixes already allowed by the ingress operator and shared-VPC Route53 managed policies. |Least-privilege summary: The only unconditioned new grants are
CreateHostedZone(AWS API limitation, no conditions or resource types available) andGet/DeleteHostedZone(runtime zone IDs, tag conditions infeasible because zones are tagged after creation). Record mutation is constrained to Red Hat managed-domain suffixes, and tagging is scoped to the hosted-zone resource type. Every added action already existed insts_hcp_installer_permission_policy.jsonwith equal-or-broader scope, so this change relocates DNS management from the installer to the CPO rather than expanding the account's trust surface.3. Testing Evidence
Cross-Version Compatibility Testing
HCP managed policies under
resources/sts/hypershift/are un-versioned and apply to all HCP y-streams at once. The managed DNS feature lands in 5.1 and was tested on 5.0 and 5.1.| OCP Version | Test Status | Notes |
|---|---|---|
| 5.0 | Pass | Managed DNS exercised end to end (zone create/tag, ACME CNAME, teardown). |
| 5.1 | Pass | Target y-stream for the feature. |
A "y-stream without perms to y-stream with perms" upgrade test is not applicable: the managed policy applies to all y-streams at once, and the feature is opt-in and only enabled on a cluster after the permissions are in place.
FedRAMP/GovCloud: The FedRAMP policy is not changed in this PR; AWS requests the equivalent GovCloud permissions internally.
Test Procedure
With the policy applied to the CPO role, we created and then deleted an HCP cluster with the managed DNS feature toggled on, and confirmed the feature ran end to end: the
.hypershift.localand ingress hosted zones were created and tagged, the ACME_acme-challengeCNAME was written, and all zones and records were cleaned up on cluster deletion.References
cmd/infra/aws/iam.go): https://github.com/openshift/hypershift/pull/9348🤖 Generated with Claude Code