diff --git a/.gitignore b/.gitignore index c0ec98963..908567c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,5 @@ data/ *.7z .node-xmlhttprequest* *.log + +.vscode/ diff --git a/ca.crt b/ca.crt new file mode 100644 index 000000000..f8e75b067 --- /dev/null +++ b/ca.crt @@ -0,0 +1,35 @@ +-----BEGIN CERTIFICATE----- +MIIGJTCCBA2gAwIBAgIUURDLaUFuvhMOtP0AWrtMp6rA1GYwDQYJKoZIhvcNAQEL +BQAwgaExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UEBwwJVmFuY291 +dmVyMR0wGwYDVQQKDBRFZHV3b3JrcyBDb3Jwb3JhdGlvbjEVMBMGA1UECwwMQ2FT +UyBQcm9qZWN0MRkwFwYDVQQDDBBDYVNTIERldmVsb3BtZW50MSAwHgYJKoZIhvcN +AQkBFhFjYXNzQGVkdXdvcmtzLmNvbTAeFw0yMTA5MTYxNzQ5NDNaFw0yNjA5MTUx +NzQ5NDNaMIGhMQswCQYDVQQGEwJVUzELMAkGA1UECAwCV0ExEjAQBgNVBAcMCVZh +bmNvdXZlcjEdMBsGA1UECgwURWR1d29ya3MgQ29ycG9yYXRpb24xFTATBgNVBAsM +DENhU1MgUHJvamVjdDEZMBcGA1UEAwwQQ2FTUyBEZXZlbG9wbWVudDEgMB4GCSqG +SIb3DQEJARYRY2Fzc0BlZHV3b3Jrcy5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCyEQlJYGOGtd+BZJ5K9pCyrKRz2wx8h4kPmPApZR6BWDpNLSGb +mo6toPpRa9/1YMEvbJBH+v4Y3uOwt8T+k6Em7xV2SV7qTGizndJhHKnZGyqmoLTl +AbSG7A7KOV/Sg+aWkRnSXbn66DIdghJU20oEoUd2EhGO38IjhRJOtFrJMzrV+i08 +MfzyDj3pAlZdbFH3QicBauFdu73xuEI/Dgr6JcV7txGGQohUcpquAq3NUKZEWgKn +CHxdd30dEAdbTG4snI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V8trCSz2byTKW +ICS6PMPG8eYySnq61UEsMMnqGbURcucTvjhZO6arY8o2Xl/ZdHsjTpnfgLGxL94D +nOwfaP13iR6t98q/tzNTty3MT9TLJhTmoCuzssFSIO9DTaHQ0jSnrQzv93ItuGSu +3O93qtLL+RlzLUHN7gXVFyIv8x3uMSbZyUOw066G02F9dkjn6hDOaH0= +-----END CERTIFICATE----- diff --git a/ca.key b/ca.key new file mode 100644 index 000000000..0b31f2ddd --- /dev/null +++ b/ca.key @@ -0,0 +1,54 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-256-CBC,49421057DE15EC69C781CC104E151426 + +lWGtL8cC/N/SiLucYLIE2OQQ9F/7ScSqLUBlXMTe/K2UIEiAfBOJRS56EIhoUr6F +Swau9psq5A7JDsp0PKH86qbFsepA/tjng4jydOedMvJi76x6Cvh1VMO0MZlPMEGc +Z4imjr0TqLz/N+89m92KnufeKo+PcIcxAdcgArK5QKsIhk+ManyiKax9y+kXE8W3 +hIg80zl6yFQMV8b5f3OxPl8zgnh6UPy/Nw0FN5m6dP3Ue/n6ZKWwDqFqqmIvAyFN +Hr0iq6XZ2DqX/IAD7Mx//rswnd5VvtU/M/fMd8QmGLqGKdXQMOxt1Q/yTT2WT8v4 +GWd09wE5ca5JgLMxfjXT1PVRtOqgtCRTSi/AQflHVqqcg9/3eRrXniaUxvjxBUoe +x5Tde+IOMO1oY2XrQAKMuYKUSVJLFi2X1U2fgWAqqCAU7pgu/oMlwOUNQSpkJfQb +eaRrQUEGvjPEiipj7TX/RT0NQ8mvrtHaN2xSTqL6QbZ2FPsGdGCAYX7ANFDvkHne +mMYxdYTsXY0AnitircClTqQwn1wQglm+bfjN3Mt8FDnQQQmpaAzantkXH5nhsj97 +Wl2EBP3IGRvhSZKveW7hapHebTRzWYKsyCjalRhckVPKt2Qe4szSOQ2UHHrNWH3p +ibH8lArxNrOkvddmMGgLj2iFe9/BtN9ffn1WmVV4O6hkArbv1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vMR7NcpAg3SQ7SLFm/ze +ykPskNf/GTX9c2/U0bHnLGHSJFDVynEkdTJNApbRP3NTIfbCsTq9T9iQJGry8m31 +jtbBfKjmBTjJ27uEZErwreP4/urZdyP0g9aMyAmi67u7Z3nUkpBdlF017Ug9DUSA ++Fcz92uj3/+G+4tiL1TcMFQ34EZWzdDyEYXEi3l1bp8UNFkXF9kuOA7oe4QWAUGq +9cuV95h7CMbnnV6qQ7JNHhiMigCOIwmbE2qLkURL9u6NseIdq0kaKBhTR87QX+e/ +hcuEQRU1REaQT9i2UW6Ehr3g7UPficyPDb/CN+WatI2y6pzUyS5aBjowfSv6qnAt +-----END RSA PRIVATE KEY----- diff --git a/ca.srl b/ca.srl new file mode 100644 index 000000000..2054c7fbe --- /dev/null +++ b/ca.srl @@ -0,0 +1 @@ +23EA27805AC69ACE7C8D9E59C7C90C6CB867F7EB diff --git a/cass.crt b/cass.crt new file mode 100644 index 000000000..00b0fed0a --- /dev/null +++ b/cass.crt @@ -0,0 +1,35 @@ +-----BEGIN CERTIFICATE----- +MIIGLDCCBBSgAwIBAgIUI+ongFrGms58jZ5Zx8kMbLhn9+kwDQYJKoZIhvcNAQEL +BQAwgaExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UEBwwJVmFuY291 +dmVyMR0wGwYDVQQKDBRFZHV3b3JrcyBDb3Jwb3JhdGlvbjEVMBMGA1UECwwMQ2FT +UyBQcm9qZWN0MRkwFwYDVQQDDBBDYVNTIERldmVsb3BtZW50MSAwHgYJKoZIhvcN +AQkBFhFjYXNzQGVkdXdvcmtzLmNvbTAgFw0yMTA5MTYxODAxMTZaGA8yMDcxMDkw +NDE4MDExNlowgagxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UEBwwJ +VmFuY291dmVyMR0wGwYDVQQKDBRFZHV3b3JrcyBDb3Jwb3JhdGlvbjEVMBMGA1UE +CwwMQ2FTUyBQcm9qZWN0MSAwHgYDVQQDDBdDYVN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F/cDzr +mgZKTEzhOe/PK2+1VuMbUewbxCaIBKOXFT85oj1ekADGnZ7YBJuw38UpM+6mjipg +FHTAJ8F7cqqyYYVUfamSpq7MMAQIJoF9CkU4U9EWhubPkj0oOszoRcETK0fxmsOY +OJJyYmZC7Zx5oVwdJdKIeRqVIOMMIBcZIxLHK5qMCU1AlHlDXoduHkpq5tYXy1pG +LZE/4pozuujQy/UHQoLsGYIqvtznK04av26yrlT+yK0Nx0RDButp8Tv1aTCtfYYl +5JEbQQ8Sf9xefv6vNgEO++TDwzZpyibRbo7vaVj1MAslfwdCNRyZ/rcJ5cnx2arT +uc7DpWMrQl8wAhOL0Uicby7GmYjI7SH4mhGJ/BVAthiMKV8bWjZ28cfQ42pjO3aX +0ib6yIRwC6atxaH8ApFf3WN4q2QPBdHSw276kTw9CH7mL7eRJ8J+PPrOKhRnCOFx +dRFRndp7PLUKvCYsBVjxLaNRfaOougmSibhwWutfy8QfQdvr5viOPXD46iqgdu0a +AaT1TE2xjf+snln3M6u9z3lMgZ6nhIn/nGU2kUWTzeJa8NvBrT65z2f3Jsd97rJb +-----END CERTIFICATE----- diff --git a/cass.csr b/cass.csr new file mode 100644 index 000000000..91bbad8fa --- /dev/null +++ b/cass.csr @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIE7jCCAtYCAQAwgagxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UE +BwwJVmFuY291dmVyMR0wGwYDVQQKDBRFZHV3b3JrcyBDb3Jwb3JhdGlvbjEVMBMG +A1UECwwMQ2FTUyBQcm9qZWN0MSAwHgYDVQQDDBdDYVNTIERldmVsb3BtZW50IFNl +cnZlcjEgMB4GCSqGSIb3DQEJARYRY2Fzc0BlZHV3b3Jrcy5jb20wggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQDPpK4sw7QAb12k0N0B7gUWN1GpMEv8hOzn +UTSc+nCXZe0x/JU7Rm0yNLre63iK9YTXRCd2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FVMF0sBUhIkgrlyIFeKdaWQ0B994ibw21kBHoSrNTsdYZJEYm+XqiTSYcVOq +e4dgq/+umbjKk6aPPxv9GFOBer6dH3sc2E4S+fSEn/XTLgtjovbmEVh7xhEndRkE +zoeA5P1agU4aV3wv2Cy4zGm7GctssRZGBT/GgtjAlcrqBbu2aVDU03NoSuQCdLqe +YPzYECxJOxU3KzSNb4zSiO1jz5L/3vbAWYvWGqg+3BF2Gcj97qQHyAWy3h/b6Ff/ +TndhWQLMAANkJAGEwnPLF0Yt +-----END CERTIFICATE REQUEST----- diff --git a/cass.ext b/cass.ext new file mode 100644 index 000000000..8027d8f19 --- /dev/null +++ b/cass.ext @@ -0,0 +1,7 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = localhost \ No newline at end of file diff --git a/cass.key b/cass.key new file mode 100644 index 000000000..997d66bfd --- /dev/null +++ b/cass.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEAz6SuLMO0AG9dpNDdAe4FFjdRqTBL/ITs51E0nPpwl2XtMfyV +O0ZtMjS63ut4ivWE10QndstBSAt/km7U0ZyEp/HdUv0pvQpuDwSehZnDsWO8QVcU +1Z3uDj2P5Yht6rAeI14EQQ78zfK4zLK/1Bp6yzHY/uCDndqtSn/bAJPCfdUUAT0S +vCUCAwf6G0zmvMeO+iuc8Qf/JMLOpjjQr1eEK+aX6Kh8jIMNkuat4Zwf+35tDvpV +rtIK07YJ5kPf2oFDN73o8FUShcYocoRhglGuGe7Y5Cl6996jGdK0dVKpY9+yqceT +bE/OM1Rz6z4Cyb4ba73B82btcH1i7YxCODoafx8WNsp1E4x5Oyb6veTH7izLVOXB +t9rDo2sbxYDTWYn96NNWKvvoP3DjG3NbIjDyVOgJb+aAeX49r28FqYDSGJrUHICN +ivlaCxz0ue7C0iGZTHK0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0l5cJP12s/z5cZWYH2mu1k2LUdrTF2v +OwTIbcRMfw14INVvYTsVE8WHJKTxMkddwsyLBMnRWtBQfREvls7OL//7r58MT1fn +4/ydmwrayDW+t9FmvZOv8NzCJJXG2RCAkxKojuFl9VV/HLxF11Y1SaCErFPpRxuY +2+fBXweUhnS4lOLNH4x/QW2X0z8TuODvnwKCAQAdo/w0zwrgxfmwvDxQDlm2eo5y +aDi4p0hHWKmhiamcL1vKTVrEtel0haILOA3WUp/PuqpjEao0v8CnSgHm1KPMDm/d +jsasephoZKoUZb8igXG4Qv/Fg+JPKeovQk9p6VyftYD3jBcn93a1Y/xLq03AagPA +F4iJHKgOMFPKVznl252dd7V5M7O11UEMlezitLWIf1VaHNEM582vb+CaJqX82GzU +hBBcMMHyd+fFZZPU8VTNLLZko4kgyUX8shD+g/q2SIKXitJkiJ7FYnyx/FoCkc30 +58h9hqbgneznC+WXSB6Q6S+PrCgBmhs++iuyitirMOUZ/8Zsrr1wvaWs5x5D +-----END RSA PRIVATE KEY----- diff --git a/client.crt b/client.crt new file mode 100644 index 000000000..990f869dc --- /dev/null +++ b/client.crt @@ -0,0 +1,38 @@ +-----BEGIN CERTIFICATE----- +MIIGlTCCBH2gAwIBAgIUI+ongFrGms58jZ5Zx8kMbLhn9+swDQYJKoZIhvcNAQEL +BQAwgaExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UEBwwJVmFuY291 +dmVyMR0wGwYDVQQKDBRFZHV3b3JrcyBDb3Jwb3JhdGlvbjEVMBMGA1UECwwMQ2FT +UyBQcm9qZWN0MRkwFwYDVQQDDBBDYVNTIERldmVsb3BtZW50MSAwHgYJKoZIhvcN +AQkBFhFjYXNzQGVkdXdvcmtzLmNvbTAgFw0yMTA5MTYxODIwMjBaGA8yMDcxMDkw +NDE4MjAyMFowgZ8xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UEBwwJ +VmFuY291dmVyMR0wGwYDVQQKDBRFZHV3b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/tMaAL85ALzirEkR +A9huXYTMMA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYB +BQUHAwQwDQYJKoZIhvcNAQELBQADggIBAKNf8XBgors06CAjD9MKI0D2YjC5uc34 +sGEwH+HytZfHNd5z6NNDEU8W+Ay0G0kMm73e7u3B0E2+wumPLZxMHpISgS7F8uPX +MpTzNHHiRNF+rbcyRat6vvf5gFKgK+TGzGXDalL2FXY4YIaNVt8qrkFPmIyca74l +eQc1SBI3aqjmfFQqcQz6SxiX1Sstr3/vuxA0xsD4Fu/cisG4ZYt0N7+fW+vjKfpD +L+LpGWEyleB7nSgPGlxPCtrnmnMiYTw6JNJ34qInpV26PPf3/VvZ0uWbxVsj7XxE +RKWrfUSezhvavEzctzsgaLUA4L3kx5x32Xe7YBDwogvdfNltUSecbG8X8myQTpbM +vS1gcOr5bl8bY3Sq956IGdrMlenwxmgwwjz0M/lODwD9ZaTU9btjNPsZwjnsdFcj +efWsGDI2ac5u06kVI0Oh3DA2A2bDZQSXCsNbn1ql3xKb8p63QKeTyw4e1paghJmI +YKVHgYyaw60sU2cAanf3o1dEkQndNtI70h4AcxmOCQ9Uu88xRiF0OQcSrTe8B0h+ +/0H8Oh6psRBxkjY1lxGWf1eXaD/EKothOAMU9nBLDtKqpoH29fvw9gEVDkB5w/BN +21JvqaLFV0+Q/C9iA+lzZ0dcg62Q8ILSeHj5UvnDx9qgywigzLD7c5qAvypswS2L +ko8JSu99k7Fd +-----END CERTIFICATE----- diff --git a/client.csr b/client.csr new file mode 100644 index 000000000..5107bbbdd --- /dev/null +++ b/client.csr @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIE5TCCAs0CAQAwgZ8xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTESMBAGA1UE +BwwJVmFuY291dmVyMR0wGwYDVQQKDBRFZHV3b3JrcyBDb3Jwb3JhdGlvbjEVMBMG +A1UECwwMQ2FTUyBQcm9q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cm5zOBKJrXhqnTF/gm3 +K6Ex0aMAoYeYacNZLyR4ao/Q/umsetNZKwG+2ehhpBFezsNODX8IuHYENwqOu71Y +XQrSXP2ktPgEpqvb1nQiInWG9b/tHHJ+VjVdSnR0NcTpK8rFF7T5UQKs9NrbOWJm +d9fdfogLRTK6eEKw7miQcXEtlvD2mCkexxTr0cut+GczaWotgBSywJUEELr1IkgI +NV3C1SmBb4msT62zodWvjnSvbt8R3Zfhl3vWm7DABDgNGOXW1XDY8IZ2Sm1Cs/6Y +TK5ra53KM+gV8fThxHHfOy6/KXpa42RWK4n2MVmulArwX0qe2CABcL02Mv3ENSfx ++NYR52Dy2jX4mNIg46THAxQX0UpGX/IMFZI3rXBVhMT9Kt97790RIrVxN5w/YgaP +FCoC3Q5kY/5iefmAbFWqyec+3gffXuvxCTlwuSS7BaCQt/C/SlUMUnbblqG+BgOM +Wmf3YFDwxSdh +-----END CERTIFICATE REQUEST----- diff --git a/client.ext b/client.ext new file mode 100644 index 000000000..ee5018cac --- /dev/null +++ b/client.ext @@ -0,0 +1,7 @@ +basicConstraints = CA:FALSE +nsCertType = client, email +nsComment = "CaSS Developer Client Certificate" +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer +keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment +extendedKeyUsage = clientAuth, emailProtection \ No newline at end of file diff --git a/client.key b/client.key new file mode 100644 index 000000000..bde0fef24 --- /dev/null +++ b/client.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAyyp8PrpOTd6+rVgcRsU8g98xh/KS5TL7/8At17NvUx8CsXHl +oTFtHX2KzKkehhX+GCPhgxQovOP/aiEgsY329xhTQPFdQcZpopmLZG3VETVlDIGC +BTiBSjvlU4w5iG3hzwCV9PbG+wtAhgAc/Xpl52faz26U/WBmQgC1ReSSJE5xUWzq +OTYwSKYMlSbuVUgz4tcraOG4ekzErJyff07xNfJI3DQ1x+mg0iTAkciJJ5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shU2E93v +xzEXZN7nRIjYpwA1DNfSuT3mBBgeCqVrIP3KcHMvocryiORvOcWKZLvTyFB57Xxy +5OMd9QKCAQAN1bKsOxY5wadmJYpg3JtqZyvXvP00h12K6vmPkzDRpu2gTzkOBTbV +nhqn5LumXODGBbRjYnZccHscqbPa3JM3wxcXgjzH8Bm7Fq4YL2g9RWABukOypKie +byKKfaRZGWZpj05ge3nBe19961FbJjXuRF7tDlq5VA6NUhA0+AvGAV7Yh17I1UPD +KX4r6mzhO/fIY2Xm1SuMVZ1haWNF5ywN590J9CrYPmfVr50SQkFiYOKE/5yuBthb +BK00u7YVBfFWg8iY+3Nrw4aaSsvFJ6/4oPornbXgCNzRBt+vN9ZDUYcleqkUqEqk +mktmqXPsX07b/2rgo5gUi6iojmkWua1xAoIBAD3bllIT4NaXUAfl0TAq5Scx2dCg +AWbc/aqTZ9ybuz7y1Vg1pV9XWi4Y1TXWUbfV8ctXIAT455vu2ukyXWwuhZk4aX7M +CcSkfXh5gtDyQ9y0ZvkLR5JCt3QE7NAd71tuJ+JalQMg8F0Ezr5u5btjR1G8gdqK +0Qsh0UjgVVx23Tcvzt0r0kIUiiwu+wW2AYby/6fsRsdjFGDCiN9cF6cWZ3Bbph2k +oG9vEpPxzKMnQVzhdX8hsw60bh1L88qPNw2nFlEtbbRBkeUHaF8L2QYOTifPcEq5 +bmeYShs56kX+JXnctpquMLvfL4AgtCSzvMvtUgeF/NDYw4bh6RSQcuVWreg= +-----END RSA PRIVATE KEY----- diff --git a/client.pfx b/client.pfx new file mode 100644 index 000000000..327287e38 Binary files /dev/null and b/client.pfx differ diff --git a/package.json b/package.json index 209650e11..eb87daae7 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "test:nodemon": "nodemon src/main/server.js", "test:logs": "pm2 logs --nostream --lines 1000", "dev": "npm run dev:deps && npm run dev:nodemon", + "dev:https": "npm run dev:deps && export HTTPS=true|| set HTTPS=true&& npm run dev:nodemon", "dev:deps": "docker-compose up -d elasticsearch", "dev:nodemon": "nodemon --max-old-space-size=512 --ignore etc src/main/server.js", "mocha": "wait-on http://localhost/api/ping && mocha --parallel node_modules/cassproject/src/**/*.test.js src/**/*.test.js", @@ -80,6 +81,7 @@ }, "devDependencies": { "chai": "^4.3.4", + "crossenv": "*", "mocha": "^8.3.2", "nodemon": "^2.0.7", "npm-run-all": "^4.1.5", diff --git a/src/main/server.js b/src/main/server.js index 50251c453..3aa3ff682 100644 --- a/src/main/server.js +++ b/src/main/server.js @@ -24,14 +24,16 @@ const fs = require('fs'); const baseUrl = global.baseUrl = process.env.CASS_BASE || ""; const app = global.app = express(); const cors = require('cors'); +const https = require('https'); app.use(cors()); -const port = process.env.PORT || 80; +const envHttps = process.env.HTTPS != null ? process.env.HTTPS.trim() == 'true' : false; +const port = process.env.PORT || envHttps ? 443 : 80; require("./server/websocket.js"); app.use(baseUrl,express.static('src/main/webapp/')); global.repo = new EcRepository(); -repo.selectedServer = process.env.CASS_LOOPBACK || "http://localhost/api/"; +repo.selectedServer = process.env.CASS_LOOPBACK || envHttps ? "https://localhost/api/" : "http://localhost/api"; repo.selectedServerProxy = process.env.CASS_LOOPBACK_PROXY || null; global.elasticEndpoint = process.env.ELASTICSEARCH_ENDPOINT || "http://localhost:9200"; @@ -63,9 +65,16 @@ require("./server/adapter/replicate/replicate.js"); let v8 = require("v8"); skyrepoMigrate(function(){ - app.listen(port, async () => { + var options = { + key: fs.readFileSync('cass.key'), + cert: fs.readFileSync('cass.crt'), + ca: global.ca = fs.readFileSync('ca.crt'), //client auth ca OR cert + requestCert: true, //new + rejectUnauthorized: process.env.CLIENT_SIDE_CERTIFICATE_ONLY == 'true' || false //new + }; + const after = async () => { global.elasticSearchInfo = await httpGet(elasticEndpoint + "/", true); - console.log(`CaSS listening at http://localhost:${port}${baseUrl}`); + console.log(`CaSS listening at http${envHttps?'s':''}://localhost:${port}${baseUrl}`); console.log(`CaSS thinks it its endpoint is at ${repo.selectedServer}`); if (repo.selectedServerProxy != null) console.log(`CaSS talks to itself at ${repo.selectedServerProxy}`); @@ -73,5 +82,12 @@ skyrepoMigrate(function(){ console.log("Startup time " + (new Date().getTime() - startupDt.getTime()) + " ms"); let totalHeapSizeInGB = (((v8.getHeapStatistics().total_available_size) / 1024 / 1024 / 1024).toFixed(2)); console.log(`Total Heap Size ${totalHeapSizeInGB}GB`); - }); + }; + if (envHttps) + { + https.createServer(options, app).listen(port, after); + https.globalAgent.options.rejectUnauthorized = false; + } + else + app.listen(port,after); }); diff --git a/src/main/server/shims/levr.js b/src/main/server/shims/levr.js index 97caddf24..b2b5be3b7 100644 --- a/src/main/server/shims/levr.js +++ b/src/main/server/shims/levr.js @@ -1,6 +1,5 @@ const fs = require('fs'); const formidable = require('formidable'); -const axios = require('axios'); //LEVR shims if (global.fileLoad === undefined) @@ -169,12 +168,56 @@ global.bindWebService = function(endpoint,callback){ }) } console.log("Binding endpoint: /api" + endpoint) - app.get(baseUrl + '/api'+endpoint,get); - app.post(baseUrl + '/api'+endpoint,post); - app.put(baseUrl + '/api'+endpoint,put); - app.delete(baseUrl + '/api'+endpoint,deleet); + app.get(baseUrl + '/api' + endpoint,get); + app.post(baseUrl + '/api' + endpoint,post); + app.put(baseUrl + '/api' + endpoint,put); + app.delete(baseUrl + '/api' + endpoint,deleet); } +app.use(async function (req, res, next) { + if (!req.client.authorized) { + //console.log('User is not Client Side Certificate authorized'); + next(); + return; + } + //examine the cert itself, and even validate based on that! + var cert = req.socket.getPeerCertificate(); + if (cert.subject) { + if (cert.subject.emailAddress != null) + { + console.log(`Securing Proxy: Creating signature sheet for request from ${cert.subject.emailAddress}.`) + let eim = new EcIdentityManager(); + let myKey = loadConfigurationFile("keys/"+cert.subject.emailAddress, () => { + return EcPpk.fromPem(rsaGenerate()).toPem(); + }); + let i = new EcIdentity(); + i.displayName = cert.subject.CN; + i.ppk = EcPpk.fromPem(myKey); + eim.addIdentity(i); + let p = null; + try{ + p = await EcPerson.getByPk(repo,i.ppk.toPk(),null,null,eim); + }catch(ex){ + console.log("Could not find person."); + } + if (p == null) + { + console.log("Creating person."); + p = new EcPerson(); + p.addOwner(i.ppk.toPk()); + p.assignId(repo.selectedServerProxy == null ? repo.selectedServer : repo.selectedServerProxy,i.ppk.toPk().fingerprint()); + p.name = cert.subject.CN; + p.email = cert.subject.emailAddress; + await repo.saveTo(p); + } + let signatureSheet = await eim.signatureSheet(60000,repo.selectedServerProxy == null ? repo.selectedServer : repo.selectedServerProxy); + req.headers.signatureSheet = signatureSheet; + req.eim = eim; + } + } + next(); +}); + if (global.fileFromDatastream === undefined) global.fileFromDatastream = function(dataStream){ if (this.dataStreams === undefined || this.dataStreams == null) return null; @@ -329,6 +372,7 @@ global.error = function(errormessage,status){ let e = {}; e.data = errormessage; e.status = status; + e.stack = new Error().stack; console.error(e); throw e; } diff --git a/src/main/server/skyId.js b/src/main/server/skyId.js index e03897f59..d851412e0 100644 --- a/src/main/server/skyId.js +++ b/src/main/server/skyId.js @@ -139,9 +139,18 @@ var skyIdLogin = async function() { delete (get)["password"]; return JSON.stringify(get); }; -var loadConfigurationFile = function(path, dflt) { +global.loadConfigurationFile = function(path, dflt) { if (fs.existsSync("etc") == false) fs.mkdirSync("etc"); + let pathParts = path.split("/"); + pathParts.pop(); + let cumulativePath = "etc/"; + for (let path of pathParts) + { + cumulativePath += path + "/"; + if (fs.existsSync(cumulativePath) == false) + fs.mkdirSync(cumulativePath); + } if (fs.existsSync(path)) return fileToString(fileLoad(path)); if (fs.existsSync("etc/" + path)) diff --git a/src/main/server/skyRepo.js b/src/main/server/skyRepo.js index 08b3bb51f..aa2ab7d30 100644 --- a/src/main/server/skyRepo.js +++ b/src/main/server/skyRepo.js @@ -1,4 +1,5 @@ const EcRsaOaepAsync = require('cassproject/src/com/eduworks/ec/crypto/EcRsaOaepAsync'); +const EcEncryptedValue = require('cassproject/src/org/cassproject/ebac/repository/EcEncryptedValue'); const fs = require('fs'); var elasticEndpoint = process.env.ELASTICSEARCH_ENDPOINT || "http://localhost:9200"; @@ -150,7 +151,7 @@ var filterResults = async function(o) { try { result = await (filterResults).call(this, ary[i], null); }catch (ex) { - if (ex != null && ex.toString().indexOf("Signature Violation") != -1) + if (ex != null && ex.toString().indexOf("Signature Violation") == -1) throw ex; } if (result == null) { @@ -172,7 +173,21 @@ var filterResults = async function(o) { break; } if (!foundSignature) - throw new RuntimeException("Signature Violation"); + throw new RuntimeException("Signature Violation"); + console.log("Something decryptable!"); + if (this.ctx.req.eim != null) + { + console.log("We can decrypt it!"); + try + { + o = await EcEncryptedValue.fromEncryptedValue(rld,null,null,this.ctx.req.eim) + o = JSON.parse(o.toJson()); + console.log("We decrypted it!"); + } + catch (msg){ + console.log("We couldn't decrypt it, hope the client has better luck! -- " + msg); + } + } } var keys = EcObject.keys(o); for (var i = 0; i < keys.length; i++) {