CLJ Sign
A Clojure library to sign requests with an openssl private\public key pair.
Goal
In developing a larger deploy toolset for sites on shared servers I found myself in need of a library that can use openssl key pairs to sign and verify requests. This would allow a public server to receive requests but only take action on requests sent using a specific key which is not publicly accessible.
Process
- Researched existing Clojure libraries but found mostly general encryption libs
- Researched existing java solutions
- Found a tutorial on signing and verifying signed requests (jackpot! 💰)
- Implemented Clojure solution
- Wrote unit tests
- Created PHP test server to receive and verify the signed requests
Discoveries
- Learned how signing and verifying signed requests work
- Learned how to generate key pairs using openssl CLI
- Learned how to convert key pairs to pem format which is what the Java API expects