Skip to content

Commit d5dd473

Browse files
committed
secure gRPC connection with TLS
1 parent da75207 commit d5dd473

File tree

15 files changed

+594
-3
lines changed

15 files changed

+594
-3
lines changed

cert/ca-cert.pem

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIFxjCCA64CCQDY35xYDFXtHjANBgkqhkiG9w0BAQsFADCBpDELMAkGA1UEBhMC
3+
RlIxEjAQBgNVBAgMCU9jY2l0YW5pZTERMA8GA1UEBwwIVG91bG91c2UxFDASBgNV
4+
BAoMC1RlY2ggU2Nob29sMRIwEAYDVQQLDAlFZHVjYXRpb24xGjAYBgNVBAMMESou
5+
dGVjaHNjaG9vbC5ndXJ1MSgwJgYJKoZIhvcNAQkBFhl0ZWNoc2Nob29sLmd1cnVA
6+
Z21haWwuY29tMB4XDTIwMDQxNTEwMjMwNVoXDTIxMDQxNTEwMjMwNVowgaQxCzAJ
7+
BgNVBAYTAkZSMRIwEAYDVQQIDAlPY2NpdGFuaWUxETAPBgNVBAcMCFRvdWxvdXNl
8+
MRQwEgYDVQQKDAtUZWNoIFNjaG9vbDESMBAGA1UECwwJRWR1Y2F0aW9uMRowGAYD
9+
VQQDDBEqLnRlY2hzY2hvb2wuZ3VydTEoMCYGCSqGSIb3DQEJARYZdGVjaHNjaG9v
10+
bC5ndXJ1QGdtYWlsLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
11+
AMlfsjdzwr9baKYRiL1VmbTSMxnCH7kQFYULl1073UqfkYrWSu3P8yiVSVu/EzUG
12+
wlN3C8wncRMn7JtBy3GuIjHnPC7t8E6ztcDWgear2RjzDQZmHVkcdAFji6hW2qEG
13+
LDIKUA2wfRXbjXnRqMj4ZZyIN6cHUJgo4+ZKwMus39WnwuWxQ/QNQhH432lfCHjj
14+
RiyA9AdJvObZVSUuHxfchbRR6aFFr8FL6/9hp5XTVfhz7iOEqWwXDwBQuBG8D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ViNM/mn+OS905dt9DtBzTAw
31+
NkZ/SLYnRPpwGB7csw2EJgsTYRm5pg/QtA9pCmPib1IGT9SeLACJOMe+w0VAKuun
32+
I4pOaolfVC5dclS0rMxwC1S1wBp4YWDbnrxNa6lHRb+FDZBNwBGbfjry
33+
-----END CERTIFICATE-----

cert/ca-cert.srl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
B141E873FD7B8575

cert/ca-key.pem

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDJX7I3c8K/W2im
3+
EYi9VZm00jMZwh+5EBWFC5ddO91Kn5GK1krtz/MolUlbvxM1BsJTdwvMJ3ETJ+yb
4+
QctxriIx5zwu7fBOs7XA1oHmq9kY8w0GZh1ZHHQBY4uoVtqhBiwyClANsH0V2415
5+
0ajI+GWciDenB1CYKOPmSsDLrN/Vp8LlsUP0DUIR+N9pXwh440YsgPQHSbzm2VUl
6+
Lh8X3IW0UemhRa/BS+v/YaeV01X4c+4jhKlsFw8AULgRvAx1bc6e4uAV8dA7k0YV
7+
d9SgI89ZxHVBRWWQe68HMkgHi/Tqrjmw/MdYXoapBVPBec+SQDu58VmDo04kSFcy
8+
0sBEYvU2AEG5fO+tIx5a5/tDQzwBV4bF5qmDGJDUiePOnTZE98g6+pA3m+Pq927D
9+
eoOBp15F0kRXGFBjGQNpObQyWWzXdAzzEVdUCstB8/EdySCZzdmw/rUNIkvoi6Sz
10+
tpMm0Kp61P9YiRo7tUoOFTOUfcTrTAZXsKWDrvt4D4prA6vrj42YNxsUIga3zAVC
11+
d+SJQBwcPsgfzm3hG3Kt52QUHHrbFRSDd0MLOkpQsVN8hY/sZP4AzkidKTyLjZQu
12+
cfUX/bVeCx2YsxNeoZ3/WeBswVt1rvYRcOxEqiNdXPvqtS76tG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aifkzjEC/V0FON1kObHzG8Ca/Tw6Ggwo9ZZCdg2XRVU
45+
Q+3w9d5Phy+8ooXy4EV/on2GquQQn6NBjm/faTGWEcFIhN/AcmfRkctLMyZFF513
46+
eNZ1AoIBADG8nW3c3sIWSIokw6NdI9TLMeQVqVSW2LC8K6L7ZDjl3Ypiu4fT1hBt
47+
CvF3hdvAed+n8Hgb8+rclmubbIdhAVPYKvsuyMGP7fhb7vw1HOsfwSm8ovx+AGXK
48+
siMDXDZKAvOAUcCnO5kPosTwfl3HJhbLArzl9AcU8wvSUphbL8NiJ2pdujs3863E
49+
E9NqBbjd9AHak0EZ29CEI0MLX6/9ndjROjm4Hd1FpoQexm4mh+JnPhC++8aD65qA
50+
pOnVnS+TOw3nGP6KHyorYEipzPjg+jFzsgQhup01Eqv8jZ++msHrgnj507Tf73Cp
51+
uwawX4qaay9IGjuXdE8Py3mM3xpDXPA=
52+
-----END PRIVATE KEY-----

cert/client-cert.pem

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIF4jCCA8qgAwIBAgIJALFB6HP9e4V1MA0GCSqGSIb3DQEBBQUAMIGkMQswCQYD
3+
VQQGEwJGUjESMBAGA1UECAwJT2NjaXRhbmllMREwDwYDVQQHDAhUb3Vsb3VzZTEU
4+
MBIGA1UECgwLVGVjaCBTY2hvb2wxEjAQBgNVBAsMCUVkdWNhdGlvbjEaMBgGA1UE
5+
AwwRKi50ZWNoc2Nob29sLmd1cnUxKDAmBgkqhkiG9w0BCQEWGXRlY2hzY2hvb2wu
6+
Z3VydUBnbWFpbC5jb20wHhcNMjAwNDE1MTAyMzA4WhcNMjAwNjE0MTAyMzA4WjCB
7+
ljELMAkGA1UEBhMCRlIxDzANBgNVBAgMBkFsc2FjZTETMBEGA1UEBwwKU3RyYXNi
8+
b3VyZzESMBAGA1UECgwJUEMgQ2xpZW50MREwDwYDVQQLDAhDb21wdXRlcjE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DuR3JOQBAn7
25+
Yj4LZylG652Gq48hFY3bmM4/P4bKi+z7ZkoUq6iitt57Y66blfXsKUNwjtFxJEzv
26+
figvXKq1ZetAuVNcmOROvYaFisyw5Yvk7XXBw/7DwCUScKBV71MOS6FrkQ/IQ/Xq
27+
qrwD7qBacozUZ37sWULihyjJNuikDcUAVg74jcFSgohluSpbigxgXeDdWgwh8Q3Q
28+
n3ts/ZOb0XDeUp4QAqOxUShUvVEsJGi8NCOWjpp/enzeaDJ85QgCVvK8McIxQgbu
29+
i2IXmnHHzgc6PMpE79qOffeugtUCN/6odvveFq0rN3QJMKFU5mFjitWFfko2OVLv
30+
/jMuJ00cISCGJFXIDij/XzetvwD0hGME9jUhp68xdfZDX1Tnc60gqSyJqaFg6iKa
31+
0iSvy3ShR1k/VATsDP1DTQlon39dbOYPhsSkk1Lc4RSMJBgJ6lFum+9vd9/gVZEG
32+
Jno5YIiGZphbVjE5/KQ3jtFL5WZOZHPk+FYMGxwey5h5nXN2veWhVCkwx9K4YaCB
33+
9BhkA0M0G3zQoGqSv94DTeI32qaxNg==
34+
-----END CERTIFICATE-----

cert/client-ext.cnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
subjectAltName=DNS:*.pcclient.com,IP:0.0.0.0

cert/client-key.pem

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDdQfxUWvq0/wEB
3+
+rOTjeRhd0p8Mgr9QC588Fm+gFxQSiPL8d/CYXql/IoKlsozjMyEzvOmDUBYbiMd
4+
fF7EUQjjxt5XAnkep/P7rtlchD1HDX0RxobPiXZk942XqJGn8LAkH8CuQNon2KlN
5+
5JRJU8MFcA/R4E0Dp6joFxMM6QtNRMyL0LUev+PQDTiVFEXzvGntk4JV7/dMkwSP
6+
LuP5Vdn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+mlc+bMvBRkylbswFNewXhMq/
38+
znh1ysQfsWUGIUyUFpqrSqQPm7aiF4qoW6onqyj5fX3b49HVcWzNZoMkdILOGYE7
39+
fMvMwQkJujk/0r6jVzn9Iopck665r697tg/Eav0XD2iHuHLahDvsF2wTqjTysL+W
40+
RF0R7y2JXOCG0390P1QAuZDbChbbKSf8mSIOg02fAoIBAQDAo9ExEvmApw/gq2mz
41+
zj9EsdAyLXozEbgu7TJuX8rIUG5QqC1vhuvf6l4WXCK28CodkzZSstRqWKxsJZeI
42+
8HXFVqYcZpQwHN1yvj/yKU2TzR/jBMueSswiwZZC93Q0RJ6Pg6OJGTBiIHKv8yfh
43+
4X0vbfKHey8mLIk5eiYzWG92N/gmbSCixglyoz1Q9W7ClsXm47yM80OPTA7kvYYY
44+
4FKUodkQBBejnjeJd8tyegq8SlY53MgCwwA/1BKf+TW9z5mqrzwSsml6lP6Vx7oa
45+
X1yExAGpCPshIrGvB7TDI2nRYTErtWH7uxFYMcmXo/XWAWLxDBtj2GsJSAjiN8eS
46+
uacbAoIBAFTcrGjSRo/v8DT+r8z5BClwuBmnsRWzTNx3ay/EMnLdGv2Jcg5I+p7l
47+
VjioNmz/mF7Ff94nH0VohDrsbmKlVWs8zOxiotG/UUhgHfp2MX1OTxXzxwbxx+sB
48+
Ekb7WuZ8yxWI7WboH5r4ENla3SeQb1HETNDhJoqVCi67XGkq5rY4DlNXtZQZdkzB
49+
SH0c0JVykXk265qsvpthKObTakb92azMCdToipl0bdwRWwzjLlNV1cqJHdtaD40Z
50+
0u8CfN8S2w7nwGIcLLWQVbN1nx7nspFmbo2kezu62YHpGh+hCvwGWTLelK6lAQWS
51+
ovQGWC8qf6sde8JLYDVa3WC36B1OwTQ=
52+
-----END PRIVATE KEY-----

cert/client-req.pem

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-----BEGIN CERTIFICATE REQUEST-----
2+
MIIE3DCCAsQCAQAwgZYxCzAJB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Hl1tiJYpi03pb707j6pjX6Q/AWLrTHuLo8l2cDnDu+xL08
19+
SWZ20DtmM5GnYdmJzjY6mR6b5lYDrGlqFaynKCBn2IgB0AJeraGSsh/+cnhOgzya
20+
6nKm8bOM9DSkcuki5b9JTYjtnmSUlwaaup0rlkKtnt0XLV4jKcQL4DurYfSXUXgs
21+
sazbKj/N2xkRiSyk40lf5ASPFAyXDOr57c+IMKokhcWZvZunZc+reqWXkwvJQwZ9
22+
8UNsrHmNopDbQI1mLk4Ky8cPRWbtdyjnJlwPc59TbGmdVNWm6KMmCwXqiegORivo
23+
fwhOPEXvTusrcwgyREtS+bYOG0sFVGce6nxcIjBf9sY+igXGUTm9UyQVGO0YDLpJ
24+
hJLL5bb9iv4nurokFWuoGI0H3XpeiLXBO6oPA/PXSEru6deP9/HwtGADVcoxQFa0
25+
fLn9bA7lyyIXm6UpQXIAMv/Ptqv7v0SoesrwpxloJQKa43Iv0CkaFrWfLedCdayR
26+
BgqOMvFcN6pzfCnaEpFb/CppBPP7Q/wVhAuIlmVq7M75q6/rW819RLxZFaNF0Yyx
27+
0P5n1b8sSlUuQPPG0JNHGDZbM8Jz7iKMhcJuH8CQGI3EqPJVM3onvlYV1AWDKWI3
28+
-----END CERTIFICATE REQUEST-----

cert/gen.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
rm *.pem
2+
3+
# 1. Generate CA's private key and self-signed certificate
4+
openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout ca-key.pem -out ca-cert.pem -subj "/C=FR/ST=Occitanie/L=Toulouse/O=Tech School/OU=Education/CN=*.techschool.guru/emailAddress=techschool.guru@gmail.com"
5+
6+
echo "CA's self-signed certificate"
7+
openssl x509 -in ca-cert.pem -noout -text
8+
9+
# 2. Generate web server's private key and certificate signing request (CSR)
10+
openssl req -newkey rsa:4096 -nodes -keyout server-key.pem -out server-req.pem -subj "/C=FR/ST=Ile de France/L=Paris/O=PC Book/OU=Computer/CN=*.pcbook.com/emailAddress=pcbook@gmail.com"
11+
12+
# 3. Use CA's private key to sign web server's CSR and get back the signed certificate
13+
openssl x509 -req -in server-req.pem -days 60 -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -extfile server-ext.cnf
14+
15+
echo "Server's signed certificate"
16+
openssl x509 -in server-cert.pem -noout -text
17+
18+
# 4. Generate client's private key and certificate signing request (CSR)
19+
openssl req -newkey rsa:4096 -nodes -keyout client-key.pem -out client-req.pem -subj "/C=FR/ST=Alsace/L=Strasbourg/O=PC Client/OU=Computer/CN=*.pcclient.com/emailAddress=pcclient@gmail.com"
20+
21+
# 3. Use CA's private key to sign client's CSR and get back the signed certificate
22+
openssl x509 -req -in client-req.pem -days 60 -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out client-cert.pem -extfile client-ext.cnf
23+
24+
echo "Client's signed certificate"
25+
openssl x509 -in client-cert.pem -noout -text

0 commit comments

Comments
 (0)