Skip to content

OADP-641: Update udistribution dependency to enable AWS_CA_BUNDLE support for self-signed certificates #340

@kaovilai

Description

@kaovilai

Issue Summary

The openshift-velero-plugin needs to update its udistribution dependency to support AWS_CA_BUNDLE for self-signed certificates, resolving long-standing OADP internal image backup issues.

Background

OADP issue OADP-641 has been tracking x509 certificate errors with self-signed certificates for 2+ years. The solution is now available through updated dependencies.

Dependency Chain Status

OADP → openshift-velero-plugin → udistribution → openshift/docker-distribution

Recent updates:

  1. openshift/docker-distribution - PR #44 merged (Jan 2025)
  2. udistribution - needs update (tracked in migtools/udistribution#139)
  3. 🔄 openshift-velero-plugin - [oadp-1.5] Update go mod after velero rebase #344 for 1.5, chore: update udistribution dependency to v0.0.15-oadp-1.5 #345 for master

Current Implementation

In velero-plugins/imagestream/shared.go:57, the plugin uses udistribution for image operations:

func GetUdistributionTransportForLocation(uid k8stypes.UID, location, namespace string, log logrus.FieldLogger) (*udistribution.UdistributionTransport, error) {
    // ...
    envs, err := GetRegistryEnvsForLocation(location, namespace)
    if err != nil {
        return nil, fmt.Errorf("errors getting registryenv: %v", err)
    }
    ut, err := udistribution.NewTransportFromNewConfig("", envs)
    // ...
}

Required Action

  1. Wait for udistribution update: Monitor migtools/udistribution#139 completion
  2. Update go.mod: Bump udistribution to version that includes the updated OpenShift docker-distribution fork
  3. Test integration: Verify AWS_CA_BUNDLE environment variable support works end-to-end

Expected Behavior After Update

Users will be able to resolve self-signed certificate issues by:

  1. Setting AWS_CA_BUNDLE environment variable:

    AWS_CA_BUNDLE=/path/to/ca-bundle.pem
  2. Or using OpenShift certificate injection:

    metadata:
      labels:
        config.openshift.io/inject-trusted-cabundle: "true"

Testing Scenarios

Once updated, test with:

  • Internal S3-compatible storage with self-signed certificates
  • Private container registries with custom CA certificates
  • Both AWS_CA_BUNDLE and OpenShift certificate injection methods

Impact

This resolves:

  • OADP-641: Long-standing certificate validation issues
  • Enables OADP usage with internal/air-gapped environments
  • Supports enterprise PKI infrastructure requirements

Related Issues & PRs

Documentation Update Needed

Update OADP documentation to include AWS_CA_BUNDLE usage instructions for self-signed certificate scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions