mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(ecr): serve the registry data plane over TLS (#4040)
- Update ECR host routing regex to support <account>.dkr.ecr.<region>.localhost.floci.io - Populate regional wildcard SANs (*.dkr.ecr.<region>.localhost.floci.io) for all advertised AWS regions - Add unit tests for hostname matching, malformed host rejection, immutable tag mutability over TLS, and certificate SAN enumeration - Add Docker integration test verifying end-to-end TLS image push/pull with root CA verification and plain HTTP regression - Update ECR and TLS user documentation
This commit is contained in:
1 parent
9dab36197a
commit
7777a97de9
7 files changed
+454
-12
No files matched your search
+280
@@ -0,0 +1,280 @@
|
||||
package io.github.hectorvent.floci.config;
|
||||
|
||||
import io.github.hectorvent.floci.services.acm.CertificateGenerator.GeneratedCertificate;
|
||||
import io.github.hectorvent.floci.services.acm.model.KeyAlgorithm;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.junit.QuarkusTestProfile;
|
||||
import io.quarkus.test.junit.TestProfile;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.Vertx;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
import io.vertx.core.http.HttpClient;
|
||||
import io.vertx.core.http.HttpClientOptions;
|
||||
import io.vertx.core.http.HttpMethod;
|
||||
import io.vertx.core.http.RequestOptions;
|
||||
import io.vertx.core.net.PemTrustOptions;
|
||||
import io.vertx.core.net.SocketAddress;
|
||||
import jakarta.inject.Inject;
|
||||
import org.eclipse.microprofile.config.inject.ConfigProperty;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Docker-gated integration test verifying OCI Distribution image push and pull
|
||||
* over TLS against the ECR registry data plane, including hostname verification
|
||||
* of the regional wildcard SANs and regression coverage for plain HTTP.
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestProfile(EcrTlsDataPlaneDockerIntegrationTest.Profile.class)
|
||||
class EcrTlsDataPlaneDockerIntegrationTest {
|
||||
|
||||
@ConfigProperty(name = "quarkus.http.test-ssl-port", defaultValue = "0")
|
||||
int sslPort;
|
||||
|
||||
@ConfigProperty(name = "quarkus.http.test-port", defaultValue = "0")
|
||||
int httpPort;
|
||||
|
||||
@Inject
|
||||
Vertx vertx;
|
||||
|
||||
@BeforeAll
|
||||
static void requireDocker() {
|
||||
Assumptions.assumeTrue(isDockerAvailable(), "Docker daemon must be available for ECR data plane tests");
|
||||
}
|
||||
|
||||
private static boolean isDockerAvailable() {
|
||||
try {
|
||||
Process process = new ProcessBuilder("docker", "version", "--format", "{{.Server.Version}}")
|
||||
.redirectErrorStream(true)
|
||||
.start();
|
||||
int exit = process.waitFor();
|
||||
return exit == 0;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void pushAndPullImageOverTlsAndVerifyPlainHttpRegression() throws Exception {
|
||||
String tlsHost = "000000000000.dkr.ecr.us-east-1.localhost.floci.io";
|
||||
HttpClient tlsClient = vertx.createHttpClient(new HttpClientOptions()
|
||||
.setSsl(true)
|
||||
.setForceSni(true)
|
||||
.setTrustOptions(new PemTrustOptions().addCertPath(
|
||||
FlociCertificateAuthority.loadOrCreate(Profile.TLS_DIR).certificatePath().toString()))
|
||||
.setVerifyHost(true));
|
||||
|
||||
try {
|
||||
// 1. Verify registry ping over TLS with hostname verification
|
||||
SimpleResponse pingResponse = execute(tlsClient, HttpMethod.GET, sslPort, tlsHost, "/v2/", null, null, null);
|
||||
assertEquals(200, pingResponse.statusCode());
|
||||
assertEquals("registry/2.0", pingResponse.header("Docker-Distribution-Api-Version"));
|
||||
|
||||
// 2. Upload layer blob over TLS
|
||||
byte[] layerBytes = "floci-ecr-tls-layer-content-v1".getBytes(StandardCharsets.UTF_8);
|
||||
String layerDigest = "sha256:" + sha256Hex(layerBytes);
|
||||
|
||||
SimpleResponse startLayerUpload = execute(tlsClient, HttpMethod.POST, sslPort, tlsHost,
|
||||
"/v2/tls-repo/blobs/uploads/", null, null, null);
|
||||
assertEquals(202, startLayerUpload.statusCode());
|
||||
String layerUploadLocation = startLayerUpload.header("Location");
|
||||
assertNotNull(layerUploadLocation);
|
||||
|
||||
String layerUploadUri = layerUploadLocation + (layerUploadLocation.contains("?") ? "&" : "?")
|
||||
+ "digest=" + layerDigest;
|
||||
SimpleResponse finishLayerUpload = execute(tlsClient, HttpMethod.PUT, sslPort, tlsHost,
|
||||
layerUploadUri, "application/octet-stream", null, Buffer.buffer(layerBytes));
|
||||
assertEquals(201, finishLayerUpload.statusCode());
|
||||
|
||||
// 3. Upload config blob over TLS
|
||||
byte[] configBytes = "{\"architecture\":\"amd64\",\"os\":\"linux\"}".getBytes(StandardCharsets.UTF_8);
|
||||
String configDigest = "sha256:" + sha256Hex(configBytes);
|
||||
|
||||
SimpleResponse startConfigUpload = execute(tlsClient, HttpMethod.POST, sslPort, tlsHost,
|
||||
"/v2/tls-repo/blobs/uploads/", null, null, null);
|
||||
assertEquals(202, startConfigUpload.statusCode());
|
||||
String configUploadLocation = startConfigUpload.header("Location");
|
||||
assertNotNull(configUploadLocation);
|
||||
|
||||
String configUploadUri = configUploadLocation + (configUploadLocation.contains("?") ? "&" : "?")
|
||||
+ "digest=" + configDigest;
|
||||
SimpleResponse finishConfigUpload = execute(tlsClient, HttpMethod.PUT, sslPort, tlsHost,
|
||||
configUploadUri, "application/octet-stream", null, Buffer.buffer(configBytes));
|
||||
assertEquals(201, finishConfigUpload.statusCode());
|
||||
|
||||
// 4. Put manifest over TLS
|
||||
String manifestJson = """
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
|
||||
"config": {
|
||||
"mediaType": "application/vnd.docker.container.image.v1+json",
|
||||
"size": %d,
|
||||
"digest": "%s"
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
|
||||
"size": %d,
|
||||
"digest": "%s"
|
||||
}
|
||||
]
|
||||
}
|
||||
""".formatted(configBytes.length, configDigest, layerBytes.length, layerDigest);
|
||||
|
||||
SimpleResponse putManifestResponse = execute(tlsClient, HttpMethod.PUT, sslPort, tlsHost,
|
||||
"/v2/tls-repo/manifests/v1",
|
||||
"application/vnd.docker.distribution.manifest.v2+json",
|
||||
null,
|
||||
Buffer.buffer(manifestJson));
|
||||
assertEquals(201, putManifestResponse.statusCode());
|
||||
String manifestDigest = putManifestResponse.header("Docker-Content-Digest");
|
||||
assertNotNull(manifestDigest);
|
||||
|
||||
// 5. Pull manifest over TLS
|
||||
String manifestMediaType = "application/vnd.docker.distribution.manifest.v2+json";
|
||||
SimpleResponse getManifestResponse = execute(tlsClient, HttpMethod.GET, sslPort, tlsHost,
|
||||
"/v2/tls-repo/manifests/v1", null, manifestMediaType, null);
|
||||
assertEquals(200, getManifestResponse.statusCode());
|
||||
assertEquals(manifestDigest, getManifestResponse.header("Docker-Content-Digest"));
|
||||
|
||||
// 6. Pull layer blob over TLS
|
||||
SimpleResponse getLayerResponse = execute(tlsClient, HttpMethod.GET, sslPort, tlsHost,
|
||||
"/v2/tls-repo/blobs/" + layerDigest, null, null, null);
|
||||
assertEquals(200, getLayerResponse.statusCode());
|
||||
assertArrayEquals(layerBytes, getLayerResponse.body().getBytes());
|
||||
|
||||
// 7. List tags over TLS
|
||||
SimpleResponse getTagsResponse = execute(tlsClient, HttpMethod.GET, sslPort, tlsHost,
|
||||
"/v2/tls-repo/tags/list", null, null, null);
|
||||
assertEquals(200, getTagsResponse.statusCode());
|
||||
assertTrue(getTagsResponse.body().toString().contains("v1"));
|
||||
|
||||
// 8. Plain HTTP regression: verify the plain HTTP path still works on port
|
||||
HttpClient httpClient = vertx.createHttpClient(new HttpClientOptions().setSsl(false));
|
||||
try {
|
||||
String httpHost = "000000000000.dkr.ecr.us-east-1.localhost:" + httpPort;
|
||||
SimpleResponse httpPing = execute(httpClient, HttpMethod.GET, httpPort, httpHost,
|
||||
"/v2/", null, null, null);
|
||||
assertEquals(200, httpPing.statusCode());
|
||||
assertEquals("registry/2.0", httpPing.header("Docker-Distribution-Api-Version"));
|
||||
|
||||
SimpleResponse httpManifestGet = execute(httpClient, HttpMethod.GET, httpPort, httpHost,
|
||||
"/v2/tls-repo/manifests/v1", null, manifestMediaType, null);
|
||||
assertEquals(200, httpManifestGet.statusCode());
|
||||
assertEquals(manifestDigest, httpManifestGet.header("Docker-Content-Digest"));
|
||||
} finally {
|
||||
httpClient.close();
|
||||
}
|
||||
} finally {
|
||||
tlsClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
private SimpleResponse execute(HttpClient client, HttpMethod method, int port, String host,
|
||||
String uri, String contentType, String accept, Buffer body) throws Exception {
|
||||
String pureHost = host.contains(":") ? host.substring(0, host.indexOf(':')) : host;
|
||||
RequestOptions options = new RequestOptions()
|
||||
.setServer(SocketAddress.inetSocketAddress(port, "127.0.0.1"))
|
||||
.setHost(pureHost)
|
||||
.setPort(port)
|
||||
.setMethod(method)
|
||||
.setURI(uri);
|
||||
|
||||
return client.request(options)
|
||||
.compose(request -> {
|
||||
request.putHeader("Host", host);
|
||||
if (contentType != null) {
|
||||
request.putHeader("Content-Type", contentType);
|
||||
}
|
||||
if (accept != null) {
|
||||
request.putHeader("Accept", accept);
|
||||
}
|
||||
if (body != null) {
|
||||
request.putHeader("Content-Length", String.valueOf(body.length()));
|
||||
return request.send(body);
|
||||
}
|
||||
return request.send();
|
||||
})
|
||||
.compose(response -> response.body().map(responseBody ->
|
||||
new SimpleResponse(response.statusCode(), response.headers(), responseBody)))
|
||||
.toCompletionStage().toCompletableFuture().get(15, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private static String sha256Hex(byte[] data) {
|
||||
try {
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-256");
|
||||
byte[] hash = digest.digest(data);
|
||||
StringBuilder hexString = new StringBuilder();
|
||||
for (byte b : hash) {
|
||||
String hex = Integer.toHexString(0xff & b);
|
||||
if (hex.length() == 1) {
|
||||
hexString.append('0');
|
||||
}
|
||||
hexString.append(hex);
|
||||
}
|
||||
return hexString.toString();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private record SimpleResponse(int statusCode, MultiMap headers, Buffer body) {
|
||||
String header(String name) {
|
||||
return headers.get(name);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class Profile implements QuarkusTestProfile {
|
||||
|
||||
static final Path DATA_DIR = Path.of("target", "floci-ecr-tls-dataplane-test").toAbsolutePath();
|
||||
static final Path TLS_DIR = DATA_DIR.resolve("tls");
|
||||
static final Path CERT_FILE = TLS_DIR.resolve("floci-server.crt");
|
||||
static final Path KEY_FILE = TLS_DIR.resolve("floci-server.key");
|
||||
|
||||
static {
|
||||
try {
|
||||
Files.createDirectories(TLS_DIR);
|
||||
FlociCertificateAuthority ca = FlociCertificateAuthority.loadOrCreate(TLS_DIR);
|
||||
List<String> sans = new ArrayList<>(TlsConfigSource.DEFAULT_SAN_HOSTNAMES);
|
||||
GeneratedCertificate leaf = ca.issueServerCertificate("localhost", sans, KeyAlgorithm.RSA_2048, null);
|
||||
Files.writeString(CERT_FILE, leaf.certificatePem());
|
||||
Files.writeString(KEY_FILE, leaf.privateKeyPem());
|
||||
ContainerCaBundle.write(TLS_DIR, ca.certificatePath());
|
||||
} catch (IOException | GeneralSecurityException e) {
|
||||
throw new IllegalStateException("Failed to prepare TLS test files", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getConfigOverrides() {
|
||||
return Map.of(
|
||||
"floci.tls.enabled", "true",
|
||||
"floci.tls.self-signed", "true",
|
||||
"floci.tls.aws-https-port", "0",
|
||||
"floci.storage.persistent-path", DATA_DIR.toString(),
|
||||
"quarkus.tls.key-store.pem.0.cert", CERT_FILE.toString(),
|
||||
"quarkus.tls.key-store.pem.0.key", KEY_FILE.toString(),
|
||||
"quarkus.http.insecure-requests", "enabled"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.github.hectorvent.floci.config;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.github.hectorvent.floci.core.common.AwsRegions;
|
||||
import io.github.hectorvent.floci.services.acm.CertificateGenerator;
|
||||
import io.github.hectorvent.floci.services.acm.model.KeyAlgorithm;
|
||||
import org.bouncycastle.asn1.x500.X500Name;
|
||||
@@ -471,6 +472,27 @@ class TlsCertificateHostnameTest {
|
||||
leaf.verify(ca.getPublicKey());
|
||||
}
|
||||
|
||||
@Test
|
||||
void defaultSansIncludeEcrRegionalHostnamesForAllAwsRegions() throws Exception {
|
||||
System.setProperty("floci.tls.enabled", "true");
|
||||
System.setProperty("floci.tls.self-signed", "true");
|
||||
System.setProperty("floci.storage.persistent-path", tempDir.toString());
|
||||
|
||||
new TlsConfigSource();
|
||||
|
||||
Path certFile = tempDir.resolve("tls/floci-server.crt");
|
||||
X509Certificate cert = parseCertificate(certFile);
|
||||
List<String> sans = extractSansFromCertificate(cert);
|
||||
|
||||
for (String region : AwsRegions.ALL) {
|
||||
String expectedWildcard = "*.dkr.ecr." + region + ".localhost.floci.io";
|
||||
assertTrue(TlsConfigSource.DEFAULT_SAN_HOSTNAMES.contains(expectedWildcard),
|
||||
"DEFAULT_SAN_HOSTNAMES missing ECR wildcard for region " + region);
|
||||
assertTrue(sans.contains(expectedWildcard),
|
||||
"Certificate SANs missing ECR wildcard for region " + region);
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== Helper Methods ====================
|
||||
|
||||
private X509Certificate parseCertificate(Path certFile) throws Exception {
|
||||
|
||||
+105
-1
@@ -57,6 +57,48 @@ class EcrRegistryDataPlaneTest {
|
||||
assertEquals("/v2/000000000000/us-east-1/platform/api/manifests/v1", request.backendUri());
|
||||
}
|
||||
|
||||
@Test
|
||||
void hostnameStyleWithTlsDomainMatchesAndCapturesAccountAndRegion() {
|
||||
EcrRegistryDataPlane.RegistryRequest request = EcrRegistryDataPlane.requestFor(
|
||||
"123456789012.dkr.ecr.eu-west-1.localhost.floci.io:4566",
|
||||
"/v2/team/app/manifests/v2", null, "hostname").orElseThrow();
|
||||
|
||||
assertEquals("123456789012", request.accountId());
|
||||
assertEquals("eu-west-1", request.region());
|
||||
assertEquals("team/app", request.repositoryName());
|
||||
assertEquals("123456789012/eu-west-1/team/app", request.storageRepositoryName());
|
||||
assertEquals("v2", request.tag());
|
||||
assertEquals("/v2/123456789012/eu-west-1/team/app/manifests/v2", request.backendUri());
|
||||
|
||||
EcrRegistryDataPlane.RegistryRequest requestNoPort = EcrRegistryDataPlane.requestFor(
|
||||
"123456789012.dkr.ecr.eu-west-1.localhost.floci.io",
|
||||
"/v2/team/app/tags/list", null, "hostname").orElseThrow();
|
||||
|
||||
assertEquals("123456789012", requestNoPort.accountId());
|
||||
assertEquals("eu-west-1", requestNoPort.region());
|
||||
assertEquals("/v2/123456789012/eu-west-1/team/app/tags/list", requestNoPort.backendUri());
|
||||
}
|
||||
|
||||
@Test
|
||||
void malformedAccountOrNonEcrHostIsRejected() {
|
||||
// Less than 12 digits
|
||||
assertFalse(EcrRegistryDataPlane.requestFor(
|
||||
"12345.dkr.ecr.us-east-1.localhost.floci.io:4566",
|
||||
"/v2/repo/manifests/latest", null, "hostname").isPresent());
|
||||
// Non-numeric account
|
||||
assertFalse(EcrRegistryDataPlane.requestFor(
|
||||
"abcdefghijkl.dkr.ecr.us-east-1.localhost.floci.io:4566",
|
||||
"/v2/repo/manifests/latest", null, "hostname").isPresent());
|
||||
// Non-ECR subdomain
|
||||
assertFalse(EcrRegistryDataPlane.requestFor(
|
||||
"s3.localhost.floci.io:4566",
|
||||
"/v2/repo/manifests/latest", null, "hostname").isPresent());
|
||||
// Default host
|
||||
assertFalse(EcrRegistryDataPlane.requestFor(
|
||||
"localhost.floci.io:4566",
|
||||
"/v2/repo/manifests/latest", null, "hostname").isPresent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void digestManifestWriteDoesNotAcquireAnImmutableTagLock() {
|
||||
var request = EcrRegistryDataPlane.requestFor(
|
||||
@@ -190,10 +232,72 @@ class EcrRegistryDataPlaneTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void immutableTagRejectsReplacementOverTlsDataPlane() throws Exception {
|
||||
AtomicBoolean tagExists = new AtomicBoolean();
|
||||
HttpServer registry = vertx.createHttpServer()
|
||||
.requestHandler(request -> {
|
||||
if (request.method() == HttpMethod.HEAD) {
|
||||
request.response().setStatusCode(tagExists.get() ? 200 : 404)
|
||||
.putHeader("Docker-Content-Digest", "sha256:existing")
|
||||
.end();
|
||||
} else if (request.method() == HttpMethod.PUT) {
|
||||
tagExists.set(true);
|
||||
request.response().setStatusCode(201).end();
|
||||
} else {
|
||||
request.response().setStatusCode(200).end();
|
||||
}
|
||||
})
|
||||
.listen(0, "127.0.0.1")
|
||||
.toCompletionStage().toCompletableFuture().get(2, TimeUnit.SECONDS);
|
||||
|
||||
HttpServer dataPlane = null;
|
||||
try {
|
||||
EcrRegistryManager registryManager = Mockito.mock(EcrRegistryManager.class);
|
||||
EcrService ecrService = Mockito.mock(EcrService.class);
|
||||
EmulatorConfig config = Mockito.mock(EmulatorConfig.class, Mockito.RETURNS_DEEP_STUBS);
|
||||
when(config.services().ecr().enabled()).thenReturn(true);
|
||||
when(config.services().ecr().uriStyle()).thenReturn("hostname");
|
||||
when(registryManager.httpClient())
|
||||
.thenReturn(new RegistryHttpClient("http://127.0.0.1:" + registry.actualPort()));
|
||||
when(ecrService.isImageTagImmutable("platform/api", "000000000000", "us-east-1"))
|
||||
.thenReturn(true);
|
||||
when(ecrService.registryRepositoryName("platform/api", "000000000000", "us-east-1"))
|
||||
.thenReturn("legacy/platform-api");
|
||||
|
||||
Router router = Router.router(vertx);
|
||||
new EcrRegistryDataPlane(registryManager, ecrService, config, vertx).register(router);
|
||||
dataPlane = vertx.createHttpServer().requestHandler(router)
|
||||
.listen(0, "127.0.0.1")
|
||||
.toCompletionStage().toCompletableFuture().get(2, TimeUnit.SECONDS);
|
||||
|
||||
String tlsHost = "000000000000.dkr.ecr.us-east-1.localhost.floci.io:4566";
|
||||
assertEquals(201, putManifest(dataPlane.actualPort(), tlsHost).statusCode());
|
||||
|
||||
ManifestResponse rejected = putManifest(dataPlane.actualPort(), tlsHost);
|
||||
assertEquals(400, rejected.statusCode());
|
||||
JsonObject json = new JsonObject(rejected.body());
|
||||
JsonArray errors = json.getJsonArray("errors");
|
||||
assertNotNull(errors);
|
||||
assertEquals(1, errors.size());
|
||||
JsonObject error = errors.getJsonObject(0);
|
||||
assertEquals("TAG_INVALID", error.getString("code"));
|
||||
} finally {
|
||||
if (dataPlane != null) {
|
||||
dataPlane.close().toCompletionStage().toCompletableFuture().get(2, TimeUnit.SECONDS);
|
||||
}
|
||||
registry.close().toCompletionStage().toCompletableFuture().get(2, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
private record ManifestResponse(int statusCode, String body) {
|
||||
}
|
||||
|
||||
private ManifestResponse putManifest(int port) throws Exception {
|
||||
return putManifest(port, "000000000000.dkr.ecr.us-east-1.localhost:4566");
|
||||
}
|
||||
|
||||
private ManifestResponse putManifest(int port, String host) throws Exception {
|
||||
HttpClient client = vertx.createHttpClient();
|
||||
return client.request(new RequestOptions()
|
||||
.setHost("127.0.0.1")
|
||||
@@ -201,7 +305,7 @@ class EcrRegistryDataPlaneTest {
|
||||
.setMethod(HttpMethod.PUT)
|
||||
.setURI("/v2/platform/api/manifests/v1"))
|
||||
.compose(request -> {
|
||||
request.putHeader("Host", "000000000000.dkr.ecr.us-east-1.localhost:4566");
|
||||
request.putHeader("Host", host);
|
||||
request.setChunked(true);
|
||||
return request.send(Buffer.buffer("{}"));
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user