You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raised by Codex against #6385 and confirmed structurally at ac74b807:
bindFromOwnershipRecord (pkg/cli/clusterapi/distconfig.go) reads the ownership record and keeps ownerships[0].Regiononly.
The EKSConfig it returns (pkg/svc/provisioner/cluster/factory.go) has fields for Name, Region, ConfigPath and KubeconfigPath — and nowhere to putAWSOptions.
eksidentity.Capture requires a complete AWSOptions mapping precisely so that an operator running a
cluster through custom credential variables cannot silently persist canonical names and later resolve
a different ambient identity. ListEKSOwnershipStates likewise only accepts records carrying a
complete mapping. That care is then discarded at the point of use.
Problem
The credential mapping recorded at bind time is dropped, and resolution falls back to the canonical AWS_* variables. That is the "same cluster name in another account" hazard arriving through the
credential resolver instead of through the region — the same class of redirect #6385 closes for the
region axis, still open on the account axis.
Scope note
This is not a regression introduced by #6385: the credential axis was equally unbound before it
(verified at origin/main by the grep above). #6385 closes the region axis and leaves this one as it
found it. Recording it here so the remaining gap is tracked rather than implied.
Proposed direction
Widen EKSConfig with the options mapping (additive — the zero value preserves today's behaviour at
all eight construction sites), populate it from the record in bindFromOwnershipRecord, and make the
EKS provisioner resolve credentials through it rather than through ambient canonical names.
The provisioner-side credential resolution is the part to design carefully and the reason this is a
slice of its own rather than a field addition.
Acceptance criteria
An ownership record carrying a non-canonical AWSOptions mapping reaches the provisioner with
that mapping intact.
A test proves the resolved credentials come from the record's mapping and not from the ambient
canonical AWS_* variables — the two must be set to different values so the assertion can
distinguish them.
Existing construction sites that supply no mapping keep their current behaviour, pinned by a
control test.
Size: medium — one additive type change, one population site, provisioner credential resolution,
plus tests.
Evidence
Raised by Codex against #6385 and confirmed structurally at
ac74b807:bindFromOwnershipRecord(pkg/cli/clusterapi/distconfig.go) reads the ownership record and keepsownerships[0].Regiononly.EKSConfigit returns (pkg/svc/provisioner/cluster/factory.go) has fields forName,Region,ConfigPathandKubeconfigPath— and nowhere to putAWSOptions.AWSOptions/OptionsAWS/Provider.AWSappear nowhere inpkg/cli/clusterapi/outsidetests, at
origin/mainas well as on the fix(clusterapi): bind local API EKS lifecycle actions to the creating region #6385 branch (checked withgit grepat both revisions).eksidentity.Capturerequires a completeAWSOptionsmapping precisely so that an operator running acluster through custom credential variables cannot silently persist canonical names and later resolve
a different ambient identity.
ListEKSOwnershipStateslikewise only accepts records carrying acomplete mapping. That care is then discarded at the point of use.
Problem
The credential mapping recorded at bind time is dropped, and resolution falls back to the canonical
AWS_*variables. That is the "same cluster name in another account" hazard arriving through thecredential resolver instead of through the region — the same class of redirect #6385 closes for the
region axis, still open on the account axis.
Scope note
This is not a regression introduced by #6385: the credential axis was equally unbound before it
(verified at
origin/mainby the grep above). #6385 closes the region axis and leaves this one as itfound it. Recording it here so the remaining gap is tracked rather than implied.
Proposed direction
Widen
EKSConfigwith the options mapping (additive — the zero value preserves today's behaviour atall eight construction sites), populate it from the record in
bindFromOwnershipRecord, and make theEKS provisioner resolve credentials through it rather than through ambient canonical names.
The provisioner-side credential resolution is the part to design carefully and the reason this is a
slice of its own rather than a field addition.
Acceptance criteria
AWSOptionsmapping reaches the provisioner withthat mapping intact.
canonical
AWS_*variables — the two must be set to different values so the assertion candistinguish them.
control test.
Size: medium — one additive type change, one population site, provisioner credential resolution,
plus tests.
Part of #6203. Raised on #6385.