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
feat: migrate HelmRepository to runtime/secrets v0.66.0 with strict BasicAuth validation
Implement switch-case pattern for handling secret reference combinations and add strict BasicAuth validation to prevent security issues. Replace hardcoded keys with runtime/secrets constraints and refactor GetClientOpts into smaller focused functions. Eliminate duplicate Secret fetches and update tests to match runtime/secrets v0.66.0 error message format.
BREAKING CHANGE:
- SecretRef with partial BasicAuth data (username-only or password-only) now returns an error instead of silently falling back to other authentication methods
- Invalid CA certificates now cause authentication failures even for public repositories
These changes improve security by preventing unintended authentication bypass.
Signed-off-by: cappyzawa <[email protected]>
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get authentication secret '/invalid'"),
1043
+
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get authentication secret: secrets \"invalid\" not found"),
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get authentication secret '/invalid'"),
1312
+
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get authentication secret: secrets \"invalid\" not found"),
*conditions.TrueCondition(meta.ReconcilingCondition, meta.ProgressingReason, "building artifact: new index revision"),
447
-
*conditions.UnknownCondition(meta.ReadyCondition, meta.ProgressingReason, "building artifact: new index revision"),
449
+
*conditions.TrueCondition(sourcev1.FetchFailedCondition, meta.FailedReason, "tls: failed to verify certificate: x509: certificate signed by unknown authority"),
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "cannot append certificate into certificate pool: invalid CA certificate"),
781
+
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to construct Helm client's TLS config: failed to parse CA certificate"),
0 commit comments