credit: Nathanial McCallum et Al.
A full implementation of tang server running on node.js
Method | Path | Operation |
---|---|---|
GET | /adv | Fetch public keys |
GET | /adv/{kid} | Fetch public keys using specified signing key |
POST | /rec/{kid} | Perform recovery using specified exchange key |
POST | /keys/rotate | Generate new keys (reserved for whitelisted ip addresses) |
lein cljsbuild prod once
npm install tangd
# command line switches:
# --port, -p server port number
# --data, -d database file path
# --ip-whitelist, -l whitelisted ip to access security sensitive API
node node_modules/tangd/index.js --data /var/db/tangd/key.sqlite3 --port 8080 --ip-whitelist "10.6.0.4 10.8.0.9"
# must also initiate a key rotation to create new keys
docker run -p 80:8080 -e IP_WHITELIST="10.6.0.4 10.8.0.9" -v /secret/data:/var/db/tangd cloggo/tangd:latest
# must also initiate a key rotation to create new keys
curl -X POST http://localhost/keys/rotate -d "{}"