Unverified Commit bafdd422 authored by Felix Förtsch's avatar Felix Förtsch
Browse files

add jwt signing

parent f5090a02
-----BEGIN CERTIFICATE-----
MIIFijCCA3KgAwIBAgIUSLFvHM0rP9v1cCMtypw4Kx+NAYUwDQYJKoZIhvcNAQEN
BQAwXTELMAkGA1UEBhMCREUxDzANBgNVBAgTBkJlcmxpbjEPMA0GA1UEBxMGQmVy
bGluMREwDwYDVQQKEwhsdWNhIERldjEZMBcGA1UEAxMQbHVjYSBEZXYgUm9vdCBD
QTAeFw0yMTEwMjExNzQ0MDBaFw0yNjEwMjAxNzQ0MDBaMF0xCzAJBgNVBAYTAkRF
MQ8wDQYDVQQIEwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjERMA8GA1UEChMIbHVj
YSBEZXYxGTAXBgNVBAMTEGx1Y2EgRGV2IFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB
AQUAA4ICDwAwggIKAoICAQDRdSXBWYoo/RUzAREWukBISLr9iN4l2Yca3hJpWqB6
PkAX+Ge3m11jJCGdsKht/PR9HA8lSuenfqlwTkXQNfE401ETjYzYiI2ggtVKePLu
sELFtbD0waTWT9zXR4auvIEwHRms/y83LuXv4/PR1II1Gjkl7Fov4iZbEx+8wdqZ
k6OHWHZlA9RfZ1xibmxF2xn6FDki74SZHEC3ITtfFE8i5+1i1efWxjAv+/p2H1Oc
YJeTc5zAgrlEmD+yeMCVPixApb7mkIruLL55fxMID5DuNj5N4mwyR9OqUhI+ur2C
ImNoo1eeTmrA0DnURJT+kHcaFtQFWczih4UTGzTF+nF+G+b1il/R1bxtyzkiKq7G
SHfxlp2+IDBOan7aUcI6BIoZxL8SYDAGLxgQP2wIKYKic3GQfkDUrFMq/YOKeaXU
sTRkKNqTRGrFYQHalK4Xx/gGUVjfpgEKwMD5CPsNSPQNxOVm2rSwWb9MBivpKbtV
zV+tVXNlOfqhbnH3sEp5O0cDGwn78TYaXQwSeM406cRdSs8/BnNEqlp2rUeMAU24
UDXY7DE1JcSiEU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xbqZjghrqVbInO5wj5gh8PvlTdyczQRfDYbPL2XpXzt8siaH6c5pQY/y05+5KqNm
kqUh3xjULbCG5FwjRniOndZPINgLjUfyelvh4PQj6upI14hLt/wUZZ8+ff0a9vUv
NvdhtHc2UdQ1IZmqcIuSDJlMygX3uI6cUXueGz03qbVpF1wVaJf0wG0WQZ6vb6ay
l8yI5pSXToypZc77ezwVqcFOV8nVCDBReFohFyqc6zvM1opvUnYqlA+LDHIdTk5a
HD0krYUjKWK4jdriLYFsUHXxkf4hEct6E0udW/EkQ5+5AuAYAibqV1AgiumzGp8f
5L1d6CefQ+3ihIMeE7Tz1dt8iG/BpCKrqR87DETFvx5ZNDT0PsXLfT1SNk/DSy6M
7Ls3tD/4WM2ZyJgq5vo+Bsi+BR8k8vw93MzqmfNC5VFHEWNPcwQnf+9+x2l/fDU9
R3eb0aA=
-----END CERTIFICATE-----
......@@ -5,7 +5,7 @@
"size": 4096
},
"hosts": ["localhost"],
"hosts": ["localhost", "10.0.2.2"],
"names": [
{
"C": "DE",
......
version: "3.3"
services:
database:
volumes:
- ./local-data/postgres:/data/postgres
redis:
ports:
- "6379:6379"
......
......@@ -80,8 +80,6 @@ services:
POSTGRES_DB: luca-backend
POSTGRES_USER: luca
POSTGRES_PASSWORD: lcadmin
volumes:
- ./local-data/postgres:/data/postgres
redis:
image: redis:6.0.9-alpine3.12
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
......
// import forge, { pkcs12 } from 'node-forge';
var forge = require('node-forge');
var pkcs12 = forge.pkcs12
var jwt = require('jsonwebtoken');
const JWT_ALGORITHM = 'RS512';
const PASSWORD = 'testing';
const decryptPkcs12 = p12file => {
const p12Asn1 = forge.asn1.fromDer(p12file);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, PASSWORD);
const certBags = p12.getBags({ bagType: forge.pki.oids.certBag })[
forge.pki.oids.certBag
];
if (!certBags || certBags.length === 0) {
throw new Error('Certificate not found');
}
const privateKeyBags = p12.getBags({
bagType: forge.pki.oids.pkcs8ShroudedKeyBag,
})[forge.pki.oids.pkcs8ShroudedKeyBag];
if (!privateKeyBags || privateKeyBags.length === 0) {
throw new Error('Private Key not found');
}
const certBag = certBags[0];
const privateKeyBag = privateKeyBags[0];
if (!certBag.cert) {
throw new Error('Certificate not found');
}
if (!privateKeyBag.key) {
throw new Error('Private key not found');
}
const certDer = forge.asn1.toDer(forge.pki.certificateToAsn1(certBag.cert));
const md = forge.md.sha1.create();
md.update(certDer.data);
const fingerprint = md.digest().toHex();
const commonName = certBag.cert.subject.getField('CN')?.value;
const serialName = certBag.cert.subject.getField({ name: 'serialName' })
?.value;
const cert = forge.pki.certificateToPem(certBag.cert);
const publicKey = forge.pki.publicKeyToPem(certBag.cert.publicKey);
const privateKey = forge.pki.privateKeyToPem(privateKeyBag.key);
return {
cert: cert.replace(/\r\n/g, '\n'),
publicKey: publicKey.replace(/\r\n/g, '\n'),
privateKey: privateKey.replace(/\r\n/g, '\n'),
fingerprint,
commonName,
serialName,
};
};
const createSignedPublicKeys = (healthDepartment, p12file) => {
const pkcs12 = decryptPkcs12(p12file);
const signedPublicHDSKP = jwt.sign(
{
sub: healthDepartment.uuid, // health department uuid
iss: pkcs12.fingerprint, // sha1 fingerprint of cert (hex)
name: healthDepartment.name, // name of the health department
key: healthDepartment.publicHDSKP, // public key (base64)
type: 'publicHDSKP', // key type (base64)
},
pkcs12.privateKey,
{ algorithm: JWT_ALGORITHM }
);
const signedPublicHDEKP = jwt.sign(
{
sub: healthDepartment.uuid, // health department uuid
iss: pkcs12.fingerprint, // sha1 fingerprint of cert (hex)
name: healthDepartment.name, // name of the health department
key: healthDepartment.publicHDEKP, // public key (base64)
type: 'publicHDEKP', // key type (base64)
},
pkcs12.privateKey,
{ algorithm: JWT_ALGORITHM }
);
return {
publicCertificate: pkcs12.cert,
signedPublicHDSKP,
signedPublicHDEKP,
};
};
const healthDepartment = {
"uuid": "d347b793-a3ab-40fb-acc6-9c7d572e67d5",
"name": "neXenio Testing",
"commonName": "Dev Health Department",
"publicHDEKP": "BETh7U2w6tbW6tyHto7oPln5CGQKsZ6wy5nj+MBMFK6wD0BGr2EBTIKIFhdQO3jvJ0ievBIWzDKdcjPzjgdx9Bs=",
"publicHDSKP": "BCNdOvSJ5eV//V3GIQhNm/lZtFlKKcZRROarx8foZFPCp3KA17kFdHp5gDQoeJxL+uWJpBLUqjtVyAu78Pc2+rY=",
"publicCertificate": null,
"signedPublicHDEKP": null,
"signedPublicHDSKP": null,
"email": null,
"phone": null
};
var fs = require('fs');
const pkcs12binary = fs.readFileSync('../../../certs/health.pfx', { encoding: "binary" });
const signedPublicKeys = createSignedPublicKeys(
healthDepartment,
pkcs12binary
);
console.log(signedPublicKeys);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment