Closed peanball closed 1 year ago
@ameowlia thanks so much for this thoughtful and thorough review. We'll address the points. Fully agree on having a check in the spec ERB template / at template generation time.
@ameowlia Could you have another look?
I've updated this PR addressing all comments and provided the companion PR for routing release: https://github.com/cloudfoundry/routing-release/pull/355
We want to add optional mTLS client certificate metadata verification in addition to the issuer CA validity checks.
Given a particular signing CA (identified by its subject) we want to limit the allowed client certificate subjects that are allowed to send requests.
While the underlying issue is better solved with changes to the PKI and trust relationship between CAs, the PKI or its use by other sub-entities is not always under the control of the operator.
The use case is an upstream proxy managed by a different entity that uses a widely spread private CA for issuing its certificates.
We want to avoid that every user of that CA is able to issue requests to Gorouter, while still explicitly allowing the upstream proxy and its CA certificates, which are short-lived and need rotation.
In the specific use case, we have a CA that controls, which certificates are issued for specific sub-entities, which are clearly identified in the certificate's subject DN.
e.g. configuration in routing-release:
client_ca_certs:
but not in the explicit allowed subjects, configured inverify_client_certificate_metadata:
:client_ca_certs:
and in the allowed subjects, configured inverify_client_certificate_metadata:
:Links to any other associated PRs
[x] I have viewed signed and have submitted the Contributor License Agreement
[x] I have made this pull request to the
main
branch[x] I have run all the unit tests.
[ ] (Optional) I have run Routing Acceptance Tests and Routing Smoke Tests
[ ] (Optional) I have run CF Acceptance Tests