π Check JWT security of API endpoints with HTTP requests and Google Sheets
β‘ 23 views Β· π SecOps & Security Automation
Description
Quick Overview
This workflow reads API endpoints and JWTs from Google Sheets, tests each endpoint with multiple token scenarios using HTTP requests, and writes a risk-scored security summary back to Google Sheets.
How it works
- Triggers manually (or on an optional daily schedule).
- Loads the target Google Sheets document ID and the endpoint/results tab names.
- Reads endpoint definitions from Google Sheets and keeps only rows marked as active.
- For each endpoint, decodes the provided JWT and generates test variants (no auth, tampered payload, and alg:none).
- Sends HTTP requests to the endpoint using the valid token and, if that succeeds, repeats the request with each test token variant and captures the response status codes.
- Evaluates the status codes and token metadata to flag issues (for example, unauthenticated access, tampered token acceptance, alg:none acceptance, or missing exp) and assigns a risk level.
- Appends the timestamped results and summary to the results tab in Google Sheets.
Setup
- Create a Google Sheet with an endpoints tab containing columns like
label,endpoint_url,method,token, andactive, and a results tab with columns liketimestamp,label,risk_level,t1_valid,t2_no_auth,t3_tampered,t4_alg_none, andsummary. - Add a Google Sheets Service Account credential in n8n and share the spreadsheet with the service account email.
- Update the Sheet ID and tab names in the workflowβs variables (Sheet ID, endpoints sheet name, and results sheet name).
- Ensure each endpoint row includes a valid JWT in the
tokencolumn and setactiveto TRUE for endpoints you want to test. - If you want it to run automatically, enable the schedule trigger and adjust the cron expression as needed.
π Nodes Used
Google Sheets, HTTP Request, Schedule Trigger, Filter
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File