A demo tool that secures APIs by implementing RSA-based signing and verification to ensure request authenticity.
Secure api by RSA sign and verify functionality
This tool is designed for developers and security engineers who want to add cryptographic signing and verification to their API requests to enhance security. It demonstrates how to use RSA signatures to authenticate API calls, preventing tampering and unauthorized access.
This demo requires familiarity with both Go and Node.js environments. It is intended as a proof of concept rather than a production-ready solution. Users should ensure secure key management practices when implementing RSA signing in real applications.
Navigate to the client directory: cd ./client
Install Node.js dependencies: yarn install
Fetch the RSA utility package for Go: go get github.com/Ksloveyuan/rsautil
Start the Go server
Send POST requests using the Node.js clientcd ./client
Change directory to the client folder containing the Node.js client code.
yarn install
Install Node.js dependencies required for the client.
go get github.com/Ksloveyuan/rsautil
Download and install the RSA utility package used by the Go server.
Start the Go server
Run the Go server to handle API requests and perform RSA signature verification.
Send a POST request via Node.js client
Use the Node.js client to send signed API requests to the Go server.