diff --git a/config/local/caching-service.yml b/config/local/caching-service.yml new file mode 100644 index 0000000000..4f0bf765b7 --- /dev/null +++ b/config/local/caching-service.yml @@ -0,0 +1,27 @@ +spring.profiles.active: debug,diag + +apiml: + service: + port: 10025 + banner: console + security: + x509: + certificatesUrl: https://localhost:10010/gateway/certificates +jgroups: + bind: + port: 7600 + address: localhost +caching: + storage: + mode: infinispan + infinispan: + initialHosts: localhost[7099] + +management: + endpoints: + web: + exposure: + include: "*" + +logging: + pattern: '%d{yyyy-MM-dd HH:mm:ss.SSS,UTC} <%blue(${logbackServiceName}):%magenta(%thread):${PID:}> %X{userid:-} %clr(%-5level) %cyan(\(%logger{15}\)) %msg%n' diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle index f0e0c2c69f..0153e51ace 100644 --- a/integration-tests/build.gradle +++ b/integration-tests/build.gradle @@ -146,7 +146,6 @@ task runAllIntegrationTestsNormal(type: Test) { 'SAFAuthTest', 'HATest', 'ChaoticHATest', - 'NotAttlsTest', 'OidcOauth2Test', 'MultipleRegistrationsTest', 'HealthEndpointProtectionDisabledTest', diff --git a/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java b/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java index aa84fb09eb..0547d18622 100644 --- a/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java +++ b/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java @@ -85,9 +85,9 @@ class WhenCalledWithInvalidAuthentication { @MethodSource("org.zowe.apiml.functional.caching.CachingAuthenticationTest#publicUrls") void publicEndpointIsAccessible(String endpoint) { given() - .when() + .when() .get(caching_url + endpoint) - .then() + .then() .statusCode(HttpStatus.OK.value()); } @@ -96,9 +96,9 @@ void givenUntrustedCert_cachingApiEndpointsAreInaccessible() { given() .config(SslContext.selfSignedUntrusted) .header(CERT_HEADER_NAME, "value") - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.FORBIDDEN.value()); } @@ -106,50 +106,51 @@ void givenUntrustedCert_cachingApiEndpointsAreInaccessible() { void givenNoCertificateAndHeader_cachingApiEndpointsAreInaccessible() { given() .header(CERT_HEADER_NAME, "value") - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.FORBIDDEN.value()); } - @Test - void givenCertificateButNoHeader_cachingApiEndpointsAreInaccessible() { - - given() - .config(SslContext.clientCertApiml) - .when() - .get(caching_url + CACHING_PATH) - .then() - .statusCode(HttpStatus.UNAUTHORIZED.value()); - } - @Test void givenNoCertificateAndNoHeader_cachingApiEndpointsAreInaccessible() { given() - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.FORBIDDEN.value()); } } @Nested class WhenCalledWithValidAuthentication { + + @Test + void givenCertificateButNoHeader_cachingApiEndpointsIsAccessible() { + given() + .config(SslContext.clientCertApiml) + .when() + .get(caching_url + CACHING_PATH) + .then() + .statusCode(HttpStatus.OK.value()); + } + @Test void cachingApiEndpointsAccessible() { given() .config(SslContext.clientCertApiml) .header(CLIENT_CERT_HEADER, clientCertValue) - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.OK.value()); } - } + } private void clearSsl() { RestAssured.config = RestAssured.config().sslConfig(SSLConfig.sslConfig()); RestAssured.useRelaxedHTTPSValidation(); } + } diff --git a/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java b/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java index 88cc4b5b90..900f06e77f 100644 --- a/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java +++ b/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java @@ -46,4 +46,5 @@ void allClustersAreAvailable() { .then() .body("name", hasItems("GATEWAY", "DISCOVERY","APICATALOG")); } + }