Skip to content

curityio/serverless-zero-trust-vercel-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Zero Trust Vercel API

Quality Availability

A serverless zero trust API for Vercel deployent protected with self contained JWTs

Create Certificats

Run createCerts.sh to generate a certificate trust chain for testing purposes. Import the certificates in the Curity Identity Server.

Deploy the code to Vercel

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

Testing the code

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.

Further Information

Please visit curity.io for more information about the Curity Identity Server.