diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java b/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java index edbce0c44ab6f27f5a949bd58240db67ca2ef2e0..9ae87d9e0a34ee5506cafd5f888cefc30bd34cd9 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java @@ -154,6 +154,8 @@ public class PubsubEndpoint { } private String querySubscriptionAndUpdateCache(String notificationId) throws Exception { + Map<String,String> hmap = headers.getHeaders(); + ISubscriptionService service = subscriptionFactory.create(headers); List<Subscription> subscriptionList = service.query(notificationId); diff --git a/provider/notification-aws/pom.xml b/provider/notification-aws/pom.xml index f7e76b744d4b699bceb908c9cafbdd12c9a5ef4c..e0aa33ef40c794e4a4267e34fd81bb67dc9fa01e 100644 --- a/provider/notification-aws/pom.xml +++ b/provider/notification-aws/pom.xml @@ -50,7 +50,7 @@ <dependency> <groupId>org.opengroup.osdu.core.aws</groupId> <artifactId>os-core-lib-aws</artifactId> - <version>0.3.12-SNAPSHOT</version> + <version>0.3.13-feat-deshruch-oauth-changes-SNAPSHOT</version> </dependency> <!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-secretsmanager --> diff --git a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/impl/ServiceAccountJwtAwsClientImpl.java b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/impl/ServiceAccountJwtAwsClientImpl.java index dfc735be7bb4fa64c0afdfd868e0e0c9f77bf169..13a5fa6d79ecf71cb94a1b4af28b2888ad571c6f 100644 --- a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/impl/ServiceAccountJwtAwsClientImpl.java +++ b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/impl/ServiceAccountJwtAwsClientImpl.java @@ -108,7 +108,8 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient Parameter paramsResult = paramResult.getParameter(); client_credentials_clientid = paramsResult.getValue(); client_credentials_secret = getSecret(client_secret_secretName,amazonRegion,client_secret_key); - + String token= getServicePrincipalCredentials(); + System.out.println(token); } } @@ -116,6 +117,8 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient public String getIdToken(String s) { String token= getServicePrincipalCredentials(); + System.out.println("Printing the client credentials token generated"); + System.out.println(token); return token; } @@ -139,6 +142,7 @@ public class ServiceAccountJwtAwsClientImpl implements IServiceAccountJwtClient AccessToken accessToken = this.getResult(result, AccessToken.class); token = accessToken.getAccess_token(); + }catch(Exception e) { System.out.println("Could not parse AccessToken result to get access_token"); diff --git a/testing/notification-test-aws/pom.xml b/testing/notification-test-aws/pom.xml index 6b180e62eba58e20cf0eff968fff417d964541ec..6ec0498d09935a7d95b4b288228e2238a5884934 100644 --- a/testing/notification-test-aws/pom.xml +++ b/testing/notification-test-aws/pom.xml @@ -44,7 +44,7 @@ <dependency> <groupId>org.opengroup.osdu.core.aws</groupId> <artifactId>os-core-lib-aws</artifactId> - <version>0.3.12-SNAPSHOT</version> + <version>0.3.13-feat-deshruch-oauth-changes-SNAPSHOT</version> </dependency> <dependency> <groupId>com.amazonaws</groupId>