-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@TarantoolBot document Title: play: add TLS options This patch adds support of the ssl parameters to the `tt play` command. Closes #1067
- Loading branch information
1 parent
035ea0a
commit f32a383
Showing
9 changed files
with
232 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDLzCCAhegAwIBAgIUGCC5S+WF/lwRB18qO0cYhpaorugwDQYJKoZIhvcNAQEL | ||
BQAwJzELMAkGA1UEBhMCVVMxGDAWBgNVBAMMD0V4YW1wbGUtUm9vdC1DQTAeFw0y | ||
MzAyMjAwOTMxMDBaFw00NTA3MjYwOTMxMDBaMCcxCzAJBgNVBAYTAlVTMRgwFgYD | ||
VQQDDA9FeGFtcGxlLVJvb3QtQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK | ||
AoIBAQDzqL1jXNzPUr5DwnByEjbXkuIlY+olEZ9EBs1ZRdiLaHeLhcpeBonCp9U8 | ||
itbhg9EHSCAb5aH5niTkG8q4lTXKqD7zxsRMzaDwMIYMDsINE+lFbHu2LNxmUhhZ | ||
97Y1tjD/g71ry2W63eRrAzw6USk5ELMJvXLfa7mzG6Vf2cfRqRxADK6EDGZBSgHF | ||
9O93Jofm4TipYNBeArxf4nsWEF0uxUCqUPQAbsJ2Nd0Fc6lo0hMq6cPRct4OYqPl | ||
dlaGA3XPStEveRANE2W+MkMm3uoSlCa5Ye1EUbXVU6q3MPG8z39e29GxZ+5R9LPw | ||
8AsoeQ7ty+TwdOKrN8AFU6/If46NAgMBAAGjUzBRMB0GA1UdDgQWBBTyx+obVLxg | ||
6IMoDMBGwBlK2AoqxDAfBgNVHSMEGDAWgBTyx+obVLxg6IMoDMBGwBlK2AoqxDAP | ||
BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDVdjxWyKwox/KoO+c3 | ||
mw+txeJxAzfBl89KTemG6rNe4LXX+oK7xh9a2WosqEwUypDSsK9fzg/2QTZCuKHS | ||
TZVNSspQdks/dwun2+yHzl/kJ4Ic8CvIsuaUErh1VLui5vmzrgEtgRargCzNIra4 | ||
Bcrx3dcEyQ90ZMPX7ysGYeVFP3it/hVug1XKE0hGRzZLBmZP3DtrLBXCZppkgLc7 | ||
julZOCSI2L+mCj/pTgWAcItFwq9V2ZOvXON5M4cDeAA5krOYyfgymBjwKrnUKDnk | ||
91kcIuOM04msRzSme/I8RHRfc/p1JFv3Ve92dz9wrpPmrCJTLQQYQkyFa7YBPxsZ | ||
QfXv | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
set -xeuo pipefail | ||
# An example how-to re-generate testing certificates (because usually | ||
# TLS certificates have expiration dates and some day they will expire). | ||
# | ||
# The instruction is valid for: | ||
# | ||
# $ openssl version | ||
# OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.7 1 Nov 2022) | ||
|
||
cat <<EOF > domains.ext | ||
authorityKeyIdentifier=keyid,issuer | ||
basicConstraints=CA:FALSE | ||
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment | ||
subjectAltName = @alt_names | ||
[alt_names] | ||
DNS.1 = localhost | ||
IP.1 = 127.0.0.1 | ||
EOF | ||
|
||
openssl req -x509 -nodes -new -sha256 -days 8192 -newkey rsa:2048 -keyout ca.key -out ca.pem -subj "/C=US/CN=Example-Root-CA" | ||
openssl x509 -outform pem -in ca.pem -out ca.crt | ||
|
||
openssl req -new -nodes -newkey rsa:2048 -keyout localhost.key -out localhost.csr -subj "/C=US/ST=YourState/L=YourCity/O=Example-Certificates/CN=localhost" | ||
openssl x509 -req -sha256 -days 8192 -in localhost.csr -CA ca.pem -CAkey ca.key -CAcreateserial -extfile domains.ext -out localhost.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
local fiber = require('fiber') | ||
local fio = require('fio') | ||
|
||
box.cfg{ listen = { | ||
uri = 'localhost:3013', | ||
params = { | ||
transport = 'ssl', | ||
ssl_key_file = 'localhost.key', | ||
ssl_cert_file = 'localhost.crt', | ||
ssl_ca_file = 'ca.crt' | ||
} | ||
}} | ||
|
||
box.schema.user.create('test', { password = 'password' , if_not_exists = true }) | ||
box.schema.user.grant('guest','read,write,execute,create,drop','universe') | ||
box.schema.user.grant('test','read,write,execute,create,drop','universe') | ||
|
||
fh = fio.open('ready', {'O_WRONLY', 'O_CREAT'}, tonumber('644',8)) | ||
fh:close() | ||
|
||
while true do | ||
fiber.sleep(5) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-----BEGIN C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E4bvIRUirqxHxMSuhIlQ7b1ppyzVe/H7JwnLrFm | ||
AMpv30P2EUraKs0BNqGWK+FkL8CpCrYhI0VJ4LmBEIgbn2hyLZC9RShiCn4bmYuv | ||
X1TNe78U1nlFmIogtYJop0AcUun1+S6wyItLc8T4QJ/BiqaAK5cRhr17WRv5e07p | ||
l2EjMFwkJNn5R8eO8ZsaO2jCd45n88jnLEpp4aAd7pLI87DZeVQCQOcYggHvz5Hz | ||
Fh6oBthC | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDGaCRWLo4Q9Pqp | ||
d338iiY3pN1drlVfk9w+wbmIVtNWhsOwoCLYSmeFkbzDVefBHIl1aF3FEzexRQrz | ||
FG5Ip9ukF8a5a2vDNbVjNMYrzMf7gqqlYlnY4sA35USNeg7z2LDdRuLTEIsJz7EP | ||
77exw6QSCxftXlGoC0/Cwtc3Ov7IxFMt588a+mzMPMG6rX80aUpShuctvouKqHnJ | ||
LwTajUDCsptjmatTpgPkmD5VUR0TfdT2MC22rqSvtzjSOgThJHCagF0z49Q8L62o | ||
x5il6e3QnMGKNqymA0kyMX3JtajXmMKETGkZSczS6W5AX216ANFiWxc8cLJmKW06 | ||
32uBw5IlAgMBAAECggEAJtXjpurd6/vHxLwa8P+pk2K14cxp8ZdjmPUad9Fm9JzU | ||
WRI/P87wjHiGVkXOY0JOtaiEEjs8v3ogNoxdOeOBXpE42LpqEX/FzXFbCN/AlT5y | ||
YITryUQ5E7fQv1CQ9LIJjIZ/h4jJblY09kWZ0zXUO6PoPxIjMZ1lM14n+iuWC33p | ||
1XyU1iR9H0YDbYgx5oikfB8EXpaKITxu9V5gQ/nHw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E KEY----- |