The sample G2 Sentry partner app
This is a sample app demonstrating how to implement a callback endpoint that is called by the G2 Sentry service. The app showcases secure integration using an HMAC-based authentication scheme: all incoming requests from G2 Sentry are signed with a shared HMAC secret, and the app verifies these signatures to ensure authenticity and integrity. This security approach helps prevent unauthorized access and ensures that only trusted requests from G2 Sentry are processed.
- Clone the repository:
git clone https://github.com/g2sentryinc/g2sentry-partner-sample.git cd g2sentry-partner-sample - Install dependencies:
npm install
Create a .env file in the project root:
SHARED_SECRET=your-hmac-secret
PORT=4000
Run the test suite using:
node server.jsThis will execute all unit and integration tests to verify the app's functionality.