Add support for mirror registries behind mutual TLS - #72
Open
416e64726579 wants to merge 1 commit into
Open
Conversation
Author
|
Hi there, Could anybody from the team comment on whether there are any plans to extend this library to support mTLS connections? Maybe outside this PR? Both Terraform and OpenTofu might benefit from it. |
Author
|
Hi, apologies for the ping again but I'd really appreciate some feedback if it's being considered to add mTLS support with or without this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
HostCredentialsExtendedrelated code.External links
hashicorp/terraform#32110