Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: add non-SAN cert for sendgrid-java (#105)
Browse files Browse the repository at this point in the history
* add non-SAN cert for sendgrid-java
  • Loading branch information
Bilal Boussayoud authored Jan 7, 2022
1 parent 5a5d93e commit 2668e70
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 2 deletions.
23 changes: 23 additions & 0 deletions prism/nginx-java/cert.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDyDCCArACCQDoRrX2g0xuUDANBgkqhkiG9w0BAQsFADCBpDELMAkGA1UEBhMC
VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x
DzANBgNVBAoMBlR3aWxpbzERMA8GA1UECwwIU2VuZEdyaWQxGTAXBgNVBAMMEGFw
aS5zZW5kZ3JpZC5jb20xKTAnBgkqhkiG9w0BCQEWGnRlYW1faW50ZXJmYWNlc0B0
d2lsaW8uY29tMCAXDTIyMDEwNzAwMzAxOFoYDzIxMjExMjE0MDAzMDE4WjCBpDEL
MAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBG
cmFuY2lzY28xDzANBgNVBAoMBlR3aWxpbzERMA8GA1UECwwIU2VuZEdyaWQxGTAX
BgNVBAMMEGFwaS5zZW5kZ3JpZC5jb20xKTAnBgkqhkiG9w0BCQEWGnRlYW1faW50
ZXJmYWNlc0B0d2lsaW8uY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAmS9xQ4D19jQ2YyuFzN7zk9xRWeOil7bzkOkgFCCqlhPCzuYlMqgD1F7ImcNo
XbFw13s8k/18xWqxBynFgtmniuFm/f4g8iAfeBn35i1g3Bf0bpG9gWn6h/dX3YXb
g0nl0e+bMQG4uD0gccySA/Vt6Y6Tshgu6pVo+yMiWEqQRa0tgqr2WZ8NU0bOrpQz
U9bOrvKxrWvdmIxIYOmptywTXW3vLi63LpE2iy5dPWFO4JCRBc02XZ84B5EhbfVt
ojNbFdtW6urt/VkrWbt18bFcoeM3w6/Hba8MF+z8ONS8QjD9CRXleNKDMVLmvEmW
L0RxO4H1P3O7ar/vPafEDobPGQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA/MNAr
C+9iCLLn9S2QWXfarI1EAb4AFkGWYtqcvhmLJMqWqzsjEWWpWsSBk/i/kPNzTvNs
XRj8ZPS61lhJw3rRmP/2LW9M4u6mIBHfiBgtWaMhhAjaFA0ALAsJa/8WmAgUfb5V
dR73oc1GJtDTKJgZ3cFaKAaimDIxJNHSjpYADCEkdKoVv1b/JxD8JEzI9NmrU5xd
7T7pG6RVT4xO5flCJM+nO851jUaKVmcKD7lhQe9Z8P0bH+ecFyQDILbOFd8ojBHV
6hSLw4vZCM5bR7iOFBUYzxaKcXl6FJTKaYXD/UrfFXA95YZieGPKYxoF6AkB0I1C
9RcmCQkkJZnCRCJX
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions prism/nginx-java/cert.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCZL3FDgPX2NDZj
K4XM3vOT3FFZ46KXtvOQ6SAUIKqWE8LO5iUyqAPUXsiZw2hdsXDXezyT/XzFarEH
KcWC2aeK4Wb9/iDyIB94GffmLWDcF/Rukb2BafqH91fdhduDSeXR75sxAbi4PSBx
zJID9W3pjpOyGC7qlWj7IyJYSpBFrS2CqvZZnw1TRs6ulDNT1s6u8rGta92YjEhg
6am3LBNdbe8uLrcukTaLLl09YU7gkJEFzTZdnzgHkSFt9W2iM1sV21bq6u39WStZ
u3XxsVyh4zfDr8dtrwwX7Pw41LxCMP0JFeV40oMxUua8SZYvRHE7gfU/c7tqv+89
p8QOhs8ZAgMBAAECggEASPrwVD/Bbu3LJ44Z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BeEpFugkFaMoziQocudeTMvE+QWneYLs7Tdzip+qbNVXJi6jAfpQQ
H3z2Bm34QvnuXuM1oWL2l7o10X35BHR0B6+IyL3Z/PHUusO51S+rNGPyKr63TXYI
Ucx/inqVBb7oeKlSHYmA1w==
-----END PRIVATE KEY-----
18 changes: 18 additions & 0 deletions prism/nginx-java/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
events {}
http {
proxy_buffering off;
server {
listen 80;
listen 443 ssl;

ssl_certificate /etc/nginx/cert.crt;
ssl_certificate_key /etc/nginx/cert.key;

location / {
proxy_pass http://prism:4010;
proxy_ignore_client_abort on;
}
}

client_max_body_size 0;
}
2 changes: 1 addition & 1 deletion prism/nginx/cert.crt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ LT21hjUbC297ufvyu8k2C//1PaepRPpql23lHVVT7upX2Ju+AWvwqruG/Z5JlrN4
oMDIdH9gUK8n3wM1+cyk0Fmk4IgCIYl18Gm+orr8yU7LiwBtuel0Y1gIE48Ax8ZB
+uS2fr8GPHVZ8a39NffyZ5s1Fs29Vo0AGgxfykDc57zO1ffjVJkVecRc8gs3FhQQ
T7AShoKUf/DSe3Qg1HESxDtFtvdhbwLtNrUiXfhqHWZ1P+6UpnEGSQ==
-----END CERTIFICATE-----
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion prism/nginx/cert.key
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ k8va9nW0TJdkqUoC1BEN+Q4+t8cX60sBI7F3QeafOZrdtIvh32C0i+VTnQKBgQDO
ZUX/i01+JbDXJbys+90uJzIz6pmQm9UyRFA6dlVAmZNfmAmrNzFa8JtySJV5WSMZ
BmToHG3mOsMnPl8rUQF6qtBYr0gYYEqZd28EPhGRjgX/cbD8Kos1zWJrSKWOvOuU
xJvTXjr3rjWsCbcjqlZIPARPkA==
-----END PRIVATE KEY-----
-----END PRIVATE KEY-----
17 changes: 17 additions & 0 deletions prism/prism-java.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -e

rm -rf prism && mkdir -p prism && cd prism
git clone --depth 1 https://github.com/sendgrid/sendgrid-oai .
cd prism
rm -rf nginx
mv nginx-java nginx

docker-compose build --parallel

if [ -z "$command" ]; then
docker-compose up --force-recreate --abort-on-container-exit --remove-orphans
else
docker-compose run helper-runner "$command"
docker-compose down
fi

0 comments on commit 2668e70

Please sign in to comment.