-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove cartridge-java from dependencies
- [breaking change] Remove io.tarantool.cartridge-driver dependency - [breaking change] Update executeScript and executeCommand methods to execute code viva execInContainer (now it returns yaml string in Container.ExecResult not CompletableFuture) - Add executeScriptDecoded and executeCommandDecoded methods to return parsed yaml not string. - Add SslContext class - Add withSslContext method to TarantoolContainer and TarantoolCartridgeContainer. - Update org.yaml.snakeyaml to 2.0 version. Closes #69
Showing
29 changed files
with
732 additions
and
209 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
30 changes: 30 additions & 0 deletions
30
src/main/java/org/testcontainers/containers/SslContext.java
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,30 @@ | ||
package org.testcontainers.containers; | ||
|
||
public class SslContext { | ||
private String keyFile; | ||
private String certFile; | ||
|
||
private SslContext() { | ||
} | ||
|
||
private SslContext(String keyFile, String certFile) { | ||
this.keyFile = keyFile; | ||
this.certFile = certFile; | ||
} | ||
|
||
public static SslContext getSslContext(){ | ||
return new SslContext(); | ||
} | ||
|
||
public static SslContext getSslContext(String keyFile, String certFile){ | ||
return new SslContext(keyFile, certFile); | ||
} | ||
|
||
String getKeyFile() { | ||
return this.keyFile; | ||
} | ||
|
||
String getCertFile() { | ||
return this.certFile; | ||
} | ||
} |
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
150 changes: 100 additions & 50 deletions
150
src/main/java/org/testcontainers/containers/TarantoolContainerClientHelper.java
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 |
---|---|---|
@@ -1,88 +1,138 @@ | ||
package org.testcontainers.containers; | ||
|
||
import io.tarantool.driver.api.TarantoolClient; | ||
import io.tarantool.driver.api.TarantoolClientBuilder; | ||
import io.tarantool.driver.api.TarantoolClientFactory; | ||
import io.tarantool.driver.api.TarantoolResult; | ||
import io.tarantool.driver.api.retry.TarantoolRequestRetryPolicies; | ||
import io.tarantool.driver.api.tuple.TarantoolTuple; | ||
import org.testcontainers.utility.MountableFile; | ||
import org.yaml.snakeyaml.Yaml; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Paths; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.concurrent.CompletableFuture; | ||
import java.util.concurrent.atomic.AtomicReference; | ||
import java.util.concurrent.ExecutionException; | ||
|
||
import static org.testcontainers.containers.PathUtils.normalizePath; | ||
|
||
/** | ||
* Provides a wrapper around a Tarantool client with helper methods | ||
* | ||
* @author Alexey Kuzin | ||
* @author Artyom Dubinin | ||
* @author Ivan Dneprov | ||
*/ | ||
public final class TarantoolContainerClientHelper { | ||
|
||
private static final String TMP_DIR = "/tmp"; | ||
private static final Yaml yaml = new Yaml(); | ||
|
||
private final TarantoolContainerOperations<? extends Container<?>> container; | ||
private final AtomicReference<TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>>> clientHolder = | ||
new AtomicReference<>(); | ||
private final TarantoolClientBuilder clientBuilder; | ||
private final String EXECUTE_SCRIPT_ERROR_TEMPLATE = | ||
"Executed script %s with exit code %d, stderr: \"%s\", stdout: \"%s\""; | ||
private static final String EXECUTE_COMMAND_ERROR_TEMPLATE = | ||
"Executed command \"%s\" with exit code %d, stderr: \"%s\", stdout: \"%s\""; | ||
private static final String MTLS_COMMAND_TEMPLATE = | ||
"echo \" " + | ||
" print(require('yaml').encode( " + | ||
" {require('net.box').connect( " + | ||
" { uri='%s:%d', params = { transport='ssl', ssl_key_file = '%s', ssl_cert_file = '%s' }}, " + | ||
" { user = '%s', password = '%s' } " + | ||
" ):eval('%s')}) " + | ||
" ); " + | ||
" os.exit(); " + | ||
"\" | tarantool"; | ||
private static final String SSL_COMMAND_TEMPLATE = | ||
"echo \" " + | ||
" print(require('yaml').encode( " + | ||
" {require('net.box').connect( " + | ||
" { uri='%s:%d', params = { transport='ssl' }}, " + | ||
" { user = '%s', password = '%s' } " + | ||
" ):eval('%s')}) " + | ||
" ); " + | ||
" os.exit(); " + | ||
"\" | tarantool"; | ||
private static final String COMMAND_TEMPLATE = "echo \" " + | ||
" print(require('yaml').encode( " + | ||
" {require('net.box').connect( " + | ||
" { uri='%s:%d' }, " + | ||
" { user = '%s', password = '%s' } " + | ||
" ):eval('%s')}) " + | ||
" ); " + | ||
" os.exit(); " + | ||
"\" | tarantool"; | ||
|
||
TarantoolContainerClientHelper(TarantoolContainerOperations<? extends Container<?>> container) { | ||
this.container = container; | ||
this.clientBuilder = TarantoolClientFactory.createClient() | ||
.withRequestTimeout(5000) | ||
.withRetryingByNumberOfAttempts(15, | ||
TarantoolRequestRetryPolicies.retryNetworkErrors(), | ||
b -> b.withDelay(100)); | ||
} | ||
|
||
public Container.ExecResult executeScript(String scriptResourcePath, SslContext sslContext) throws IOException, InterruptedException { | ||
if (!container.isRunning()) { | ||
throw new IllegalStateException("Cannot execute scripts in stopped container"); | ||
} | ||
|
||
TarantoolContainerClientHelper(TarantoolContainerOperations<? extends Container<?>> container, | ||
TarantoolClientBuilder clientBuilder) { | ||
this.container = container; | ||
this.clientBuilder = clientBuilder; | ||
String scriptName = Paths.get(scriptResourcePath).getFileName().toString(); | ||
String containerPath = normalizePath(Paths.get(TMP_DIR, scriptName)); | ||
container.copyFileToContainer(MountableFile.forClasspathResource(scriptResourcePath), containerPath); | ||
return executeCommand(String.format("return dofile('%s')", containerPath), sslContext); | ||
} | ||
|
||
private TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> createClient() { | ||
return clientBuilder | ||
.withCredentials(container.getUsername(), container.getPassword()) | ||
.withAddress(container.getHost(), container.getPort()) | ||
.build(); | ||
} | ||
public <T> T executeScriptDecoded(String scriptResourcePath, SslContext sslContext) throws IOException, InterruptedException, ExecutionException { | ||
Container.ExecResult result = executeScript(scriptResourcePath, sslContext); | ||
|
||
/** | ||
* Configure or return an already configured client connected to a Cartridge router | ||
* | ||
* @return a configured client | ||
*/ | ||
public TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> getClient() { | ||
if (!container.isRunning()) { | ||
throw new IllegalStateException("Cannot connect to Tarantool instance in a stopped container"); | ||
} | ||
if (clientHolder.get() == null) { | ||
clientHolder.compareAndSet(null, createClient()); | ||
if (result.getExitCode() != 0) { | ||
|
||
if (result.getExitCode() == 3 || result.getExitCode() == 1) { | ||
throw new ExecutionException(String.format(EXECUTE_SCRIPT_ERROR_TEMPLATE, | ||
scriptResourcePath, result.getExitCode(), | ||
result.getStderr(), result.getStdout()), | ||
new Throwable()); | ||
} | ||
|
||
throw new IllegalStateException(String.format(EXECUTE_SCRIPT_ERROR_TEMPLATE, | ||
scriptResourcePath, result.getExitCode(), | ||
result.getStderr(), result.getStdout())); | ||
} | ||
return clientHolder.get(); | ||
|
||
return yaml.load(result.getStdout()); | ||
} | ||
|
||
public CompletableFuture<List<?>> executeScript(String scriptResourcePath) { | ||
public Container.ExecResult executeCommand(String command, SslContext sslContext) throws IOException, InterruptedException { | ||
if (!container.isRunning()) { | ||
throw new IllegalStateException("Cannot execute scripts in stopped container"); | ||
throw new IllegalStateException("Cannot execute commands in stopped container"); | ||
} | ||
|
||
String scriptName = Paths.get(scriptResourcePath).getFileName().toString(); | ||
String containerPath = normalizePath(Paths.get(TMP_DIR, scriptName)); | ||
container.copyFileToContainer(MountableFile.forClasspathResource(scriptResourcePath), containerPath); | ||
return executeCommand(String.format("return dofile('%s')", containerPath)); | ||
command = command.replace("\"", "\\\""); | ||
command = command.replace("\'", "\\\'"); | ||
|
||
String bashCommand; | ||
if (sslContext == null) { // No SSL | ||
bashCommand = String.format(COMMAND_TEMPLATE, | ||
container.getHost(), container.getInternalPort(), | ||
container.getUsername(), container.getPassword(), | ||
command | ||
); | ||
} else if (sslContext.getKeyFile() != null && sslContext.getCertFile() != null) { // mTLS | ||
bashCommand = String.format(MTLS_COMMAND_TEMPLATE, | ||
container.getHost(), container.getInternalPort(), | ||
sslContext.getKeyFile(), sslContext.getCertFile(), | ||
container.getUsername(), container.getPassword(), | ||
command | ||
); | ||
} else { // SSL | ||
bashCommand = String.format(SSL_COMMAND_TEMPLATE, | ||
container.getHost(), container.getInternalPort(), | ||
container.getUsername(), container.getPassword(), | ||
command | ||
); | ||
} | ||
|
||
return container.execInContainer("sh", "-c", bashCommand); | ||
} | ||
|
||
public CompletableFuture<List<?>> executeCommand(String command, Object... arguments) { | ||
if (!container.isRunning()) { | ||
throw new IllegalStateException("Cannot execute commands in stopped container"); | ||
public <T> T executeCommandDecoded(String command, SslContext sslContext) throws IOException, InterruptedException { | ||
Container.ExecResult result = executeCommand(command, sslContext); | ||
|
||
if (result.getExitCode() != 0) { | ||
throw new IllegalStateException(String.format(EXECUTE_COMMAND_ERROR_TEMPLATE, | ||
command, result.getExitCode(), result.getStderr(), result.getStdout())); | ||
} | ||
|
||
return getClient().eval(command, Arrays.asList(arguments)); | ||
return yaml.load(result.getStdout()); | ||
} | ||
|
||
} |
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
53 changes: 0 additions & 53 deletions
53
src/test/java/org/testcontainers/containers/TarantoolSdkContainerTestEnterprise.java
This file was deleted.
Oops, something went wrong.
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
63 changes: 63 additions & 0 deletions
63
...t/java/org/testcontainers/containers/enterprise/TarantoolMTlsContainerTestEnterprise.java
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,63 @@ | ||
package org.testcontainers.containers.enterprise; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.testcontainers.containers.SslContext; | ||
import org.testcontainers.containers.TarantoolContainer; | ||
import org.testcontainers.containers.TarantoolImageParams; | ||
import org.testcontainers.containers.output.Slf4jLogConsumer; | ||
|
||
import java.io.File; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
/** | ||
* @author Ivan Dneprov | ||
*/ | ||
public class TarantoolMTlsContainerTestEnterprise { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(TarantoolMTlsContainerTestEnterprise.class); | ||
|
||
private static TarantoolContainer containerWithSsl; | ||
|
||
@BeforeAll | ||
public static void setUp() throws Exception { | ||
final File dockerfile = new File( | ||
TarantoolMTlsContainerTestEnterprise.class.getClassLoader() | ||
.getResource("enterprise/Dockerfile").toURI() | ||
); | ||
final Map<String, String> buildArgs = new HashMap<>(); | ||
buildArgs.put("DOWNLOAD_SDK_URI", System.getenv("DOWNLOAD_SDK_URI")); | ||
buildArgs.put("SDK_VERSION", System.getenv("SDK_VERSION")); | ||
|
||
containerWithSsl = new TarantoolContainer( | ||
new TarantoolImageParams("tarantool-enterprise", dockerfile, buildArgs)) | ||
.withScriptFileName("mtls_server.lua") | ||
.withUsername("api_user") | ||
.withPassword("secret") | ||
.withMemtxMemory(256 * 1024 * 1024) | ||
.withDirectoryBinding("enterprise/ssl/mtls") | ||
.withSslContext(SslContext.getSslContext("/app/ca.key", "/app/ca.crt")) | ||
.withLogConsumer(new Slf4jLogConsumer(log)); | ||
|
||
if (!containerWithSsl.isRunning()) { | ||
containerWithSsl.start(); | ||
} | ||
} | ||
|
||
@Test | ||
public void test_clientWithSsl_shouldWork() throws Exception { | ||
List<HashMap> resultList = containerWithSsl.executeCommandDecoded("return box.cfg.listen"); | ||
HashMap<String, HashMap> result = resultList.get(0); | ||
HashMap<String, String> params = result.get("params"); | ||
assertEquals("ssl", params.get("transport")); | ||
assertEquals("server.key", params.get("ssl_key_file")); | ||
assertEquals("server.crt", params.get("ssl_cert_file")); | ||
assertEquals("ca.crt", params.get("ssl_ca_file")); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...st/java/org/testcontainers/containers/enterprise/TarantoolSdkContainerTestEnterprise.java
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,42 @@ | ||
package org.testcontainers.containers.enterprise; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.containers.TarantoolContainer; | ||
import org.testcontainers.containers.TarantoolImageParams; | ||
|
||
import java.io.File; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author Oleg Kuznetsov | ||
* @author Ivan Dneprov | ||
*/ | ||
public class TarantoolSdkContainerTestEnterprise { | ||
|
||
|
||
@Test | ||
void test_should_createTarantoolContainerFromSdk() throws Exception { | ||
final File dockerfile = new File( | ||
TarantoolSdkContainerTestEnterprise.class.getClassLoader().getResource("enterprise/Dockerfile").toURI() | ||
); | ||
final Map<String, String> buildArgs = new HashMap<>(); | ||
buildArgs.put("DOWNLOAD_SDK_URI", System.getenv("DOWNLOAD_SDK_URI")); | ||
buildArgs.put("SDK_VERSION", System.getenv("SDK_VERSION")); | ||
|
||
try (final TarantoolContainer tarantoolContainer = new TarantoolContainer( | ||
new TarantoolImageParams("tarantool-enterprise-bundle:latest", dockerfile, buildArgs)) | ||
.withDirectoryBinding("enterprise")) { | ||
|
||
tarantoolContainer.start(); | ||
|
||
List<String> result = tarantoolContainer.executeCommandDecoded("return 'test'"); | ||
List<String> versionAnswer = tarantoolContainer.executeCommandDecoded("return _TARANTOOL"); | ||
|
||
Assertions.assertEquals("test", result.get(0)); | ||
Assertions.assertEquals("tarantool-enterprise-sdk-nogc64-2.10.7-0-r563.linux.x86_64", versionAnswer.get(0)); | ||
} | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
...st/java/org/testcontainers/containers/enterprise/TarantoolSslContainerTestEnterprise.java
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,62 @@ | ||
package org.testcontainers.containers.enterprise; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.testcontainers.containers.SslContext; | ||
import org.testcontainers.containers.TarantoolContainer; | ||
import org.testcontainers.containers.TarantoolImageParams; | ||
import org.testcontainers.containers.output.Slf4jLogConsumer; | ||
|
||
import java.io.File; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
/** | ||
* @author Ivan Dneprov | ||
*/ | ||
public class TarantoolSslContainerTestEnterprise { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(TarantoolSslContainerTestEnterprise.class); | ||
|
||
private static TarantoolContainer containerWithSsl; | ||
|
||
@BeforeAll | ||
public static void setUp() throws Exception { | ||
final File dockerfile = new File( | ||
TarantoolSslContainerTestEnterprise.class.getClassLoader() | ||
.getResource("enterprise/Dockerfile").toURI() | ||
); | ||
final Map<String, String> buildArgs = new HashMap<>(); | ||
buildArgs.put("DOWNLOAD_SDK_URI", System.getenv("DOWNLOAD_SDK_URI")); | ||
buildArgs.put("SDK_VERSION", System.getenv("SDK_VERSION")); | ||
|
||
containerWithSsl = new TarantoolContainer( | ||
new TarantoolImageParams("tarantool-enterprise", dockerfile, buildArgs)) | ||
.withScriptFileName("ssl_server.lua") | ||
.withUsername("api_user") | ||
.withPassword("secret") | ||
.withMemtxMemory(256 * 1024 * 1024) | ||
.withDirectoryBinding("enterprise/ssl") | ||
.withSslContext(SslContext.getSslContext()) | ||
.withLogConsumer(new Slf4jLogConsumer(log)); | ||
|
||
if (!containerWithSsl.isRunning()) { | ||
containerWithSsl.start(); | ||
} | ||
} | ||
|
||
@Test | ||
public void test_clientWithSsl_shouldWork() throws Exception { | ||
List<HashMap> resultList = containerWithSsl.executeCommandDecoded("return box.cfg.listen"); | ||
HashMap<String, HashMap> result = resultList.get(0); | ||
HashMap<String, String> params = result.get("params"); | ||
assertEquals("ssl", params.get("transport")); | ||
assertEquals("key.pem", params.get("ssl_key_file")); | ||
assertEquals("certificate.crt", params.get("ssl_cert_file")); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDhDCCAmwCCQCbVZGkNwxnRzANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMC | ||
UlUxDzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9zY293MQswCQYDVQQKDAJW | ||
SzESMBAGA1UECwwJVGFyYW50b29sMRIwEAYDVQQDDAlUYXJhbnRvb2wxHTAbBgkq | ||
hkiG9w0BCQEWDnRlc3RAdGVzdC50ZXN0MB4XDTIyMDQwNzE2MDU1NFoXDTIzMDQw | ||
NzE2MDU1NFowgYMxCzAJBgNVBAYTAlJVMQ8wDQYDVQQIDAZNb3Njb3cxDzANBgNV | ||
BAcMBk1vc2NvdzELMAkGA1UECgwCVksxEjAQBgNVBAsMCVRhcmFudG9vbDESMBAG | ||
A1UEAwwJVGFyYW50b29sMR0wGwYJKoZIhvcNAQkBFg50ZXN0QHRlc3QudGVzdDCC | ||
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM/3KMHSybroxV5nR8tm19kg | ||
uVlWoFzd7IXGcVbeVCdu30wBLeDQ2XvsnjYYMkHUDPWLkVosZO4de0D+vyS2CmgE | ||
zeurAjCrUEs4Sc/Aa+CTSRuI17EkJjPpDQNSCmp3KJfPGGAypYNT7kH2Va+HvNBR | ||
HHsSk3xuyXujX02DwsuUnf5XqYuuZ39S5jRZ3qvmQytmVXrOtSeNyhWz50XISTER | ||
ErczPVfKOIFYEZWj+9cKaTZssYZp95MCbkagKh9ZQ6E/T3TGTMEHrqYuXQC4mHI8 | ||
PEISqnY3Vo4lpe+SBWxpJBOK5YWSTUWdPygyt71xEPkyss+C87bMsdQaY8r4TrkC | ||
AwEAATANBgkqhkiG9w0BAQsFAAOCAQEAj2xf7QdcSbG0nF783TGnqFK7/pBrrdDb | ||
zlT3NReHP70FjxPIK5alMkQBM+kn/+j1RDnjJhQQa5NKadhEHqpaRd7R2Iv9a2h8 | ||
xQ78jB1GGygFnc5rGx3h5kOFSLjQlFcm9HYafTlasKYAjvhM4SiBQU/jgG2bHrIb | ||
KrElFswBsfV2VvmvyYyhwDqrtZzKayS3BMD6fls95W+hUlMtcQXFZCVlIkJj6BVc | ||
okM2tvkM/6ShokidAIkrq34dg4IJf3ZBXrXdiqtznMdaHAqb++Z4w3DY+hB+82qy | ||
rUzOXligeS/xxzhiZRuIiGgMg4WbGAv7yexRgqv2wyJiGZfIfBrEdw== | ||
-----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,61 @@ | ||
#!/bin/bash | ||
|
||
HOST=tarantool.io | ||
NEW_KEY_ARG=rsa:4096 | ||
DAYS_ARG=36500 | ||
CYPHER="PBE-SHA1-RC2-40" | ||
|
||
gen_ca() { | ||
local ca="${1}" | ||
openssl req \ | ||
-new \ | ||
-nodes \ | ||
-newkey "${NEW_KEY_ARG}" \ | ||
-keyout "${ca}.key" \ | ||
-days "${DAYS_ARG}" \ | ||
-x509 \ | ||
-subj "/OU=Unknown/O=Unknown/L=Unknown/ST=unknown/C=AU" \ | ||
-out "${ca}.crt" | ||
|
||
} | ||
|
||
gen_cert() { | ||
local cert="${1}" | ||
local ca="${2}" | ||
|
||
openssl req \ | ||
-new \ | ||
-nodes \ | ||
-newkey "${NEW_KEY_ARG}" \ | ||
-subj "/CN=${HOST}/OU=Unknown/O=Unknown/L=Unknown/ST=unknown/C=AU" \ | ||
-keyout "${cert}.key" \ | ||
-out "${cert}.csr" | ||
|
||
openssl x509 \ | ||
-req \ | ||
-days "${DAYS_ARG}" \ | ||
-CAcreateserial \ | ||
-CA "${ca}.crt" \ | ||
-CAkey "${ca}.key" \ | ||
-in "${cert}.csr" \ | ||
-out "${cert}.crt" | ||
|
||
rm -f "${cert}.csr" | ||
rm -f "${ca}.srl" | ||
} | ||
|
||
secure_key() { | ||
local file="${1}" | ||
local pass="${2}" | ||
openssl pkcs8 \ | ||
-topk8 \ | ||
-v1 ${CYPHER} \ | ||
-in ${file}.key \ | ||
-out ${file}.pkcs8.key \ | ||
-passout "pass:${pass}" | ||
} | ||
|
||
gen_ca ca | ||
gen_cert server ca | ||
gen_cert client ca | ||
secure_key client 1q2w3e |
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----- | ||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDP9yjB0sm66MVe | ||
Z0fLZtfZILlZVqBc3eyFxnFW3lQnbt9MAS3g0Nl77J42GDJB1Az1i5FaLGTuHXtA | ||
/r8ktgpoBM3rqwIwq1BLOEnPwGvgk0kbiNexJCYz6Q0DUgpqdyiXzxhgMqWDU+5B | ||
9lWvh7zQURx7EpN8bsl7o19Ng8LLlJ3+V6mLrmd/UuY0Wd6r5kMrZlV6zrUnjcoV | ||
s+dFyEkxERK3Mz1XyjiBWBGVo/vXCmk2bLGGafeTAm5GoCofWUOhP090xkzBB66m | ||
Ll0AuJhyPDxCEqp2N1aOJaXvkgVsaSQTiuWFkk1FnT8oMre9cRD5MrLPgvO2zLHU | ||
GmPK+E65AgMBAAECggEAVpNrOT1aU+Bhggp2/ftjcnXIE6QXgHG27H4PYv2NhRkI | ||
BqkbA1OOpqN7vcNW8MapWnNu4F5I6kQFsqoawtqx/Fm7rBd2AvLeq2HUgJN3lXdb | ||
YQYX3RvSd5vWmgJGacoPcRt651lORBzlvDojs75LYWHS/H1gPtYUNM9vdmKa7orA |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iXmsqKHgvVzR4hNnOWILq | ||
1sQlocjdaPKH0EEbP84Ae2a7 | ||
-----END PRIVATE KEY----- |
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,32 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIFjTCCA3WgAwIBAgIUD0mJoUjJsB4mrsSsBlAorJwmgcUwDQYJKoZIhvcNAQEL | ||
BQAwVTEQMA4GA1UECwwHVW5rbm93bjEQMA4GA1UECgwHVW5rbm93bjEQMA4GA1UE | ||
BwwHVW5rbm93bjEQMA4GA1UECAwHdW5rbm93bjELMAkGA1UEBhMCQVUwIBcNMjIw | ||
NTMxMjEwNTA2WhgPMjEyMjA1MDcyMTA1MDZaMFUxEDAOBgNVBAsMB1Vua25vd24x | ||
EDAOBgNVBAoMB1Vua25vd24xEDAOBgNVBAcMB1Vua25vd24xEDAOBgNVBAgMB3Vu | ||
a25vd24xCzAJBgNVBAYTAkFVMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC | ||
AgEAtpV9sxa6KPfTP4r5IJAHML0SlIUX9rSzEwKnbsMuyEKUwmcZVQ1aUWrmTQ0J | ||
UGboOuVMBaNqmWaeqgJBTXns60/MrKSBQmOUwm1/FIBt6KQF2WZZUM13yq+UN5i/ | ||
MHtAzHxSrecHNmzpvL9y48QJFs4ruoCzVsnLz9EmYChQCrFj1JsfLVvSpcDTFgdV | ||
bTHJIBF9rHFKB92qMbhDJjrSmvPKNqyaLnWP0WttNIMtE5djrqwGbHolX5JrFIKr | ||
9LDV2jJiMA7tFVl2cgg+uEcrxqOz421S9VYD0hl5hFF81rpdg/q7MEBHPYD2cCyl | ||
92mxUYqz7r9OdK7KeMlLD/sjL34IXsT4TbcbMLYcfBdBmDRAbaAlON3spU9EPUxd | ||
Yvhd3qKDlOP3oCXDE5MKQujz7gR3XQpX3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ReoPI9t08UqopR2P+zFcDh75X+3SXL8mMRIXMvFU | ||
eTU7QSXhc9Q6l+skY2cRgvYl++fIooebBXpCYY9uDht9 | ||
-----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,52 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQC2lX2zFroo99M/ | ||
ivkgkAcwvRKUhRf2tLMTAqduwy7IQpTCZxlVDVpRauZNDQlQZug65UwFo2qZZp6q | ||
AkFNeezrT8yspIFCY5TCbX8UgG3opAXZZllQzXfKr5Q3mL8we0DMfFKt5wc2bOm8 | ||
v3LjxAkWziu6gLNWycvP0SZgKFAKsWPUmx8tW9KlwNMWB1VtMckgEX2scUoH3aox | ||
uEMmOtKa88o2rJoudY/Ra200gy0Tl2OurAZseiVfkmsUgqv0sNXaMmIwDu0VWXZy | ||
CD64RyvGo7PjbVL1VgPSGXmEUXzWul2D+rswQEc9gPZwLKX3abFRirPuv050rsp4 | ||
yUsP+yMvfghexPhNtxswthx8F0GYNEBtoCU43eylT0Q9TF1i+F3eooOU4/egJcMT | ||
kwpC6PPuBHddClfdl13nPF1yn8aIT1GK+gqy2bn8nOc36ewFoHPDp3iAFPMg8yaI | ||
CZROudYPlQSGwb+QfOT4rZZclLz/TkIhlOEuAguX+9+Csxfc4FSzDV49ePYmanUc | ||
sTG2lfxTU0oDxS1T3tBFfjR5a8y4sbPuwoxL9VmID142QwiFCGSMy3Qk+j2B8yCB | ||
UwE6NBstXg2Lhdl4zO6u0Y6aUPrWzsYQLJIofLmlhm1eKw5WkoAFhMTJMg8+O7A3 | ||
lb3SH780jaHzFbZn3GwTsrR+Ua0DVwIDAQABAoICAAVf98CYfwOkh3vP/OqvFN+j | ||
1HLLOhezmScB6dxKz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6us2ACxN | ||
zgECggEBAKYl8PnpgdP63osurXPG2Ds0FymGgmHrhvKRXEQubss9Hz0oElTpPRcN | ||
9uwhjyS3ISwxQoXLg1PDJ8UtFNwyy0bbOfKKqNSLxfuOG40IqwZH5jXKmgX6FQP9 | ||
3jL/RmShkMiN3z66Zcjv/o4Kokd8Z/AH4DQI4D2ZztKWYiPAxogak8/2c/eTk2vJ | ||
0FuV5T3KqVWgCFnRM80P9jT7wBRLHazDpAf0G+u9Qcw/SzLze9HgN8S0y1Fu4mea | ||
6Mc4C7QMghzms/Q/YuEpAxgaXLBLRP5AzzbuEmKERS8bv5Se+Bhc2jLgrHC5lrKk | ||
YfB9GdaUnR0F648bsknruMJrFjfZFbo= | ||
-----END PRIVATE KEY----- |
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,12 @@ | ||
box.cfg { listen = { | ||
uri = 3301, | ||
params = { | ||
transport = 'ssl', | ||
ssl_key_file = 'server.key', | ||
ssl_cert_file = 'server.crt', | ||
ssl_ca_file = 'ca.crt' | ||
} | ||
} } | ||
|
||
box.schema.user.create('api_user', { password = 'secret', if_not_exists = true }) | ||
box.schema.user.grant('api_user', 'read, write, execute', 'universe', nil, { if_not_exists = true }) |
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,31 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIFSjCCAzICFAGDWf+4nbv3f7+QrRbP8Q3YhzOaMA0GCSqGSIb3DQEBCwUAMFUx | ||
EDAOBgNVBAsMB1Vua25vd24xEDAOBgNVBAoMB1Vua25vd24xEDAOBgNVBAcMB1Vu | ||
a25vd24xEDAOBgNVBAgMB3Vua25vd24xCzAJBgNVBAYT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x1YsFmvV+wibYuTDTlk/XSh+MpuRvTmc8xWXIIe30Y | ||
PQXQPCrRd8vNjHt6i0MpW4kCe0QU/PTGOOBpD1VnJuAuebqmLuvdwCHb5uCacbVJ | ||
Gt9voyM3yQQNZ0A3jYcm7Y6PAEL/gxq0+F30+LwvZqaAGO6hqC7WJuiyoE9No9ri | ||
+0vZG0F0l1ZiVWaIi5m38KfYGuhd8tAEKkTUZ2cL0Td/KOavCgJ1D8s4co3wyDZG | ||
qrIVKHYvl8G2YivQdXpMuh32QAog/34zI909pM0E2IzxRl6YBjP9UaAUW6LWWuWZ | ||
1pso3pL/+WynAUC9gsWFcnsv3Ji4ZH24nA7BemBwo5JT/5WTtMTAA4phQDH340x4 | ||
VnHPigcvyu3eh/PDS7ZdiUSGuNcibSTrhn4bluCv5vzzmw+Atp9eccF81LxfERJY | ||
4H94Kw70/8LBLR/7McL/aobJ5mSpAK1nnsRdr1xE46uGpkmK4pgHfD5xkcn9AFxE | ||
vsCnwynYp4RNPfiLUHNzez0T4JWnJqPtSNtR2jTO3iVz04SUbUj/cltXOLzyPfyM | ||
VouEL2VnAmC1WCN5KC6NnzyKVLbQ7EAi4x+61lJWWkRugxrXeaVdNbgQlA1yvAlF | ||
cA8F69eVyPJnFsdWSq0= | ||
-----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,52 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQDLwKXJLdZmUnDJ | ||
x1EzU216R7pp1yBJxTPSFWfKFkmlmjhytF4JO0LM5Y2y2UDmefOUNPnphuebMDAM | ||
0bqk8/TS3aNVRTnDEwlIMbJKQOTSfGrhF3bQQNXf4YjEn5oQQ9jAxxjhFwYSsb7n | ||
KtJVtaeIMty8p4yMu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4qU24TL | ||
T7yjD0hClBLulDZwYQVVkRMXFEOJDieoxVFL5lx71lZlrNL36s/aYtHM+KykCE/u | ||
4A3IDAW3XNSz2z9LWDaQqtJ9Mfxy6wO1rh1Pc/qIKPrD//oV3FMGJ2xOm0WMDZc7 | ||
gLQtVZrycR3WLzG7d0wtb7seRmtljb7CRcO6TiRLLTHz3aH+/2aCPm6m+hYBdqhX | ||
rk6jrhc6pQ0Q9zMCdZ8y/IpUP8wjE/gCgJEkh4cCggEAaqh5XG3VeZ6+4hYfD9ix | ||
AKW1TwVcfPKFAltZxK6kI0yrukapwcQGE5IEM5vSv4xWQI76LRdPy1zWrKWQXbXZ | ||
Do1ayUp99pV8+CZbOdNkcPezTTUShh1/P9IgWhQ6apGpXCMnOMleJ1k4PcFKX+DB | ||
ovkJCgbrRWD/0qt+9CY4ISzGKy5dfPCxP+9xlA1s8DHJiFWST9H+8KDt4r2KapiX | ||
BorBqmkCkTgDCTkB318MkhYXAWn2HM+SvgwYLSPA7n8yECdVzVx/2YkO25eBKYhs | ||
zW8rjd/Ds6b0mPEnqhNxIHSpEZWW1URt6HxSOYxLtUytZXuZ/cgGNm6yTFKN+iFW | ||
QQKCAQBXZnUafw718mhV8a+8//kfEYnX/4+l81tAthVkENSW6oLMdBRej9+IcD6Y | ||
X9WUIVqVcGJ1Bj/Lzi9GHvI5/+ZoPosHt3M4awJaxSujlYaAqFXjsXe373HpCMNZ | ||
BNAMYQdqpDWIoFreNWQprRmHosLG31/uiLQKZAtaR7wf2WGkP7aN8xUZZ5E2ULOn | ||
3HM43crwWOf7Ur2+ZPwx8Dr1GaJrRSPb0iHDcz8J3/Irq0gLLJMqLYFDIfa0Qepd | ||
UF3csCbG50SCs5Sh3IFYkHavUMXaqJrqBXkUqwQU0rkzkByemNJif66+ojHymhMB | ||
jE5s8iIxjb4IkPziVOzgev4epyIs | ||
-----END PRIVATE KEY----- |
Binary file not shown.
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,11 @@ | ||
box.cfg { listen = { | ||
uri = 3301, | ||
params = { | ||
transport = 'ssl', | ||
ssl_key_file = 'key.pem', | ||
ssl_cert_file = 'certificate.crt' | ||
} | ||
} } | ||
|
||
box.schema.user.create('api_user', { password = 'secret', if_not_exists = true }) | ||
box.schema.user.grant('api_user', 'read, write, execute', 'universe', nil, { if_not_exists = true }) |