Commit ef04418f authored by Alok Joshi's avatar Alok Joshi
Browse files

Merge branch 'upgrade_libs' into 'master'

Upgrade libraries, change info logs to debug

See merge request !89
parents be59ddca c12fb28c
Pipeline #50441 failed with stages
in 23 minutes and 54 seconds
This diff is collapsed.
......@@ -79,6 +79,8 @@ spec:
value: osdu-db
- name: entitlements_service_endpoint
value: http://entitlements/api/entitlements/v2
- name: entitlements_service_api_key
value: "OBSOLETE"
- name: registeration_service_endpoint
value: http://register/api/register/v1
- name: partition_service_endpoint
......
......@@ -99,12 +99,12 @@ public class PubsubEndpoint {
Map<String, String> requestHeader = new HashMap<>();
if (secretType.equalsIgnoreCase(HMAC_TYPE)) {
this.log.info("receiving pubsub message, will send out hmac type request, pubsub message: " + pubsubMessage);
this.log.debug("receiving pubsub message, will send out hmac type request, pubsub message: " + pubsubMessage);
HmacSecret hmacSecret = (HmacSecret) secret;
String signedjwt = this.signatureService.getSignedSignature(endpoint, hmacSecret.getValue());
pushUrl = endpoint + "?hmac=" + signedjwt;
} else if (secretType.equalsIgnoreCase(GSA_TYPE)) {
this.log.info("receiving pubsub message, will send out gsa type request, pubsub message: " + pubsubMessage);
this.log.debug("receiving pubsub message, will send out gsa type request, pubsub message: " + pubsubMessage);
GsaSecret gsaSecret = (GsaSecret) secret;
GsaSecretValue gsaSecretValue = gsaSecret.getValue();
......@@ -117,7 +117,7 @@ public class PubsubEndpoint {
requestHeader.put("Authorization", idToken);
}
this.log.info("sending out notification to endpoint: " + endpoint);
this.log.debug("sending out notification to endpoint: " + endpoint);
requestHeader.put(DpsHeaders.CONTENT_TYPE, "application/json");
requestHeader.put(DpsHeaders.CORRELATION_ID, headerAttributes.get(DpsHeaders.CORRELATION_ID));
requestHeader.put(DpsHeaders.DATA_PARTITION_ID, headerAttributes.get(DpsHeaders.DATA_PARTITION_ID));
......@@ -128,7 +128,7 @@ public class PubsubEndpoint {
this.log.error(NOT_ACKNOWLEDGE);
return ResponseEntity.badRequest().body(NOT_ACKNOWLEDGE);
}
this.log.info(ACKNOWLEDGE);
this.log.debug(ACKNOWLEDGE);
return ResponseEntity.ok(ACKNOWLEDGE);
}
......
......@@ -25,7 +25,7 @@
<java.version>8</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<os-core-common.version>0.6.9</os-core-common.version>
<os-core-common.version>0.9.0</os-core-common.version>
</properties>
<licenses>
......
......@@ -39,7 +39,7 @@
<springframework.version>4.3.0.RELEASE</springframework.version>
<reactor.netty.version>0.9.0.RELEASE</reactor.netty.version>
<reactor.core.version>3.3.0.RELEASE</reactor.core.version>
<osdu.corelibazure.version>0.9.0</osdu.corelibazure.version>
<osdu.corelibazure.version>0.10.0-rc8</osdu.corelibazure.version>
<junit.version>5.6.0</junit.version>
<jjwt.version>3.8.1</jjwt.version>
<mockito.version>2.23.0</mockito.version>
......
......@@ -44,7 +44,7 @@ public class AzureServiceAccountValidatorImpl implements IServiceAccountValidato
String appIdClaim = jwt.getClaim(APP_ID_CLAIM).asString();
if(appIdClaim!= null && appIdClaim.equals(userIdentity)) {
logger.info("PubSub authorized");
logger.debug("PubSub authorized");
return true;
}
return false;
......
......@@ -26,6 +26,10 @@ logging.slf4jlogger.enabled=true
logging.mdccontext.enabled=false
logging.ignore.servlet.paths=/swagger-ui.html
# Need below two properties for Entitlements config bean initialization due to a primary bean added in core-lib-azure which takes precedence over EntitlementsClientFactory class in notification service
AUTHORIZE_API=${entitlements_service_endpoint}
AUTHORIZE_API_KEY=${entitlements_service_api_key}
# Service settings
PARTITION_API=${partition_service_endpoint}
app.entitlements=${entitlements_service_endpoint}
......
......@@ -98,7 +98,7 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
ClientResponse response = descriptor.run(this.getArg(), this.testUtils.getOpsToken());
Assert.assertEquals(this.error(response.getStatus() == 204 ? "" : (String)response.getEntity(String.class)), (long)this.expectedOkResponseCode(), (long)response.getStatus());
Assert.assertEquals("GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH", response.getHeaders().getFirst("Access-Control-Allow-Methods"));
Assert.assertEquals("origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", response.getHeaders().getFirst("Access-Control-Allow-Headers"));
Assert.assertEquals("access-control-allow-origin, origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", response.getHeaders().getFirst("Access-Control-Allow-Headers"));
Assert.assertEquals("*", response.getHeaders().getFirst("Access-Control-Allow-Origin"));
Assert.assertEquals("true", response.getHeaders().getFirst("Access-Control-Allow-Credentials"));
Assert.assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options"));
......
......@@ -89,7 +89,7 @@ public abstract class BaseTestTemplate extends TestBase {
assertEquals(error(response.getStatus() == 204 ? "" : response.getEntity(String.class)), expectedOkResponseCode(), response.getStatus());
assertEquals("GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH", response.getHeaders().getFirst("Access-Control-Allow-Methods"));
assertEquals("origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", response.getHeaders().getFirst("Access-Control-Allow-Headers"));
assertEquals("access-control-allow-origin, origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", response.getHeaders().getFirst("Access-Control-Allow-Headers"));
assertEquals("*", response.getHeaders().getFirst("Access-Control-Allow-Origin"));
assertEquals("true", response.getHeaders().getFirst("Access-Control-Allow-Credentials"));
assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment