Add support for mirror registries behind mutual TLS #72
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.
Description
This PR introduces an enhancement by adding mutual TLS (mTLS) support for service host mirroring. This feature has been requested in hashicorp/terraform#32110
Background: some companies have internal policy to place any services behind mutual TLS which makes it hardly possible to use private registries such as JFrog, so that https://jfrog.com/help/r/jfrog-artifactory-documentation/use-terraform-module-registries is not feasible to make use of since Terraform currently doesn't support specifying connections with client TLS authentication. These changes are going to address this shortage and have been successfully tested internally. Note the patch is for the latest released version tag i.e. 0.1.1 and not the main branch.
Key Changes:
mTLS Support: Implemented mTLS support for service host mirroring, allowing secure, authenticated connections to mirrored service endpoints.
Configuration Options: Added configuration settings to enable and manage mTLS for specific services, including specifying client certificates and CA bundles.
Error Handling Improvements: Enhanced error handling to provide better feedback when mTLS connections fail, making debugging easier.
Backward Compatibility: This update is backward compatible. Non-mTLS connections will continue to function as before unless mTLS is explicitly enabled.
Testing plan
Tests are added for the newly introduced interface
HostCredentialsExtended
related code.External links
hashicorp/terraform#32110