This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
forcing fly under darwin to load system root ca by x509 method #242
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.
Trying to fix concourse/concourse#2133
Whey @bsnchan had the issue I got a chance to check their environment. It seems like the issue is scoped to darwin where
keychain
manages system root CA and intermediate CA differently. If there is no ca_cert specified, fly tends to let tls to populate the RootCA itself, which ends up picking up the CA sets under system root only (not 100% sure if it is using the same way that x509 does. If it is then it would be a bug that golang could not fully load system CAs under darwin).x509.SystemCertPool()
instead will pick up from both places refer to hereA related read here mentions for adding intermediate CA to system root CA in darwin is prohibited thus fly in this case needs to load that from
~/Library/Keychains/login.keychain
or/Library/Keychains/System.keychain