From 056ddf27d0d637883cb2693409b3cbd08d1dd1ab Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Mon, 13 Dec 2021 16:40:28 -0600 Subject: [PATCH 1/8] added suffix _NEW for gpg key and phrase --- .circleci/settings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/settings.xml b/.circleci/settings.xml index 8f1ee8d..d31f8d6 100644 --- a/.circleci/settings.xml +++ b/.circleci/settings.xml @@ -21,6 +21,7 @@ ${NEXUS_RM_GPG_NEW} + sonatype-staging From f447ff88daa5516efcc7f5165c72ba64fed427dd Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Wed, 15 Dec 2021 13:16:52 -0600 Subject: [PATCH 2/8] revert to returning empty response for get metadata --- .../finra/fidelius/MetadataParameters.java | 23 ------------------- .../controllers/FideliusController.java | 5 +--- .../controllers/FideliusControllerTest.java | 4 ++-- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/fidelius-sdk/src/main/java/org/finra/fidelius/MetadataParameters.java b/fidelius-sdk/src/main/java/org/finra/fidelius/MetadataParameters.java index 8f209e6..e854c02 100644 --- a/fidelius-sdk/src/main/java/org/finra/fidelius/MetadataParameters.java +++ b/fidelius-sdk/src/main/java/org/finra/fidelius/MetadataParameters.java @@ -114,29 +114,6 @@ public String toString() { '}'; } - - /* - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - MetadataParameters that = (MetadataParameters) o; - - if (!sourceType.equals(that.sourceType)) return false; - if (!source.equals(that.source)) return false; - if (!version.equals(that.version)) return false; - if (!fullName.equals(that.fullName)) return false; - if (updateBy != null ? !updateBy.equals(that.updateBy) : that.updateBy != null) return false; - if (updatedOn != null ? !updatedOn.equals(that.updatedOn) : that.updatedOn != null) return false; - if (component != null ? !component.equals(that.component) : that.component != null) return false; - if (sdlc != null ? !sdlc.equals(that.sdlc) : that.sdlc != null) return false; - if (!Arrays.equals(dataKeyBytes, that.dataKeyBytes)) return false; - if (!Arrays.equals(credentialBytes, that.credentialBytes)) return false; - return Arrays.equals(hmacBytes, that.hmacBytes); - } - */ - @Override public int hashCode() { int result = sourceType.hashCode(); diff --git a/fidelius-service/src/main/java/org/finra/fidelius/controllers/FideliusController.java b/fidelius-service/src/main/java/org/finra/fidelius/controllers/FideliusController.java index aaf41bb..1bef560 100644 --- a/fidelius-service/src/main/java/org/finra/fidelius/controllers/FideliusController.java +++ b/fidelius-service/src/main/java/org/finra/fidelius/controllers/FideliusController.java @@ -189,10 +189,7 @@ public ResponseEntity getMetadata(@RequestParam("account") String account, @RequestParam("shortKey") String shortKey) { final Metadata metadataGet = credentialsService.getMetadata(account, region, application, environment, component, shortKey); - if (metadataGet.getSourceType() != null && metadataGet.getSource() != null) - return new ResponseEntity<>(metadataGet, HttpStatus.OK); - - return new ResponseEntity<>("Metadata not found", HttpStatus.NOT_FOUND); + return new ResponseEntity<>(metadataGet, HttpStatus.OK); } @ResponseBody diff --git a/fidelius-service/src/test/java/org/finra/fidelius/controllers/FideliusControllerTest.java b/fidelius-service/src/test/java/org/finra/fidelius/controllers/FideliusControllerTest.java index 07d9338..d6a7954 100644 --- a/fidelius-service/src/test/java/org/finra/fidelius/controllers/FideliusControllerTest.java +++ b/fidelius-service/src/test/java/org/finra/fidelius/controllers/FideliusControllerTest.java @@ -349,11 +349,11 @@ public void getSecretShouldReturn400ErrorWhenCredentialNotFound() throws Excepti @Test @WithMockUser - public void getMetadataShouldReturn400ErrorWhenMetadataNotFound() throws Exception { + public void getMetadataWhenMetadataNotFound() throws Exception { when(credentialsService.getMetadata(anyString(), anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(new Metadata()); mockMvc.perform(getMetadataRequest) - .andExpect(status().is4xxClientError()); + .andExpect(status().isOk()); } @Test From c6bf9a42ae3c48bee868baf9f39895937d2acad2 Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Mon, 20 Dec 2021 13:52:28 -0600 Subject: [PATCH 3/8] updated Fidelius-service 1.1 --- fidelius-service/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fidelius-service/pom.xml b/fidelius-service/pom.xml index 4c9dc3c..b0a56d7 100644 --- a/fidelius-service/pom.xml +++ b/fidelius-service/pom.xml @@ -20,7 +20,7 @@ fidelius-service jar - 1.0 + 1.1 org.springframework.boot From 44673bbdc58a8f8c81064abb4e9a230ed20f7530 Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Mon, 28 Feb 2022 14:56:27 -0600 Subject: [PATCH 4/8] revert to old gpg key and phrase --- .circleci/config.yml | 2 +- .circleci/settings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b312b85..6162571 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -252,7 +252,7 @@ jobs: command: | GPG_TTY=$(tty) export GPG_TTY - echo -e "$NEXUS_RM_KEY_NEW" | gpg --batch --import + echo -e "$NEXUS_RM_KEY" | gpg --batch --import - run: name: Deploy Fidelius SDK command: | diff --git a/.circleci/settings.xml b/.circleci/settings.xml index d31f8d6..7ab3f0c 100644 --- a/.circleci/settings.xml +++ b/.circleci/settings.xml @@ -18,7 +18,7 @@ gpg gpg - ${NEXUS_RM_GPG_NEW} + ${NEXUS_RM_GPG} From 69db27b1d979250f05bfa6e3b726375f0819aca5 Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Tue, 8 Mar 2022 15:35:23 -0600 Subject: [PATCH 5/8] added _NEW for gpg key and phrase --- .circleci/config.yml | 2 +- .circleci/settings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6162571..b312b85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -252,7 +252,7 @@ jobs: command: | GPG_TTY=$(tty) export GPG_TTY - echo -e "$NEXUS_RM_KEY" | gpg --batch --import + echo -e "$NEXUS_RM_KEY_NEW" | gpg --batch --import - run: name: Deploy Fidelius SDK command: | diff --git a/.circleci/settings.xml b/.circleci/settings.xml index 7ab3f0c..d31f8d6 100644 --- a/.circleci/settings.xml +++ b/.circleci/settings.xml @@ -18,7 +18,7 @@ gpg gpg - ${NEXUS_RM_GPG} + ${NEXUS_RM_GPG_NEW} From 695675730bcbb74424f088063f830f08d3a60c7f Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Tue, 8 Mar 2022 15:40:36 -0600 Subject: [PATCH 6/8] added _RENEW for gpg key and phrase --- .circleci/config.yml | 2 +- .circleci/settings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b312b85..9a0c0e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -252,7 +252,7 @@ jobs: command: | GPG_TTY=$(tty) export GPG_TTY - echo -e "$NEXUS_RM_KEY_NEW" | gpg --batch --import + echo -e "$NEXUS_RM_KEY_RENEW" | gpg --batch --import - run: name: Deploy Fidelius SDK command: | diff --git a/.circleci/settings.xml b/.circleci/settings.xml index d31f8d6..4ba6d0c 100644 --- a/.circleci/settings.xml +++ b/.circleci/settings.xml @@ -18,7 +18,7 @@ gpg gpg - ${NEXUS_RM_GPG_NEW} + ${NEXUS_RM_GPG_RENEW} From 21ecd38ed753ba7a6700008904c0491d98f1e9ae Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Mon, 27 Jun 2022 12:25:35 -0700 Subject: [PATCH 7/8] updated fidelius-sdk version to 2.0.0 --- fidelius-sdk/pom.xml | 2 +- fidelius-service/pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fidelius-sdk/pom.xml b/fidelius-sdk/pom.xml index 5b82233..594a636 100644 --- a/fidelius-sdk/pom.xml +++ b/fidelius-sdk/pom.xml @@ -23,7 +23,7 @@ org.finra.fidelius fidelius-sdk - 2.0.0-SNAPSHOT + 2.0.0 jar fidelius-sdk SDK for Fidelius Secrets Manager diff --git a/fidelius-service/pom.xml b/fidelius-service/pom.xml index 97816ab..6a2e039 100644 --- a/fidelius-service/pom.xml +++ b/fidelius-service/pom.xml @@ -101,7 +101,7 @@ org.finra.fidelius fidelius-sdk - 2.0.0-SNAPSHOT + 2.0.0 @@ -204,7 +204,7 @@ org.finra.fidelius fidelius-sdk - 2.0.0-SNAPSHOT + 2.0.0 compile From c61108101fc24a9107d7670ee280f7df79443a80 Mon Sep 17 00:00:00 2001 From: Brijesh Patel Date: Fri, 2 Sep 2022 10:17:30 -0500 Subject: [PATCH 8/8] Updated maven compiler plugin --- fidelius-sdk/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fidelius-sdk/pom.xml b/fidelius-sdk/pom.xml index 594a636..14a207e 100644 --- a/fidelius-sdk/pom.xml +++ b/fidelius-sdk/pom.xml @@ -182,7 +182,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + 3.10.1