diff --git a/Makefile b/Makefile index eac3551..00cc1ae 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ dev: $(KIND) $(KUBECTL) @sudo $(KIND) create cluster --name=$(PROJECT_NAME)-dev --kubeconfig=$(USER_DIR)/.kube/config @$(KUBECTL) cluster-info --context kind-$(PROJECT_NAME)-dev @$(INFO) Installing Crossplane CRDs - @$(KUBECTL) create -k https://github.com/crossplane/crossplane//cluster?ref=master + @$(KUBECTL) create -k https://github.com/crossplane/crossplane//cluster?ref=v1.16.2 @$(INFO) Installing Provider temporal CRDs @$(KUBECTL) apply -R -f package/crds @$(INFO) Start Provider temporal via: $(GO) run cmd/provider/main.go --debug diff --git a/README.md b/README.md index 63b455d..9e17ab1 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,11 @@ spec: Provider Credentials with TLS: ``` { - "HostPort": "temporal:7233" - "UseTLS": true - "CACert": "-----BEGIN CERTIFICATE-----here insert CA certificate-----END CERTIFICATE-----" - "CertFile": "-----BEGIN CERTIFICATE-----here insert certificate-----END CERTIFICATE-----" - "KeyFile": "-----BEGIN RSA PRIVATE KEY-----here insert key-----END RSA PRIVATE KEY-----" + "HostPort": "temporal:7233", + "UseTLS": true, + "CACert": "-----BEGIN CERTIFICATE-----\nhere insert CA certificate\n-----END CERTIFICATE-----", + "CertFile": "-----BEGIN CERTIFICATE-----\nhere insert certificate\n-----END CERTIFICATE-----", + "KeyFile": "-----BEGIN RSA PRIVATE KEY-----\nhere insert key\n-----END RSA PRIVATE KEY-----", } ``` # Troubleshooting @@ -205,3 +205,14 @@ Start temporal environment for tests ``` sudo docker-compose -f tests/docker-compose.yaml up ``` +## TLS + +In case test certificates are expired, run `bash certs/generate-test-certs.sh` and new certificates will be created. + +Then, edit `internal/clients/service_test.go` and update the new test certificates to `jsonConfig` after you replace the newlines with `\n`. + +``` +awk 'NR > 1 {printf "\\n"} {printf "%s", $0} END {printf ""}' certs/client.pem +awk 'NR > 1 {printf "\\n"} {printf "%s", $0} END {printf ""}' certs/client.key +awk 'NR > 1 {printf "\\n"} {printf "%s", $0} END {printf ""}' certs/ca.crt +``` diff --git a/certs/ca.cert b/certs/ca.cert new file mode 100644 index 0000000..3992f4c --- /dev/null +++ b/certs/ca.cert @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFRTCCAy2gAwIBAgIUTfLoHTSYNEx0LXYnju+wJF6EP4EwDQYJKoZIhvcNAQEL +BQAwMjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAldBMRYwFAYDVQQKDA1UZXN0IENB +LCBJbmMuMB4XDTI0MDkyMDExMzY1OFoXDTI1MDkyMDExMzY1OFowMjELMAkGA1UE +BhMCVVMxCzAJBgNVBAgMAldBMRYwFAYDVQQKDA1UZXN0IENBLCBJbmMuMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq2+PV/h7kTWoUI3KhadR5yvrnqW4 +/NiBAV6TToxMK97KSs2J5EAIKjtg3o+1vL2Tkc6mOAegqGLsVWwpxUCTChBPDjiM +LsBx1c7uTU0m7eDIBoMDMNy5Vy+tvT5vey+pdM4KORdzHIkjctilWWdJuUF+qRzp +ijgIruNsEj5CbYz57xXoS3wErfJlUu9GX+LFizR2OQMvIiF09dTbTyQ1a2bOmQYD +8nVz7yo7ENCJlPonQYkSBfVuXIyR5LTouPsv2DYNGlT63rwEY3t0aq23Datmv9QP +2k1jCMz3HcTUFHa+ErSd6opJYr9Fw+J6k/Ifho8xq3R6iJ5D9Wk15ozPA9tdZt/T +vBmDb0QD9SvIirLuDBZ2eHbdCG2uLq/tLf87f04y3Q4VcAa0CCp+mGCMil9pnSki +LqmcD0iAApQU3RtdX6uqV1TC9oK7UYomJY4nB2EwneIpYDupQPjZhCtlxGJboxkC +pZR79TTe1duoUKS6sm0LiJZ65eXmADLJeqrNBoSheHFrQOYcFZ5bfoA83uEhcNnw +4NqhKrIm2L5NZZOITNvnsASGftL38O2FkflU24pYMIRf4q2IoTGSxXbzMMoveKXw +p2FPUUEv/EVJbPWnWKKATRJY6BJaHEPzsSqUX2GaEqxQPsVigWf9wyVcf4XrkIP4 +lbNtWyRIXi3D3hcCAwEAAaNTMFEwHQYDVR0OBBYEFL3nlLBSjx4kwpQrmkkInt2A +SA+lMB8GA1UdIwQYMBaAFL3nlLBSjx4kwpQrmkkInt2ASA+lMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQELBQADggIBAAEtkQ4MeRo7KYonhE5373xbtMNXkKhK +vnDHJQL3YWUa+sY/+siZYK0dj+ZVSk3WAlI4MQyml66RV97uj/ywGIXvPFIU0v31 +qEAiqJ6ARDnxkfRFj3m7Kk7O3LN20TS4khFSXLvn4NHDswbyVpTePHTnN8Kqwn8b +tx657Y1zWvSqPrHYU4D0b2EjNt4P/DufMUJFtgyu26qOef0iAuhK+Tb6ZAUndZJd +BkxEl82/N5IYeSV6TnwuK3WmkgVqLt7jQ9ycOQGP23AloKsgDyAIaftw3Dl0RcR9 +4u7lEEoNq5RAOMewyPsCAz+l8kUvjXJ7zkAaI9MHWcAqutU96xExA1UlyBflTjE/ +cTbLa8Bv5Z1HgUnvTpuPZMUMEogRYpmsyPliWx+zmnlW+3JfyqyDchWst47wBJ96 +mBZ3bAPHTkU9TMmEuFz83awJlTKfYGBYovH3LOecYpgil6D5e8BkdICQRFBZlI+6 +FoGQAXm99KOvoS0t+fyoszhWDxkCR8qsdXqZNjMl9TLweLazSqd+oXoNcQ7TvA6r +oTnrnRZMOrVk68ad3MtalYJoBRAx2QfMNR6fPzS2xJ85tpCXcLMDSbFoW5jamX0x +Y42DQDWrqdV8j9q2J3HvevRHljTO7viSFa7s7QJj78vwP4ExlSTwojQaToAEhbL8 +jo2clz/N0p+0 +-----END CERTIFICATE----- diff --git a/certs/ca.key b/certs/ca.key new file mode 100644 index 0000000..18284f1 --- /dev/null +++ b/certs/ca.key @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAAS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aRBNFfeLy89buOaPLCKpKfqsTq3C +8zQHFQ1p7vnH0BzuJJX71sSquLEr9zXqaYX1sLYYxsUzKCsjQc508DtakjRVV7wM +2isdzxJUDxkmgrpPaAG6RFZhKNMghf6iSk56Oz+gxaueOC7FtWoaK1eftb8XeW6Z +RvJI8ZDIY1zOa3DaDRYb46/8hMQ4BNg4M22il45T2m/RoaiGQLpzEsM2qjRbi4dI +sNZgguntpGPTnjV07w5HaCtezfNFcA3a3saaiwc97qNH73BRQK4788bPClPwRJst +nElhQRlthvIJnMQaaSBJAtMhYMpACy6VoMnj2bd9AoIBAErVKbV/xvRZjPloh3FA +ELJ+j/8ghdzK5Ud02BAjA0fePw2IgH6YgywjCOgzXGgUVWLAuDgyw/XpXXzk+D+f +PF0+u6Rv/GNu0sdjyVvsU4gMNF4dJ4qylw0+LoXGRgLU18Fd02NgO8LSWM8vEIm8 +sMWtzjmJs5gms6GYk7ErHqXOXFm1mGL6FZq6bn/cukkrQNUGwrnTZl/bg9ccANNs +gRHu1+HOfqxQwG5oTwhLbKlDUwlDpNzHl80jRzYUzUz7xTGwsxVpo2/ACtLKNn5V +M+64TqvMbIQYssectEZxTwZ5WY/MeieWMojaTc8DgV2+Z41fDlv2FF3ix2acRopE +Ru0CggEAG8rYI8Ir1IAYxnMSjQ6++B37tAzUn0TqUsoCZ3wjqcpxf0Q7VEKG22wK +Gq1iuxcaEYjNBg+zEhL9kMT7Ed1K33SpCtjAHuQhCjzC9rgorD2deGIJrWnqXlnQ +RS+bCmcrm9s1W2kOQq3xQUVvpl/LIO9VZ19EmEAo4fBaSvgJbQUtk90NmqjoX981 +wPNS0DMzQumdPUclwim6YymduP4g4QliWYSwV/Ue+M9OWhid5VLzmQ+sfcwP/NZr +PCMFe5GjYrpFUy5FwDn47ikREyXKTeEHmibhHx1ELihHH1gl7vcLVgNZygTZppgH +3vFcwPypj4FnAW2jHERczK/qW8aUAA== +-----END PRIVATE KEY----- diff --git a/certs/ca.srl b/certs/ca.srl new file mode 100644 index 0000000..5c83903 --- /dev/null +++ b/certs/ca.srl @@ -0,0 +1 @@ +108EE74BEE2DF16DC7606352858393CE52087685 diff --git a/certs/client-cert.conf b/certs/client-cert.conf new file mode 100644 index 0000000..69b35ba --- /dev/null +++ b/certs/client-cert.conf @@ -0,0 +1,17 @@ +[req] +default_bits = 4096 +prompt = no +default_md = sha256 +req_extensions = req_ext +distinguished_name = dn +[dn] +C = US +ST = WA +O = Test Client, Inc. +CN = localhost +[req_ext] +subjectAltName = @alt_names +[alt_names] +DNS.1 = localhost +IP.1 = ::1 +IP.2 = 127.0.0.1 \ No newline at end of file diff --git a/certs/client.csr b/certs/client.csr new file mode 100644 index 0000000..b12100e --- /dev/null +++ b/certs/client.csr @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIEzjCCArYCAQAwSjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAldBMRowGAYDVQQK +DBFUZXN0IENsaWVudCwgSW5jLjESMBAGA1UEAwwJbG9jYWxob3N0MIICIjANBgkq +hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAt9KS+Cgaqaj1YdQw0Pkzb3lij3Iqt37p +WMWxiqo/8ujUYRxOdhz9J320wBVCqUENnag8bvXmJxmRaeBC7rCCxoNXxsEuWAU+ +iN4dJvmjSbyJ+xoe9SyNfo/D4BxVtuhGxBp1g6doLnpC69priIK3k7uvP0bhP8hS +ahSit4FdXg5me4zq1FHWbTJ9Aw5Cx8x2pENvPAwjhgOPF7WhJ2Qw0b5aSP2bzJiK +PRswOKU3sCqbkio93RhkoTfX9SlUoYuwIC0UO1+9v8rNI/AzaXKOFYfGf8wo76ec +E/TSOrfbgbcFbcHfDi/i25Z2kz+B33rhu8B1hgqOscDLKbIo5c3pdMPskL7G3ac4 +Og3MLymvygYXi2hC2W3UpH1nerghrwRNWohTnLHAwU6U/i9QjGI5WNAokitYJNau +O9a8r0nP21eWpbjCVLOsZaoN5blxlnzVpIyC8IFPpKgP428iivAqA43WeTo1zeH2 +ZGw3KzT+UDCBvgkgeZQtI4HacXSkMDyfGwFvDAHbX31y9/Frjead/BsBr8DQxVqU ++eMa46OmRey5jcKs/KUg5MAwLQKcrB1mr5kJVgSkBAsgBBoXvB05S9tM4YPgHj/d +57U2XkOJ8pp8MsoC6VlwQrCGC/UMnk0/zIctjJszdQ6yGVQeEJEpQQuve8+VbHBw +z6uyr85++CECAwEAAaA/MD0GCSqGSIb3DQEJDjEwMC4wLAYDVR0RBCUwI4IJbG9j +YWxob3N0hxAAAAAAAAAAAAAAAAAAAAABhwR/AAABMA0GCSqGSIb3DQEBCwUAA4IC +AQCDI8Fws7B0/aEaHP9s39PUao5pS6bHC81DSQkOTKxMTsjnGjztGruL81t3XQHp +U8noJD6BDLHIn9M0KnvBl0FwvmQK1ef8K10xKYE7cxnl5xljclRcDtEJdbKbOpZq +RXc93WLyzJ4DiMhim56PejKjM9gF4cjTPxlfZMP2jGYGbTt7YU8ELUb/M99/Yefr +u6od8ij7z1dUej4P5TCrG3Yz9XQi5aKg6EPfEanY6GLV6mhyrIhggtzoJnXZ0myc +jUBmn5Cj9lg7MvP7Pl9+V3izV83uUgKKHEJqWB3XUaMzsOLLQiihCXT4PDc7tLDG +EcovYrehnho0AZLaaoRoUlV98efC/+w30SOav/aSMxwmYM6ZRnLHKbtMQEofBGEV +UpoN4w0nq7cGV5xas8XecVjFSbfPcY63LsUyUiEO0w2IaqMqPN5xlXh4jrPYlsCz +bhXiP9C2J6DgMiXKlJsQtX4AZwW92ZfTdpG1QXM0cw1EqcZimr1y+KJi3GEcrcpF +BraWnztQra6s1AbyEkv10YP377w+1DO6A37So4gQSFKSsLVZnrX2R5ovBKHZaAoX +++3YEZpsBZ5OGX3z4WBfOsTc01ES8o8TnllH8nqW75FyooNjKkVmzIoqB3BnY5dm +t5NEO9tIXpcT6hK6LkASYoWMzViuXURGRrZSdiFAN2QuIg== +-----END CERTIFICATE REQUEST----- diff --git a/certs/client.key b/certs/client.key new file mode 100644 index 0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wwcyIPbIPwSObLgWfSEI1d +jLG9z3ZTkwHuHm/qkFZG/RKSsOgw +-----END PRIVATE KEY----- diff --git a/certs/client.pem b/certs/client.pem new file mode 100644 index 0000000..94df9fd --- /dev/null +++ b/certs/client.pem @@ -0,0 +1,32 @@ +-----BEGIN CERTIFICATE----- +MIIFejCCA2KgAwIBAgIUEI7nS+4t8W3HYGNShYOTzlIIdoUwDQYJKoZIhvcNAQEL +BQAwMjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAldBMRYwFAYDVQQKDA1UZXN0IENB +LCBJbmMuMB4XDTI0MDkyMDExMzY1OFoXDTI1MDkyMDExMzY1OFowSjELMAkGA1UE +BhMCVVMxCzAJBgNVBAgMAldBMRowGAYDVQQKDBFUZXN0IENsaWVudCwgSW5jLjES +MBAGA1UEAwwJbG9jYWxob3N0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC +AgEAt9KS+Cgaqaj1YdQw0Pkzb3lij3Iqt37pWMWxiqo/8ujUYRxOdhz9J320wBVC +qUENnag8bvXmJxmRaeBC7rCCxoNXxsEuWAU+iN4dJvmjSbyJ+xoe9SyNfo/D4BxV +tuhGxBp1g6doLnpC69priIK3k7uvP0bhP8hSahSit4FdXg5me4zq1FHWbTJ9Aw5C +x8x2pENvPAwjhgOPF7WhJ2Qw0b5aSP2bzJiKPRswOKU3sCqbkio93RhkoTfX9SlU +oYuwIC0UO1+9v8rNI/AzaXKOFYfGf8wo76ecE/TSOrfbgbcFbcHfDi/i25Z2kz+B +33rhu8B1hgqOscDLKbIo5c3pdMPskL7G3ac4Og3MLymvygYXi2hC2W3UpH1nergh +rwRNWohTnLHAwU6U/i9QjGI5WNAokitYJNauO9a8r0nP21eWpbjCVLOsZaoN5blx +lnzVpIyC8IFPpKgP428iivAqA43WeTo1zeH2ZGw3KzT+UDCBvgkgeZQtI4HacXSk +MDyfGwFvDAHbX31y9/Frjead/BsBr8DQxVqU+eMa46OmRey5jcKs/KUg5MAwLQKc +rB1mr5kJVgSkBAsgBBoXvB05S9tM4YPgHj/d57U2XkOJ8pp8MsoC6VlwQrCGC/UM +nk0/zIctjJszdQ6yGVQeEJEpQQuve8+VbHBwz6uyr85++CECAwEAAaNwMG4wLAYD +VR0RBCUwI4IJbG9jYWxob3N0hxAAAAAAAAAAAAAAAAAAAAABhwR/AAABMB0GA1Ud +DgQWBBSyv1xsyjmiMpxPoDwXyqv3m40etDAfBgNVHSMEGDAWgBS955SwUo8eJMKU +K5pJCJ7dgEgPpTANBgkqhkiG9w0BAQsFAAOCAgEAgvdRnBGB5mqtcUaYeKFBsl0w +RDUOOQpMXJ1KF4oUovJnAIG0RlY93+ULi78riTfHoHZ0spQCL+cplW2PPJaWIaOr +nYGjr92EoR2wQ+wU1sCbq+q+UbzNc3tB1OcYXDbWZew1mkWQpLi/WW4n2rqJM81H +Vb1AqlAFXEf20Z7+2L3gPzz7tq8uaGffiTAO1GLUNd3XcnMiXwvI9MzVJfIwOQyb +iVFHKI4BLYNV8M3rJp1bs0C4jdFxhP5wR+X3F9UftgmKjIjBVV4DvcP6Otwk/qPi +vBd7Zbe4Don4tRr/ihQZ9AE0UghloKfic+xadEkDQsiZ4/VIVqWmRldyriDSsGKY +yayoukVPGQFvNw+4HUZPnpTwn16pn90k5MCEanVHo0MkXqnHziN+R8aV2nBbj1um +SS6oNUjxQENuQBSFXZjKurssLQVVqolBjI/phD5miY8FfAcxjnAcU/LuYrq75u8K +Fb5cO9ra19YmWtumMiabaoyVxjLLH/QYu6NMmVBa1NrLObz9UAIEUUbdWN05vPBK +iJuLXwD1XeBYxmjiI59cl/H2urpX20FxiHJeC3T49p/SiryixxK6fp+hnJNOfY75 +QfccXTAFYngqrs7UGkiDn7AYEl2Ffv44CvWRvACIiL1TqxRgPdJZHceYqLwCfbgV +cmoFO2F27/Uo4XmKOgw= +-----END CERTIFICATE----- diff --git a/certs/client.pfx b/certs/client.pfx new file mode 100644 index 0000000..30a6585 Binary files /dev/null and b/certs/client.pfx differ diff --git a/certs/cluster-cert.conf b/certs/cluster-cert.conf new file mode 100644 index 0000000..3129f9e --- /dev/null +++ b/certs/cluster-cert.conf @@ -0,0 +1,16 @@ +[req] +default_bits = 4096 +prompt = no +default_md = sha256 +req_extensions = req_ext +distinguished_name = dn +[dn] +C = US +ST = WA +O = Test Cluster, Inc. +CN = localhost +[req_ext] +subjectAltName = @alt_names +[alt_names] +DNS.1 = localhost +IP.1 = ::1 diff --git a/certs/cluster.csr b/certs/cluster.csr new file mode 100644 index 0000000..c2203b1 --- /dev/null +++ b/certs/cluster.csr @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIEyTCCArECAQAwSzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAldBMRswGQYDVQQK +DBJUZXN0IENsdXN0ZXIsIEluYy4xEjAQBgNVBAMMCWxvY2FsaG9zdDCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAKvqyPeaqVo4f2qv18FFwcmg2OVjRWJJ +o2rC1A2ZvFjcQwF7e3k4DYM/g1NCIbEV/O3d9/FfFg32x+KJxU7SRFd/soMl/BXz +x6uipHZFfIrTzkFantaVLvVGOuGg1Ho2qDl8vW9JhHE9J/Jrc7c+uDDBDuBIEMUH +OSa7Qn5+U1FUjidQB0/KkK/viZHGsmL6mWQb8lTAATRPx5mN1IX2rsyYIeSHFflg +A2JMz5uVYoZ5k6Rh27oL5vFM0aVkUQMs6iAtWu5CseMjPBgatruBw0qYZo9cfKlr +/1C5dFKWLfYzI5tX3PsUreP4RbD24E0bj18kRiaY/RG9ZBrCVe4Dx3IXUvQAZ25J +XMopWL5Vj74IYbFY7EgZ9rS3t/5YfSJyZ8Qz636qqz0GcQTBI86XxtVSICcbC6ah +YRnlCAdrFkmFiY8eek/8RoRrE1Rt1bi2w3PR2rgDUx4UeTIPDr8X5eOKMEGfdNJO +t2+wuigZHyaCl6SoEAVsnl7BqhmNeNuPkj2yFswqj/RBwlZM/QpZWCTbQ4+4ctEV +vesVldbOdTHR7/4QuoRo1Ej+lhO6JzL2d9qnLr0/HF7fsZTH0o2ToGYOmZqcyGaM +EpHEoIUcY3Lw4uiN9NFAFaqjG/59jt+xqeoZ0XHzqozfCM7Hi88pZtPjQu1vvt8t +vlGS9VfPX54TAgMBAAGgOTA3BgkqhkiG9w0BCQ4xKjAoMCYGA1UdEQQfMB2CCWxv +Y2FsaG9zdIcQAAAAAAAAAAAAAAAAAAAAATANBgkqhkiG9w0BAQsFAAOCAgEAib8z +BbN6Fg6gEcbQwWOHQPRqa5Wuzi9PIXLQL8j1FU94mMVQPJ0M9h3VA/D5XzCpMGTe +HLdcMf5srFl6QYMs758TWYcBvXqdhOhxrprqr9VEK8ac+3BGoThfE5O2nwzeqU7k +x0pqIjmX/wNAAG9zf+SI3qp+XyfequcjXIU4lp0SBW1NZgYuq5tsSc5vhYJ3PxCO +NQ+x6hZKDKGxN31LOP1xCbHdVYLE+pOeV5CmwJPh7xETilkV4+f2pN5kj7P97oYZ +Onn7XzBHtLYfJ3lx10uhxtVNSQAQzm7XemkiBNUTc+pCHWPIo9AVVPYuw4qCUEqf +F7ivaz1tPESh1ngfxB/PM80VFPhaQLDQcHgURFH/3WZh7gEe/VrSTQtJ2u/8q78z +v41QWy6ljEIgfJ0hKcivoKSjU3qXwFuUhLeoJoYusRPID96h9Eeabgs3Xa0Eqtqc +9UeLNZE+DUBrZWzNMG1KgcSp3QjqIHnIzYaiWDX5qnkYnUATxfOa2G8Is4b4A3f4 +UwemMZEI+MncLaFwtJEp9/UlBqkf+LiSuAZ3f/LeNrOUEj1vT2CRJNvzRSRx2lZb +oYO5D96MV9TKreED+Y2EKq3gyPtA3GdymkycXEn8ejTyj04T7ALCAUmwaC05ipp5 +4CmlTM61isXL1nsUlUGyDTb8WudvBVqBjHILQyI= +-----END CERTIFICATE REQUEST----- diff --git a/certs/cluster.key b/certs/cluster.key new file mode 100644 index 0000000..61653d1 --- /dev/null +++ b/certs/cluster.key @@ -0,0 +1,52 @@ +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qSxQ== +-----END PRIVATE KEY----- diff --git a/certs/cluster.pem b/certs/cluster.pem new file mode 100644 index 0000000..71a5885 --- /dev/null +++ b/certs/cluster.pem @@ -0,0 +1,32 @@ +-----BEGIN CERTIFICATE----- +MIIFdTCCA12gAwIBAgIUEI7nS+4t8W3HYGNShYOTzlIIdoQwDQYJKoZIhvcNAQEL +BQAwMjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAldBMRYwFAYDVQQKDA1UZXN0IENB +LCBJbmMuMB4XDTI0MDkyMDExMzY1OFoXDTI1MDkyMDExMzY1OFowSzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgMAldBMRswGQYDVQQKDBJUZXN0IENsdXN0ZXIsIEluYy4x +EjAQBgNVBAMMCWxvY2FsaG9zdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAKvqyPeaqVo4f2qv18FFwcmg2OVjRWJJo2rC1A2ZvFjcQwF7e3k4DYM/g1NC +IbEV/O3d9/FfFg32x+KJxU7SRFd/soMl/BXzx6uipHZFfIrTzkFantaVLvVGOuGg +1Ho2qDl8vW9JhHE9J/Jrc7c+uDDBDuBIEMUHOSa7Qn5+U1FUjidQB0/KkK/viZHG +smL6mWQb8lTAATRPx5mN1IX2rsyYIeSHFflgA2JMz5uVYoZ5k6Rh27oL5vFM0aVk +UQMs6iAtWu5CseMjPBgatruBw0qYZo9cfKlr/1C5dFKWLfYzI5tX3PsUreP4RbD2 +4E0bj18kRiaY/RG9ZBrCVe4Dx3IXUvQAZ25JXMopWL5Vj74IYbFY7EgZ9rS3t/5Y +fSJyZ8Qz636qqz0GcQTBI86XxtVSICcbC6ahYRnlCAdrFkmFiY8eek/8RoRrE1Rt +1bi2w3PR2rgDUx4UeTIPDr8X5eOKMEGfdNJOt2+wuigZHyaCl6SoEAVsnl7BqhmN +eNuPkj2yFswqj/RBwlZM/QpZWCTbQ4+4ctEVvesVldbOdTHR7/4QuoRo1Ej+lhO6 +JzL2d9qnLr0/HF7fsZTH0o2ToGYOmZqcyGaMEpHEoIUcY3Lw4uiN9NFAFaqjG/59 +jt+xqeoZ0XHzqozfCM7Hi88pZtPjQu1vvt8tvlGS9VfPX54TAgMBAAGjajBoMCYG +A1UdEQQfMB2CCWxvY2FsaG9zdIcQAAAAAAAAAAAAAAAAAAAAATAdBgNVHQ4EFgQU +ZZEqU8TCqT8g2kMFORgQjNzcWPMwHwYDVR0jBBgwFoAUveeUsFKPHiTClCuaSQie +3YBID6UwDQYJKoZIhvcNAQELBQADggIBAG9ux4A3G1gHP+coM9cEjrl2vxNgIZQX +0Gs47oPH98Bw7j8OvTngf7g0cz4Q+Afv2mdK8s95pxy09SDUpZcKinrM1CSoSl7A +6iMymOiRmS5C2gbpfe9Nd+MbuuCqxIfUha7Y2s/XO1+E+Cxf2wBztXteISLmkAVZ +ZearrYYhpySflbMiNeCU0/yvmdAC0BL51zR8fvZ/LvYOK0mEkAvc5jKJrXNBNlkL +IoElKE7lkRSb5ZbiXBBfJ+m9bc+i53Vbr9NoHHqA/nWPnCg8YmrJhl7/qaZOC1u+ +czs1Dj05oHx+WNfR8A5xnTcmCrgtLpf0Bg+1mx6QHAgHk73+SoOu8OEAqeCmKz10 +U30LguB6TDPK90yUhIZHo6FJxQJoKex7ph0WhLwGM8NAiTSApZcvuZbVOu4y7kKm ++y7QK80XCICajr4iKJQSm7kqsoEA5HawZGH0LcaO7+zp+Jnka4bB6RIbfbAePkYx +r8dF3vs69JdPAkklRcW6NIWUA3tQT/RcFBQlG8+dO8MynrTsrWQh+VuqSdZBtcyk +/AYAfXJPKO2JrzwE9PnN32FFvbvhJ967C3WVcDB0nTw7sQDvr42GGT8pfqOkN1z6 +qvjteAgbOceRsnR/Zl/SjENo5By67n7EmKFIznWffGeZurtoA5KM7YuhCdnd51uS +LwpXS8CJoWtJ +-----END CERTIFICATE----- diff --git a/certs/generate-test-certs.sh b/certs/generate-test-certs.sh new file mode 100755 index 0000000..e5b4437 --- /dev/null +++ b/certs/generate-test-certs.sh @@ -0,0 +1,22 @@ +# This scripts generates test keys and certificates for the sample. +# In a production environment such artifacts should be genrated +# by a proper certificate authority and handled in a secure manner. + +CERTS_DIR=./certs +mkdir $CERTS_DIR + +# Generate a private key and a certificate for a test certificate authority +openssl genrsa -out $CERTS_DIR/ca.key 4096 +openssl req -new -x509 -key $CERTS_DIR/ca.key -sha256 -subj "/C=US/ST=WA/O=Test CA, Inc." -days 365 -out $CERTS_DIR/ca.cert + +# Generate a private key and a certificate for cluster +openssl genrsa -out $CERTS_DIR/cluster.key 4096 +openssl req -new -key $CERTS_DIR/cluster.key -out $CERTS_DIR/cluster.csr -config $CERTS_DIR/cluster-cert.conf +openssl x509 -req -in $CERTS_DIR/cluster.csr -CA $CERTS_DIR/ca.cert -CAkey $CERTS_DIR/ca.key -CAcreateserial -out $CERTS_DIR/cluster.pem -days 365 -sha256 -extfile $CERTS_DIR/cluster-cert.conf -extensions req_ext + +# Generate a private key and a certificate for clients +openssl req -newkey rsa:4096 -nodes -keyout "$CERTS_DIR/client.key" -out "$CERTS_DIR/client.csr" -config $CERTS_DIR/client-cert.conf +openssl x509 -req -in $CERTS_DIR/client.csr -CA $CERTS_DIR/ca.cert -CAkey $CERTS_DIR/ca.key -CAcreateserial -out $CERTS_DIR/client.pem -days 365 -sha256 -extfile $CERTS_DIR/client-cert.conf -extensions req_ext +# Export to .pfx +# "-keypbe NONE -certpbe NONE -passout pass:" specifies an unencrypted archive +openssl pkcs12 -export -out $CERTS_DIR/client.pfx -inkey $CERTS_DIR/client.key -in $CERTS_DIR/client.pem -keypbe NONE -certpbe NONE -passout pass: diff --git a/internal/clients/namespace_test.go b/internal/clients/namespace_test.go index 3bb103f..2d7621f 100644 --- a/internal/clients/namespace_test.go +++ b/internal/clients/namespace_test.go @@ -22,6 +22,16 @@ func createTemporalNamespaceService(t *testing.T) *TemporalServiceImpl { return temporalService } +func createTemporalNamespaceServiceTLS(t *testing.T) *TemporalServiceImpl { + temporalService := createTemporalServiceTLS(t) + + _, err := temporalService.DeleteAllNamespaces(context.Background()) + if err != nil { + t.Fatal(err) + } + return temporalService +} + func createDefaultNamespaceParametersWithName(name string) *core.TemporalNamespaceParameters { desc := "Desc1" mail := "Test1@mail.local" @@ -234,6 +244,64 @@ func TestCreateDelete(t *testing.T) { assertNamespacesCount(t, temporalService, 0) } +func TestCreateTLS(t *testing.T) { + skipIfIsShort(t) + + temporalService := createTemporalNamespaceServiceTLS(t) + testNamespace := createDefaultNamespaceParametersWithName("TestTLS007") + + err := temporalService.CreateNamespace(context.Background(), testNamespace) + if err != nil { + t.Fatal(err) + } + + created, err := temporalService.DescribeNamespaceByName(context.Background(), testNamespace.Name) + if err != nil { + t.Fatal(err) + } + + assertNamespaceAreEqual(t, temporalService, created, testNamespace) + assertNamespacesCount(t, temporalService, 1) + + _, err = temporalService.DeleteNamespaceByName(context.Background(), testNamespace.Name) + if err != nil { + t.Fatal(err) + } + + assertNamespacesCount(t, temporalService, 0) +} + +func TestCreateDeleteTLS(t *testing.T) { + skipIfIsShort(t) + + temporalService := createTemporalNamespaceServiceTLS(t) + testNamespace1 := createDefaultNamespaceParametersWithName("TestTLS004") + + err1 := temporalService.CreateNamespace(context.Background(), testNamespace1) + if err1 != nil { + t.Fatal(err1) + } + + created1, err1 := temporalService.DescribeNamespaceByName(context.Background(), testNamespace1.Name) + if err1 != nil { + t.Fatal(err1) + } + + assertNamespaceAreEqual(t, temporalService, created1, testNamespace1) + assertNamespacesCount(t, temporalService, 1) + + deleted, err1 := temporalService.DeleteNamespaceByName(context.Background(), created1.Name) + if err1 != nil { + t.Fatal(err1) + } + + if deleted == nil { + t.Fatal("Namespace " + created1.Name + " not deleted") + } + t.Logf("Deleted: %s", *deleted) + assertNamespacesCount(t, temporalService, 0) +} + func assertNamespaceAreEqual(t *testing.T, temporalService NamespaceService, actual *core.TemporalNamespaceObservation, expected *core.TemporalNamespaceParameters) { mappedActual, err := temporalService.MapToNamespaceCompare(actual) if err != nil { diff --git a/internal/clients/searchattribute_test.go b/internal/clients/searchattribute_test.go index 5b4289e..8fad266 100644 --- a/internal/clients/searchattribute_test.go +++ b/internal/clients/searchattribute_test.go @@ -16,6 +16,11 @@ func createSearchAttributeService(t *testing.T) *TemporalServiceImpl { return temporalService } +func createSearchAttributeServiceTLS(t *testing.T) *TemporalServiceImpl { + temporalService := createTemporalServiceTLS(t) + return temporalService +} + func createSearchAttributeParameters(namespace string, attrName string, attrType string) *core.SearchAttributeParameters { return &core.SearchAttributeParameters{ Name: attrName, @@ -50,6 +55,32 @@ func TestCreateSearchAttribute(t *testing.T) { assertSearchAttributeCount(t, temporalService, testNamespace.Name, 0) } +func TestCreateSearchAttributeTLS(t *testing.T) { + skipIfIsShort(t) + + temporalService := createSearchAttributeServiceTLS(t) + testNamespace := createDefaultNamespaceParametersWithName("Test010") + + err := temporalService.CreateNamespace(context.Background(), testNamespace) + if err != nil { + t.Fatal(err) + } + + testAttr := createSearchAttributeParameters(testNamespace.Name, "test1TLS", "Keyword") + temporalService.CreateSearchAttribute(context.Background(), testAttr) + + foundSearchAttr, err := temporalService.DescribeSearchAttributeByName(context.Background(), testNamespace.Name, testAttr.Name) + if err != nil { + t.Fatal(err) + } + + assertSearchAttributesAreEqual(t, temporalService, foundSearchAttr, testAttr) + assertSearchAttributeCount(t, temporalService, testNamespace.Name, 1) + + temporalService.DeleteSearchAttributeByName(context.Background(), testNamespace.Name, testAttr.Name) + assertSearchAttributeCount(t, temporalService, testNamespace.Name, 0) +} + func assertSearchAttributesAreEqual(t *testing.T, temporalService SearchAttributeService, actual *core.SearchAttributeObservation, expected *core.SearchAttributeParameters) { mappedActual, err := temporalService.MapToSearchAttributeCompare(actual) if err != nil { diff --git a/internal/clients/service_test.go b/internal/clients/service_test.go index 1fe6513..f4f8e32 100644 --- a/internal/clients/service_test.go +++ b/internal/clients/service_test.go @@ -14,6 +14,20 @@ func createTemporalService(t *testing.T) *TemporalServiceImpl { return temporalService } +func createTemporalServiceTLS(t *testing.T) *TemporalServiceImpl { + j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SakZigR4VroMeEKlninFzyBrjEq82F7R0CggEAE4lttdaZC0547oaCUn9q\ndDi67Vl4/rw3bW+EfZ8x/+RLRVr+7y4US4YehhG3XKP0J9WMl/szJJ2tPx8eTQta\nzDkbsE9goI6WT721sEzI/rTQHZDy0L72vPudvPayF2/8g6gu/3mqa8De85I6m+Ig\nYkhsXxddd1YEPON44BvyNWNFWLd19hTOz6H6qh1XWgg7w7faJ2JLSX9QeCs3GuuU\nz3MaNOnzAPbaJkbHYI9XoQjX0Qj8WInqiQgKFSXZu0pvZLeP114KwobKELyrn/BG\n9FH7etGppoiSkvW+PD69uzYT768CQchQpQN35MaQH43kZLtpDO1n5fu2rX37YqOf\nrQKCAQBIMsdsjvgvKVaglIJIzIgR9eFTryFo3HRKD7wasb8dcmlzbN1dwTE4Cck2\nXeQI5Ne4ks/CLkS/ygi8yrsPx1N8eMnYz0aGJbPVk/zxfor1vrIBpUMKFMR2KhWC\nhCXz2TenOYcujc7KFJq828Ku5O6REfdo6CYFT8ag2PwZOVQwp6Okm1ehUq+f+QMN\nDrmxZadj5zL9qjMf2QXnQ5J1ihfDmuX0e36DarAq9f3jujblKFMEkAx+hocXoMmj\nmru+V50PbFH2uc4t/dcmCWMPm/BX7zrQwkJffatj7lwwcyIPbIPwSObLgWfSEI1d\njLG9z3ZTkwHuHm/qkFZG/RKSsOgw\n-----END PRIVATE KEY-----" + }` + + temporalService := createTemporalServiceWithConfig(t, jsonConfig) + + return temporalService +} + func createTemporalServiceWithConfig(t *testing.T, jsonConfig string) *TemporalServiceImpl { service, err := NewTemporalService([]byte(jsonConfig)) if err != nil { diff --git a/tests/docker-compose.yaml b/tests/docker-compose.yaml index 0c50a9c..eebd995 100644 --- a/tests/docker-compose.yaml +++ b/tests/docker-compose.yaml @@ -19,15 +19,77 @@ services: depends_on: - temporal environment: - - TEMPORAL_ADDRESS=temporal:7233 + - TEMPORAL_ADDRESS=temporal-for-tests:7233 ports: - 8181:8080 postgresql: image: postgres:13 + container_name: postgres environment: POSTGRES_PASSWORD: temporal POSTGRES_USER: temporal ports: - 5432:5432 volumes: - - /var/lib/postgresql/data \ No newline at end of file + - /var/lib/postgresql/data + temporal-tls: + image: temporalio/auto-setup:1.22.3.0 + container_name: temporal-tls-for-tests + ports: + - "7223:7233" + volumes: + - ${PWD}/certs:/certs + environment: + - DB=postgres12 + - DB_PORT=5432 + - POSTGRES_USER=temporal + - POSTGRES_PWD=temporal + - POSTGRES_SEEDS=postgresql-tls + - TEMPORAL_TLS_SERVER_CA_CERT=/certs/ca.cert + - TEMPORAL_TLS_SERVER_CERT=/certs/cluster.pem + - TEMPORAL_TLS_SERVER_KEY=/certs/cluster.key + - TEMPORAL_TLS_REQUIRE_CLIENT_AUTH=true + - TEMPORAL_TLS_FRONTEND_CERT=/certs/cluster.pem + - TEMPORAL_TLS_FRONTEND_KEY=/certs/cluster.key + - TEMPORAL_TLS_CLIENT1_CA_CERT=/certs/ca.cert + - TEMPORAL_TLS_CLIENT2_CA_CERT=/certs/ca.cert + - TEMPORAL_TLS_INTERNODE_SERVER_NAME=localhost + - TEMPORAL_TLS_FRONTEND_SERVER_NAME=localhost + - TEMPORAL_TLS_FRONTEND_DISABLE_HOST_VERIFICATION=false + - TEMPORAL_TLS_INTERNODE_DISABLE_HOST_VERIFICATION=false + - TEMPORAL_CLI_TLS_CA=/certs/ca.cert + - TEMPORAL_CLI_TLS_CERT=/certs/cluster.pem + - TEMPORAL_CLI_TLS_KEY=/certs/cluster.key + - TEMPORAL_CLI_TLS_ENABLE_HOST_VERIFICATION=true + - TEMPORAL_CLI_TLS_SERVER_NAME=localhost + - TEMPORAL_TLS_CA=/certs/ca.cert + - TEMPORAL_TLS_CERT=/certs/cluster.pem + - TEMPORAL_TLS_KEY=/certs/cluster.key + - TEMPORAL_TLS_ENABLE_HOST_VERIFICATION=true + - TEMPORAL_TLS_SERVER_NAME=localhost + depends_on: + - postgresql-tls + temporal-ui-tls: + image: temporalio/ui:2.21.4 + container_name: temporal-ui-tls + depends_on: + - temporal-tls + environment: + - TEMPORAL_ADDRESS=temporal-tls-for-tests:7233 + - TEMPORAL_TLS_CA=/certs/ca.cert + - TEMPORAL_TLS_CERT=/certs/cluster.pem + - TEMPORAL_TLS_KEY=/certs/cluster.key + ports: + - 8282:8080 + volumes: + - ${PWD}/certs:/certs + postgresql-tls: + container_name: postgres-tls + image: postgres:13 + environment: + POSTGRES_PASSWORD: temporal + POSTGRES_USER: temporal + ports: + - 5433:5432 + volumes: + - /var/lib/postgresql/data