-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/examples that use Linux-specific system CA bundle path fail on Windows #13596
Comments
cc @envoyproxy/windows-dev |
i think in the docs we want to keep the current path for the linked config - ie which then leaves the question of how to test this on windows and how to document potentially we can mangle or provide an alternate config file and include the required cert in the bazel test - that would at least provide a way of testing not sure about docs - i guess one question i have is whether there is an "authoritative" place to find this ca cert on a win system |
I believe the authoritative root CAs can be queried with https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certopensystemstorea, passing If youre curious as well, you can get system CAs in Powershell specifically:
And use some additional features of the Powershell Certificate Provider which gives you a logical drive to manipulate: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/about/about_certificate_provider?view=powershell-7 These objects can be grabbed through the registry as well via paths like: |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This is an aspect of #13281 to be resolved |
I am looking into this and I have the following approaches in mind:
The downside of this approach is that this proto is consumed by various source where the the certificate store does not make much sense.
The downside of this approach is that we add an additional property for the trusted On both cases I think it will be clear to user that we won't support filewatcher and certificate reloading when the trusted certificate is on the Windows store. In terms of implementation we would need to change the envoy/source/extensions/transport_sockets/tls/cert_validator/default_validator.cc Line 74 in 54c7445
to get the certificates from the windows store. Refs: |
@envoyproxy/windows-dev @mattklein123 I am in favor of implementation (2) but I would like to get a high level consensus before I move into the implementation. |
From a quick glance (2) seems reasonable but perhaps you could put up a draft API review only and we can discuss with a bit more context? |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
Description:
Envoy docs/examples mention some common Linux-distro specific filepaths, especially for the system CA bundle
/etc/ssl/certs/ca-certificates.crt
. These paths are of course not relevant on Windows. This showed up explicitly in #13534 when trying to test/validate all configs from docs. Right now validation of a few examples is disabled on Windows.What makes this a little complicated on Windows is that the trusted certificate store is not entirely represented with the filesystem, you can get some info, but to get a PEM encoded x509 back out of Windows you need to do some registry querying.
From a quick grep, we use the system CA bundle path a few times in docs examples:
Should we simply use a cert/filepath that we generate with Bazel in the example and offer a suggestion via comment in the YAML embedded in the docs that mentions the typical Debian/Ubuntu cert path? Template the config files in question and insert a different path on Windows, use a Linux/Windows tab structure in docs to display the differences? Another solution?
Another question is around how we would want to load system trusted certs into Envoy (which should possibly be a separate issue, let me know what you think and I will make one). Adding a new DataSource type could be possible, maybe we could maybe accept a cert store path like powershell (e.g.
Cert:\LocalMachine\Root
) to load from but detecting changes like we do with files to reload configuration may not be similarly possible (haven't looked into it). Do we want to instead force Windows users to extract certificates and write them to disk as PEM encoded x509 certs? (this is what they would have to do today)Relevant Links:
The text was updated successfully, but these errors were encountered: