Default capture proxy to TLS with self-signed cert#2717
Default capture proxy to TLS with self-signed cert#2717jugal-chauhan wants to merge 7 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Jugal Chauhan <jugaldc@amazon.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2717 +/- ##
============================================
+ Coverage 73.28% 73.43% +0.15%
Complexity 106 106
============================================
Files 721 721
Lines 33372 33372
Branches 2910 2910
============================================
+ Hits 24457 24508 +51
+ Misses 7582 7533 -49
+ Partials 1333 1331 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| kind: (process.env.PROXY_DEFAULT_ISSUER_KIND || "ClusterIssuer") as "ClusterIssuer" | "Issuer", | ||
| }, | ||
| dnsNames: [ | ||
| "*.svc.cluster.local", |
There was a problem hiding this comment.
I don't think this works, we need the namespace in the path here since IIRC * only goes one level in SAN
There was a problem hiding this comment.
We can use
dnsNames: [
proxyName,
`${proxyName}.ma`,
`${proxyName}.ma.svc.cluster.local`,
],
The alternative is to just use the short name and let clients connect with allow_insecure: true (which the transformer already sets when TLS is present). Since this is a self signed CA, clients won't trust it regardless without either allow_insecure or explicitly trusting the CA
There was a problem hiding this comment.
Can you suggest an approach in which we do not have to hardcode ma namespace ?
There was a problem hiding this comment.
Actually, we need to also include the NLB domain name (or trust all) in AWS
There was a problem hiding this comment.
Included in the latest commit
Signed-off-by: Jugal Chauhan <jugaldc@amazon.com>
Signed-off-by: Jugal Chauhan <jugaldc@amazon.com>
|
This PR will fail on cdc tests until #2721 |
Description
Follows the same secure-by-default pattern established for Kafka in #2412. When a user configures a capture proxy without specifying a TLS block, the config transformer now injects a self-signed cert-manager TLS configuration using the migrations-ca ClusterIssuer. Users can also explicitly opt out with
tls: {mode: "plaintext"}.Changes
Schema (userSchemas.ts):
Config transformer (migrationConfigTransformer.ts):
defaultProxyTlsConfig()will generate a certManager TLS config with*.svc.cluster.local+proxy name as SANsplaintextmode is stripped before passing to Argo, preserving existing HTTP behaviorHelm (values.yaml, issuerConfigmap.yaml, migrationConsole.yaml):
migrations-ca/ClusterIssuerdefaultsImpact of these changes
tls: {mode: "plaintext"}to preserve the old behaviorsslConfigFileis respected. If the legacysslConfigFileoption is set, no default TLS is injected (they're mutually exclusive per the existing schema validation)*.svc.cluster.localrather than*.ma.svc.cluster.localto avoid hardcoding the namespacetls: {mode: "plaintext"}Issues Resolved
MIGRATIONS-3029
Testing
https://andallowInsecure: true)traffic-plaintext-tls.jsonvalid fixture for the plaintext opt-out pathCheck List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.