Skip to content
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 implementation #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GenesisSelf
Copy link

Overview:
The purpose of this document is to outline the design and implementation details for integrating Transport Layer Security (TLS) into the client-go and service-go components of our application. TLS integration aims to enhance the security of communication between the client and server components by encrypting data in transit and authenticating the identities of both parties.

Background:
Currently, the client-go component communicates with the service-go component using gRPC framework. The communication protocol is based on HTTP/2, which provides efficient multiplexed streams over a single TCP connection. gRPC allows the client to invoke remote procedures on the server as if they were local function calls, enabling seamless communication between distributed components.

Communication between client-go and service-go occurs over HTTP connections, using a JWT implementation. While that has some authentication mechanisms, it does not encrypt the data or protect against network-level attacks. While this setup is suitable for local development and testing, it poses significant security risks in production environments.

Design Goals:
Ensure secure communication between client and server components.
Protect sensitive data transmitted over the network.
Authenticate both client and server identities to prevent unauthorized access.
Implement TLS in a scalable and maintainable manner.

TLS Integration Approach:
Development: Both client and server authenticate each other using X.509 certificates using self-signing certs.
CA-Signed Certificates for Production: Obtain CA-signed certificates from a trusted Certificate Authority for production deployment, such as https://letsencrypt.org/

Certificate Management:
For development environments, we could generate self-signed certificates using OpenSSL.
Distribute certificates to client and server components securely. Implement periodic rotation of certificates to enhance security. Ideally, this process could be automated and renewed every 90 days before the current ones expire.

Risk Assessment and Mitigation:
Potential risks associated with TLS integration are misconfiguration or certificate management issues.
To mitigate this, we could test and automate cert rotation.


Includes commits:
added cert generation script

added dev certs

added cert generation script

added dev certs
@GenesisSelf GenesisSelf requested a review from alex-wzm as a code owner May 6, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant