-
Notifications
You must be signed in to change notification settings - Fork 23
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
TLS support for HTTPChaos #43
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: xixi <[email protected]>
|
||
### User-Provided Secrets | ||
|
||
The simplest solutions, mainly used in the case of server-side HTTPChaos, is providing private-key(the secret) by the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simplest solutions, mainly used in the case of server-side HTTPChaos
I think there is no difference between server-side and client-side, we just hijack the TLS connection and do not even care anything about "trust things".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, there is no difference in implementation, but there should be differences in normal cases. User-provided secrets can resolve most use cases of server-side HTTPChaos.
Let's deal with above problems step by step: | ||
|
||
1. Resolve the linux distribution automatically; | ||
2. Inject cert into root CA of system; | ||
3. Find the JAVA_HOME and inject cert into truststore; | ||
4. update CA for other VMs... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe another standalone extendable component ca_injector
represents injecting CA to different components: OS/JVM/Others..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and we can provide options to select them by users.
```yaml | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: HTTPChaos | ||
spec: | ||
... | ||
tls: | ||
secrets: | ||
privateKey: <the secretName of private-key> | ||
certificate: <the secretName of certificate> | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if we assume that, the user could always provide the certs which are trusted by both "client" and "server"(with mtls), I think it could be easily applied on both server-side and client-side injection.
the user could always provide the certs which are trusted by both "client" and "server"
And actually, I think it's not a kind of difficult for any companies/orgs which hold their own PKI infrastructure, they require tons of certs with TLS for encrypting their internal/public networking communication/ service RPC between applications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Also /cc @anuragpaliwal80 |
Thanks, @Hexilee, for creating this draft.
In general, as we divided this work between two main areas (server-side and client-side), can we pick the client-side first (if possible). |
I divide implementation by client-side and server-side to indicate the self-signed cert and |
We divided the use cases instead of work. The user-provided secrets and self-signed cert are the same implementation in chaos-tproxy. (Actually, we are doing it now chaos-mesh/chaos-tproxy#39) |
I agree, it's a better way to say it as use case.
Thanks, I will have a look. Other than this, I was exploring on server side and here are few points that I would like to share:
|
When using a certain cert/key pair for the chaos experiment, I think signing new certs from PKI with extremely short validity (like 1 day) could be helpful and make sense. |
Signed-off-by: xixi [email protected]
Here is the rendered markdown.