A serverless zero trust API for Vercel deployent protected with self contained JWTs
Run createCerts.sh
to generate a certificate trust chain for testing purposes. Import the certificates in the Curity Identity Server.
Install the Vercel client
brew install vercel-cli
Login to Vercel
vercel login
Install dependencies
npm install
Deploy the code to Vercel and provide the ISS
, AUD
, ALG
and CERT_LOCATION
env variables in the deploy command or configure the environment variables in the Vercel Web UI.
vercel --env ISS=https://idsvr.example.com/oauth/v2/oauth-anonymous --env AUD=www --env ALG='RS256' --env CERT_LOCATION='../certs' deploy
Optionally promote to production
vercel --prod
Run a flow that obtains a JWT access token then call the Vercel deployed API. Further details in the Securing a Serverless API on Vercel using JWTs article.
Please visit curity.io for more information about the Curity Identity Server.