https://github.com/hasithaishere/mtls-with-nodejs
Discover how to implement mTLS in Node.js for secure communication. Practical code examples and easy steps for enhanced application security.
https://github.com/hasithaishere/mtls-with-nodejs
api certificates mtls mtls-authentication nodejs security tls
Last synced: 3 months ago
JSON representation
Discover how to implement mTLS in Node.js for secure communication. Practical code examples and easy steps for enhanced application security.
- Host: GitHub
- URL: https://github.com/hasithaishere/mtls-with-nodejs
- Owner: hasithaishere
- Created: 2023-09-24T05:55:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-26T18:12:29.000Z (over 1 year ago)
- Last Synced: 2025-01-07T12:47:34.720Z (4 months ago)
- Topics: api, certificates, mtls, mtls-authentication, nodejs, security, tls
- Language: JavaScript
- Homepage: https://blog.hasitha.xyz/securing-nodejs-communication-a-deep-dive-into-mutual-tls-mtls
- Size: 415 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Deep Dive into Mutual TLS (mTLS) with NodeJS
This project contains source code and supporting files for a server and client application that demonstrate mutual TLS (mTLS) authentication between a client and a server. The server and client is written in NodeJS.
This is a companion project to the blog post [Securing Node.js Communication: A Deep Dive into Mutual TLS (mTLS)](https://blog.hasitha.xyz/securing-nodejs-communication-a-deep-dive-into-mutual-tls-mtls).
## Getting Started
To get started, clone this repository and install the dependencies.
```bash
git clone [email protected]:hasithaishere/mtls-with-nodejs.git
cd nodejs-mtls
npm install
```## Running the Server
To run the server, run the following command:
```bash
npm run server
```## Running the Client
To run the client, run the following command:
```bash
npm run client
```----
For the sample code to run correctly, please add the test domain names to your `/etc/hosts` file. This will prevent connection errors.
### Related Videos
- [Exploring Mutual TLS (mTLS) : How to Create Certificate Authority(CA) Certificate using OpenSSL](https://youtu.be/Wueq9fjjyE0)
- [Exploring Mutual TLS (mTLS) : Generate Server Certificates](https://youtu.be/l6KSu9phQVo)
- [Exploring Mutual TLS (mTLS) : Generate Client Certificates](https://youtu.be/hgMZ7RyMP68)If you have any questions, please feel free to reach out to me in the comments section of the blog post or on my site [hasitha.xyz](https://hasitha.xyz).