Skip to content

rdigaum/edgeworkers-crl-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRL - Certificate Revocation List with Akamai EdgeWorkers

This project demonstrates how to validate client certificates (mTLS) via CRL using Akamai EdgeWorkers, blocking access for revoked certificates based on a local file (data.js). It is designed for use cases where Property Manager require certificate revocation checks at the Edge.

Features

  • Validates client certificate presence via Akamai Variables ex.: PMUSER_CLIENT_CERT_FINGERPRINT
  • Blocks revoked certificates with HTTP 403 and a custom JSON response
  • Returns HTTP 401 when no client certificate is provided with a custom JSON response
  • Uses a local list (data.js) of revoked fingerprints (no EdgeKV dependency), but it could be extended using EdgeKV
  • Works directly via Property Manager + EdgeWorkers

📂 Project Structure

├── main.js          # Main logic of the EdgeWorker
├── data.js          # Local list of revoked fingerprints
├── bundle.json      # Manifest file with metadata information

How to Deploy on Akamai

  1. Package the EdgeWorker
  • Copy the project and enter on the main directory
tar zcvf * ../crl.tgz
  1. Manage EdgeWorkers

Create an EdgeWorkers

  1. Link it via Property Manager
  • Add the EdgeWorkers behavior
  • Set the EdgeWorker ID
  • Add a match rule (example: /*)
  • Add the PMUSER_CLIENT_CERT_FINGERPRINT variable via Property Manager

Reference Link

  1. Structure in data.js
export const revokedFingerprints = [
  '15D21AE3FA1051EDEADC901C',
  '15D21AE3FA1051EDEADC821C'
];

Example JSON Responses

401 - No Client Certificate

{
  "status": "unauthorized",
  "message": "Client certificate not found. Access denied!"
}

403 - Revoked Certificate

{
  "status": "revoked",
  "message": "This certificate has been revoked. Access denied."
}

Related Resources

Contributions

Pull requests are welcome! Feel free to open issues and suggest improvements.

Read this README in Português

License

MIT License

About

Using Akamai EdgeWorkers to validate the Client Certificate Fingerprint using the CRL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors