diff --git a/NOTICE b/NOTICE index c5ee26295cd1e0beec5e22accb43bd4f51deb4ca..d1f2b691be8e9f8f08ab21110a84807b9bfc66e5 100644 --- a/NOTICE +++ b/NOTICE @@ -92,8 +92,8 @@ The following software have components provided under the terms of this license: - Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) - Google App Engine extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-appengine) - Google Cloud Core (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core, https://github.com/googleapis/java-core) -- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http, https://github.com/googleapis/java-core) -- Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc, https://github.com/googleapis/java-core) +- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http, https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http, https://github.com/googleapis/java-core) +- Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc, https://github.com/googleapis/java-core) - Google Cloud Datastore (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datastore, https://github.com/googleapis/java-datastore) - Google Cloud IAM Service Account Credentials (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/java-iamcredentials) - Google Cloud Logging (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-logging, https://github.com/googleapis/java-logging) diff --git a/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java b/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java index ebc825e80f7089f4c8e77167cd9cead3a0d41334..eefe15dbb03971d47479e269be582120533c52b3 100644 --- a/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java +++ b/testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java @@ -14,6 +14,7 @@ package org.opengroup.osdu.notification.api; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import org.junit.After; import org.junit.AfterClass; @@ -132,4 +133,26 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests { awssubscriptionService.delete(subscriptionId); } + @Override + @Test + public void should_return20X_when_usingCredentialsWithOpsPermission() throws Exception{ + createResource(); + + try { + ClientResponse response = descriptor.run(getArg(), testUtils.getOpsToken()); + + assertEquals(error(response.getStatus() == 204 ? "" : response.getEntity(String.class)), expectedOkResponseCode(), response.getStatus()); + assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options")); + assertEquals("1; mode=block", response.getHeaders().getFirst("X-XSS-Protection")); + assertEquals("nosniff", response.getHeaders().getFirst("X-Content-Type-Options")); + assertEquals("no-cache, no-store, must-revalidate", response.getHeaders().getFirst("Cache-Control")); + assertEquals("default-src 'self'", response.getHeaders().getFirst("Content-Security-Policy")); + assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0).contains("max-age=31536000")); + assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0).contains("includeSubDomains")); + assertEquals("0", response.getHeaders().getFirst("Expires")); + } finally { + deleteResource(); + } + } + } \ No newline at end of file