From 7022776d3cf76638f5f3005dcd4ce7b39f869495 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:14:11 +0200 Subject: [PATCH 01/27] Try with user & password --- .github/workflows/release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9626561..683c978 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,5 +19,4 @@ jobs: env: JF_ARTIFACTORY_1: ${{ secrets.ARTIFACTORY_ACCESS_KEY }} - run: | - # Ping the server - jfrog rt ping \ No newline at end of file + jfrog rt ping --url=https://akeyless.jfrog.io/artifactory/akeyless-java --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 75eacabce06d3e5c9fd4dae7a34e202440ce781c Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:15:40 +0200 Subject: [PATCH 02/27] Without env var --- .github/workflows/release.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 683c978..8ec7eaa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,5 @@ jobs: - name: Build with Maven run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - env: - JF_ARTIFACTORY_1: ${{ secrets.ARTIFACTORY_ACCESS_KEY }} - run: | jfrog rt ping --url=https://akeyless.jfrog.io/artifactory/akeyless-java --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From e593b686ae6c469a4717ee1328d826fe27e9ca22 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:20:06 +0200 Subject: [PATCH 03/27] TRy again --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8ec7eaa..68d80d5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,4 +17,4 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - jfrog rt ping --url=https://akeyless.jfrog.io/artifactory/akeyless-java --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt ping --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 8ec669558a755e22449cfd627221cd53e47def87 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:27:09 +0200 Subject: [PATCH 04/27] TRy upload --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 68d80d5..8651b30 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,4 +17,4 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - jfrog rt ping --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u target/cloudid-*.jar akeyless-java/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From f92d2d4242ffc11a9c0616bab75618bc973c6a53 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:36:49 +0200 Subject: [PATCH 05/27] TRy with subrepository --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8651b30..f17a064 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,4 +17,4 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - jfrog rt u target/cloudid-*.jar akeyless-java/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u target/cloudid-*.jar akeyless-java/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 1ad360494608325646c73ed7aae72ac420fd4dc7 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:39:49 +0200 Subject: [PATCH 06/27] Differant repo --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f17a064..f2183cb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,4 +17,4 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - jfrog rt u target/cloudid-*.jar akeyless-java/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u target/cloudid-*.jar akeyless-java-cloudid/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From a89d7405c77ee1a1d8f00b2d54423c2e2581e832 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 12:54:21 +0200 Subject: [PATCH 07/27] Try update with version --- .github/workflows/release.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f2183cb..8d6cc28 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,6 +7,10 @@ jobs: runs-on: ubuntu-latest steps: + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) + - uses: actions/checkout@v2 - name: Set up JDK 8 uses: actions/setup-java@v2 @@ -17,4 +21,5 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - jfrog rt u target/cloudid-*.jar akeyless-java-cloudid/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + cd target + jfrog rt u cloudid-*.jar akeyless-java-cloudid/io/akeyless/cloudid/${{ steps.get_version.outputs.VERSION }} --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From e295059631b31224cbc18c797661d9be690136ff Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 13:02:52 +0200 Subject: [PATCH 08/27] Another shot at version --- .github/workflows/release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8d6cc28..d4f8415 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,7 @@ jobs: steps: - name: Get the version id: get_version - run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - uses: actions/checkout@v2 - name: Set up JDK 8 @@ -21,5 +21,7 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - cd target - jfrog rt u cloudid-*.jar akeyless-java-cloudid/io/akeyless/cloudid/${{ steps.get_version.outputs.VERSION }} --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + mkdir staging + mkdir staging/${{github.ref_name}} + cp target/*.jar staging/${{github.ref_name}}/. + jfrog rt u "staging/*.jar" akeyless-java-cloudid/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From fccb317ca318b7dad2ef33f1bef66f886c54255b Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 13:12:38 +0200 Subject: [PATCH 09/27] Try tag --- .github/workflows/release.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d4f8415..852e139 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,8 @@ name: Java CI - -on: [workflow_dispatch] - +on: + push: + tags: + - 'v*' jobs: build: runs-on: ubuntu-latest @@ -24,4 +25,4 @@ jobs: mkdir staging mkdir staging/${{github.ref_name}} cp target/*.jar staging/${{github.ref_name}}/. - jfrog rt u "staging/*.jar" akeyless-java-cloudid/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "staging/*.jar" akeyless-java/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 1c24b033d70a596a8c5108cf9773497a010a7eed Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 13:18:12 +0200 Subject: [PATCH 10/27] Another release try --- .github/workflows/release.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 852e139..df78cdc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,6 @@ jobs: run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | - mkdir staging - mkdir staging/${{github.ref_name}} - cp target/*.jar staging/${{github.ref_name}}/. - jfrog rt u "staging/*.jar" akeyless-java/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + mkdir ${{github.ref_name}} + cp target/*.jar ${{github.ref_name}}/. + jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From f40e3cb97c391023208a82f70d9c06255c514562 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 13:34:15 +0200 Subject: [PATCH 11/27] Handle subfolder --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index df78cdc..2e49d3f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,4 +24,4 @@ jobs: - run: | mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. - jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 99cf76600a5803a6cda7d97af4417824b738e366 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 13:44:56 +0200 Subject: [PATCH 12/27] v0.1.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 77c4cea..b99966f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.akeyless cloudid - 0.1.0 + v0.1.4 jar akeyless-cloud-id https://github.com/akeylesslabs/akeyless-java-cloud-id From 647f2e4073b1490b93ddda22756cf547d1831240 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 13:58:20 +0200 Subject: [PATCH 13/27] Refactor to add namespace --- pom.xml | 2 +- src/main/java/io/akeyless/Main.java | 18 ------------------ .../{ => cloudid}/AwsCloudIdProvider.java | 2 +- .../{ => cloudid}/AzureCloudIdProvider.java | 2 +- .../{ => cloudid}/CloudIdProvider.java | 2 +- .../{ => cloudid}/CloudProviderFactory.java | 2 +- .../{ => cloudid}/GcpCloudIdProvider.java | 3 +-- src/main/resources/META-INF/MANIFEST.MF | 3 --- 8 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 src/main/java/io/akeyless/Main.java rename src/main/java/io/akeyless/{ => cloudid}/AwsCloudIdProvider.java (98%) rename src/main/java/io/akeyless/{ => cloudid}/AzureCloudIdProvider.java (98%) rename src/main/java/io/akeyless/{ => cloudid}/CloudIdProvider.java (73%) rename src/main/java/io/akeyless/{ => cloudid}/CloudProviderFactory.java (94%) rename src/main/java/io/akeyless/{ => cloudid}/GcpCloudIdProvider.java (95%) delete mode 100644 src/main/resources/META-INF/MANIFEST.MF diff --git a/pom.xml b/pom.xml index b99966f..ffe03b1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.akeyless cloudid - v0.1.4 + v0.1.5 jar akeyless-cloud-id https://github.com/akeylesslabs/akeyless-java-cloud-id diff --git a/src/main/java/io/akeyless/Main.java b/src/main/java/io/akeyless/Main.java deleted file mode 100644 index 490a05c..0000000 --- a/src/main/java/io/akeyless/Main.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.akeyless; - -public class Main { - - public static void main(String[] args) { - if (args.length < 1) { - System.out.println("Please enter provider type"); - System.exit(1); - } - CloudIdProvider provider = CloudProviderFactory.getCloudIdProvider(args[0]); - try { - String cloudId = provider.getCloudId(); - System.out.println(cloudId); - } catch (Exception e) { - System.err.println(e.getMessage()); - } - } -} diff --git a/src/main/java/io/akeyless/AwsCloudIdProvider.java b/src/main/java/io/akeyless/cloudid/AwsCloudIdProvider.java similarity index 98% rename from src/main/java/io/akeyless/AwsCloudIdProvider.java rename to src/main/java/io/akeyless/cloudid/AwsCloudIdProvider.java index 144d7bb..32edcb7 100644 --- a/src/main/java/io/akeyless/AwsCloudIdProvider.java +++ b/src/main/java/io/akeyless/cloudid/AwsCloudIdProvider.java @@ -1,4 +1,4 @@ -package io.akeyless; +package io.akeyless.cloudid; import com.amazonaws.DefaultRequest; import com.amazonaws.auth.AWS4Signer; diff --git a/src/main/java/io/akeyless/AzureCloudIdProvider.java b/src/main/java/io/akeyless/cloudid/AzureCloudIdProvider.java similarity index 98% rename from src/main/java/io/akeyless/AzureCloudIdProvider.java rename to src/main/java/io/akeyless/cloudid/AzureCloudIdProvider.java index a7b5e50..06c9c51 100644 --- a/src/main/java/io/akeyless/AzureCloudIdProvider.java +++ b/src/main/java/io/akeyless/cloudid/AzureCloudIdProvider.java @@ -1,4 +1,4 @@ -package io.akeyless; +package io.akeyless.cloudid; import java.io.InputStream; import java.net.HttpURLConnection; diff --git a/src/main/java/io/akeyless/CloudIdProvider.java b/src/main/java/io/akeyless/cloudid/CloudIdProvider.java similarity index 73% rename from src/main/java/io/akeyless/CloudIdProvider.java rename to src/main/java/io/akeyless/cloudid/CloudIdProvider.java index f2c78c4..a53353c 100644 --- a/src/main/java/io/akeyless/CloudIdProvider.java +++ b/src/main/java/io/akeyless/cloudid/CloudIdProvider.java @@ -1,4 +1,4 @@ -package io.akeyless; +package io.akeyless.cloudid; public interface CloudIdProvider { String getCloudId() throws Exception; diff --git a/src/main/java/io/akeyless/CloudProviderFactory.java b/src/main/java/io/akeyless/cloudid/CloudProviderFactory.java similarity index 94% rename from src/main/java/io/akeyless/CloudProviderFactory.java rename to src/main/java/io/akeyless/cloudid/CloudProviderFactory.java index fa08a13..77d8c25 100644 --- a/src/main/java/io/akeyless/CloudProviderFactory.java +++ b/src/main/java/io/akeyless/cloudid/CloudProviderFactory.java @@ -1,4 +1,4 @@ -package io.akeyless; +package io.akeyless.cloudid; import java.util.Objects; diff --git a/src/main/java/io/akeyless/GcpCloudIdProvider.java b/src/main/java/io/akeyless/cloudid/GcpCloudIdProvider.java similarity index 95% rename from src/main/java/io/akeyless/GcpCloudIdProvider.java rename to src/main/java/io/akeyless/cloudid/GcpCloudIdProvider.java index 56f40eb..8547a95 100644 --- a/src/main/java/io/akeyless/GcpCloudIdProvider.java +++ b/src/main/java/io/akeyless/cloudid/GcpCloudIdProvider.java @@ -1,4 +1,4 @@ -package io.akeyless; +package io.akeyless.cloudid; import com.google.auth.oauth2.IdToken; import com.google.auth.oauth2.IdTokenCredentials; @@ -6,7 +6,6 @@ import com.google.auth.oauth2.GoogleCredentials; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index 2bf19d6..0000000 --- a/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: io.akeyless.Main - From 53a36fe6a9f0e3ffda95a5b4725409cac76794ce Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 14:41:51 +0200 Subject: [PATCH 14/27] Add build to include jars --- pom.xml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffe03b1..066c7f2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.akeyless cloudid - v0.1.5 + v0.1.6 jar akeyless-cloud-id https://github.com/akeylesslabs/akeyless-java-cloud-id @@ -65,4 +65,26 @@ https://akeyless.jfrog.io/artifactory/akeyless-java + + + + + + maven-assembly-plugin + + + package + + single + + + + + + jar-with-dependencies + + + + + \ No newline at end of file From 286c9e9f25f3ac33f08edb01e28a397deaab422b Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 14:46:16 +0200 Subject: [PATCH 15/27] version bump --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 066c7f2..151daec 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.akeyless cloudid - v0.1.6 + v0.1.7 jar akeyless-cloud-id https://github.com/akeylesslabs/akeyless-java-cloud-id From 5d415adb7c3da32873528a48fb3be9fe6f93e18b Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 15:02:38 +0200 Subject: [PATCH 16/27] Try auto versioning --- .github/workflows/release.yaml | 8 +++----- pom.xml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2e49d3f..642fdfc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,10 +8,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - uses: actions/checkout@v2 - name: Set up JDK 8 uses: actions/setup-java@v2 @@ -19,9 +15,11 @@ jobs: java-version: '8' distribution: 'adopt' - name: Build with Maven + env: + VER: ${{github.ref_name}} run: mvn --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. - jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "${{github.ref_name}}/*-jar-with-dependencies.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/akeyless-cloudid-${{github.ref_name}}.jar --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 151daec..bd17968 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.akeyless cloudid - v0.1.7 + ${env.VER} jar akeyless-cloud-id https://github.com/akeylesslabs/akeyless-java-cloud-id From b47c3b6b3ca38b94bdfc9918a81bc387884f6e72 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 15:24:56 +0200 Subject: [PATCH 17/27] Try one assembly --- .github/workflows/release.yaml | 6 ++---- pom.xml | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 642fdfc..3e43244 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,11 +15,9 @@ jobs: java-version: '8' distribution: 'adopt' - name: Build with Maven - env: - VER: ${{github.ref_name}} - run: mvn --batch-mode --update-snapshots verify + run: mvn -Drevision=${{github.ref_name}} --batch-mode --update-snapshots verify - uses: jfrog/setup-jfrog-cli@v1 - run: | mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. - jfrog rt u "${{github.ref_name}}/*-jar-with-dependencies.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/akeyless-cloudid-${{github.ref_name}}.jar --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/akeyless-cloudid-${{github.ref_name}}.jar --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index bd17968..0cf5a76 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.akeyless cloudid - ${env.VER} + ${revision} jar akeyless-cloud-id https://github.com/akeylesslabs/akeyless-java-cloud-id @@ -83,6 +83,7 @@ jar-with-dependencies + false From d70dd86bc7004d03024b76c7696f0309aa9616de Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 15:32:56 +0200 Subject: [PATCH 18/27] Try without ver in filename --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3e43244..a212631 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,4 +20,4 @@ jobs: - run: | mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. - jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/akeyless-cloudid-${{github.ref_name}}.jar --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/akeyless-cloudid.jar --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 80568a0fe19ab276863493729a54a19101b2fab8 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 15:35:27 +0200 Subject: [PATCH 19/27] Another try --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a212631..ebc2d99 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,4 +20,4 @@ jobs: - run: | mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. - jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/akeyless-cloudid.jar --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From b997bb497d407c81d927bf244bc7d24faaff17fd Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 16:06:50 +0200 Subject: [PATCH 20/27] Added readme file --- README.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/README.md b/README.md index e69de29..8926246 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,94 @@ +# akeyless-java + +Akeyless CloudId Provider + +The purpose of this package is to exteact the required "cloudid" to authenticate to akeyless using cloud authorization providers. + +For more information, please visit [http://akeyless.io](http://akeyless.io) + + +## Requirements + +Using the cloudid provider requires: +1. Java 1.8+ +2. Maven/Gradle + +## Installation + +### Maven users + +Add this dependency to your project's POM: + +```xml + + io.akeyless + cloudid + Specify the SDK version here + +``` + +Add the following repository definition to your Maven settings file (default +`~/.m2/settings.xml`) or your POM file: + +```xml + + central + https://akeyless.jfrog.io/artifactory/akeyless-java + false + +``` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java +import io.akeyless.client.ApiException; +import io.akeyless.cloudid.CloudProviderFactory; +import io.akeyless.cloudid.CloudIdProvider; + +import io.akeyless.client.ApiClient; +import io.akeyless.client.Configuration; +import io.akeyless.client.model.*; +import io.akeyless.client.api.V2Api; + +public class Main { + public static void main(String[] argv) { + // Use azure_ad/aws_iam/gcp, according to your cloud provider + String accessType = "azure_ad"; + CloudIdProvider idProvider = CloudProviderFactory.getCloudIdProvider(accessType); + try { + String cloudId = idProvider.getCloudId(); + + ApiClient client = Configuration.getDefaultApiClient(); + client.setBasePath("https://api.akeyless.io"); + + V2Api api = new V2Api(client); + Auth auth = new Auth(); + auth.accessId(""); + auth.accessType(accessType); + auth.cloudId(cloudId); + + AuthOutput result = api.auth(auth); + + + ListItems listBody = new ListItems(); + listBody.setToken(result.getToken()); + ListItemsInPathOutput listOut = api.listItems(listBody); + System.out.println(listOut.getItems().size()); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } catch (Exception e) { + System.err.println("Reason: " + e.getMessage()); + e.printStackTrace(); + } + } +} + ``` + +## Author +support@akeyless.io + From 3231053d6ba271d194780308da6da888bb269109 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 16:32:56 +0200 Subject: [PATCH 21/27] Add publish instructions --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8926246..cbb40cf 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ The purpose of this package is to exteact the required "cloudid" to authenticate For more information, please visit [http://akeyless.io](http://akeyless.io) +## Publishing a new version +Tag the commit with a new tag and push to the repository. +The workflow will build and publish a new version to the artifactory repository. ## Requirements From 42a14f02bb14fc67b2fe919cc51b365641d4e6f1 Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sun, 6 Mar 2022 16:44:47 +0200 Subject: [PATCH 22/27] Update readme with akeyless sdk dependancy --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cbb40cf..d50cb13 100644 --- a/README.md +++ b/README.md @@ -20,16 +20,6 @@ Using the cloudid provider requires: ### Maven users -Add this dependency to your project's POM: - -```xml - - io.akeyless - cloudid - Specify the SDK version here - -``` - Add the following repository definition to your Maven settings file (default `~/.m2/settings.xml`) or your POM file: @@ -40,6 +30,24 @@ Add the following repository definition to your Maven settings file (default false ``` + +Add this dependency to your project's POM: + +```xml + + io.akeyless + cloudid + Specify the CloudId package version here + +``` +To use akeyless java sdk, you should also add: +```xml + + io.akeyless + akeyless-java + Specify the SDK version here + +``` ## Getting Started From 8d65a8e58f9eed805c415d079171e0271aa04c7d Mon Sep 17 00:00:00 2001 From: renanaAkeyless <58509594+renanaAkeyless@users.noreply.github.com> Date: Sun, 6 Mar 2022 18:09:31 +0200 Subject: [PATCH 23/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d50cb13..a308783 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# akeyless-java +# akeyless-java-cloud-id Akeyless CloudId Provider From ba386d5f1b05220aa674c5c0d6b2c896ca77b43f Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Tue, 16 Aug 2022 17:25:18 +0300 Subject: [PATCH 24/27] push pom alongside jar --- .github/workflows/release.yaml | 4 +++- cloudid.iml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ebc2d99..0c83047 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,4 +20,6 @@ jobs: - run: | mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. - jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file + jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} + cp target/*.pom ${{github.ref_name}}/. + jfrog rt u "${{github.ref_name}}/*.pom" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file diff --git a/cloudid.iml b/cloudid.iml index 4eb1aa3..64393b4 100644 --- a/cloudid.iml +++ b/cloudid.iml @@ -1,5 +1,6 @@ + From a6d136a307de8f035afb18abf53a28820e172cce Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Wed, 17 Aug 2022 10:25:51 +0300 Subject: [PATCH 25/27] hack to create pom file --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c83047..334cfed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,5 +21,5 @@ jobs: mkdir ${{github.ref_name}} cp target/*.jar ${{github.ref_name}}/. jfrog rt u "${{github.ref_name}}/*.jar" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} - cp target/*.pom ${{github.ref_name}}/. + sed "s/\${revision}/${{github.ref_name}}/g" pom.xml >> target/cloudid-${{github.ref_name}}.pom jfrog rt u "${{github.ref_name}}/*.pom" akeyless-java/io/akeyless/cloudid/${{github.ref_name}}/ --url=https://akeyless.jfrog.io/artifactory --user=ci-user --password=${{ secrets.ARTIFACTORY_ACCESS_KEY }} \ No newline at end of file From 8ad5f1c2c75d6e12a6226dee8784029da5fc25b6 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 21 Jun 2024 15:22:08 +0300 Subject: [PATCH 26/27] Upgrade jackson-databind package to version 2.14.0 --- pom.xml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0cf5a76..f40afc1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.akeyless cloudid ${revision} @@ -31,6 +30,7 @@ + 2.14.0 8 8 @@ -43,11 +43,18 @@ 1.5.3 - + com.fasterxml.jackson.core - jackson-core - 2.13.1 + jackson-databind + ${fasterxml_version} + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-cbor + ${fasterxml_version} @@ -55,6 +62,20 @@ com.amazonaws aws-java-sdk-core 1.12.169 + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.dataformat + jackson-dataformat-cbor + + From 87f9e740b2fd96e496cdba7d024c586e9ca0f809 Mon Sep 17 00:00:00 2001 From: or-akl <147986571+or-akl@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:32:28 +0300 Subject: [PATCH 27/27] Adding security_pr_scanner.yml for security checks. --- .github/workflows/security_pr_scanner.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/security_pr_scanner.yml diff --git a/.github/workflows/security_pr_scanner.yml b/.github/workflows/security_pr_scanner.yml new file mode 100644 index 0000000..e114480 --- /dev/null +++ b/.github/workflows/security_pr_scanner.yml @@ -0,0 +1,17 @@ +name: Security PR Scan + +on: [pull_request] + +jobs: + Scanning_with: + uses: akeylesslabs/akeyless-security/.github/workflows/reusable-scanner.yaml@main + strategy: + fail-fast: false + matrix: + scan_type: ["SAST", "SCA"] + with: + branch_name: ${{ github.head_ref }} + repository_name: ${{ github.repository }} + event_name: ${{ github.event_name }} + scan_type: ${{ matrix.scan_type }} + secrets: inherit \ No newline at end of file