From a7ba254246578774e6d13380149fdcd1857c59f3 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Tue, 10 Jun 2025 13:43:27 -0700 Subject: [PATCH 01/23] update to use maven central --- codebuild/cd/promote-release.yml | 8 +++----- pom.xml | 19 ++++++------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/codebuild/cd/promote-release.yml b/codebuild/cd/promote-release.yml index 85c0c4f005..890e1c6092 100644 --- a/codebuild/cd/promote-release.yml +++ b/codebuild/cd/promote-release.yml @@ -29,7 +29,7 @@ phases: - cp -r maven-gpg aws-iot-device-sdk-java-samples/maven-gpg # install settings.xml to ~/.m2/settings.xml - mkdir -p $HOME/.m2 - - aws s3 cp s3://code-sharing-aws-crt/iot-sdk-java-v1.settings.xml $HOME/.m2/settings.xml + - aws s3 cp s3://code-sharing-aws-crt/iot-sdk-java-v1.settings.central.xml $HOME/.m2/settings.xml - aws --query "SecretString" secretsmanager get-secret-value --secret-id Sonatype/JIRA/token/V1 > sonatype_secret - jq fromjson sonatype_secret > sonatype_json - export ST_PASSWORD=$(jq -r '.password' sonatype_json) @@ -49,10 +49,8 @@ phases: build: commands: - cd $CODEBUILD_SRC_DIR/aws-iot-device-sdk-java - # Trigger the release of the last staged package in the staging repository - - mvn -s $HOME/.m2/settings.xml clean package -Dmaven.test.skip=true - - mvn -s $HOME/.m2/settings.xml clean deploy -P publishing -e -X - - mvn -s $HOME/.m2/settings.xml nexus-staging:release -e -X + - mvn -B versions:set -DnewVersion=${PKG_VERSION} + - mvn deploy -Dmaven.test.skip=true cache: paths: diff --git a/pom.xml b/pom.xml index 81edd50a29..634af6145b 100644 --- a/pom.xml +++ b/pom.xml @@ -34,23 +34,16 @@ UTF-8 - - - ossrh - https://aws.oss.sonatype.org/content/repositories/snapshots - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 + org.sonatype.central + central-publishing-maven-plugin + 0.7.0 true - ossrh - https://aws.oss.sonatype.org/ - false + central + true @@ -66,7 +59,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.7 sign-artifacts From c5b749ee104456155403b256f73801c65e8fa970 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Tue, 10 Jun 2025 13:48:08 -0700 Subject: [PATCH 02/23] use ubuntu-latest for ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 793f60db8e..e181c8abc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ env: jobs: java-compat: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: From 6722ec371d23542537fabde78a8011d53a841e1b Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Tue, 10 Jun 2025 13:50:43 -0700 Subject: [PATCH 03/23] use setup-java@v3.14.1 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e181c8abc7..89e37814ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v2 - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3.14.1 with: distribution: temurin java-version: ${{ matrix.version }} From bdb304effedeef946b364ea47c8e545e61577d38 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Tue, 10 Jun 2025 14:00:44 -0700 Subject: [PATCH 04/23] use role to assume instead --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89e37814ce..7f7ceef3cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,8 @@ env: BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-iot-device-sdk-java RUN: ${{ github.run_id }}-${{ github.run_number }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-1 + SDK_V1_CI_ROLE: ${{ secrets.CI_SDK_V1_ROLE_ARN }} jobs: java-compat: @@ -35,6 +34,10 @@ jobs: distribution: temurin java-version: ${{ matrix.version }} cache: maven + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.SDK_V1_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: Build ${{ env.PACKAGE_NAME }} + consumers run: | java -version From b517d213f24e285b8b809c4a4ab836e0272114cb Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Tue, 10 Jun 2025 14:03:40 -0700 Subject: [PATCH 05/23] add id-token permission --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f7ceef3cb..a91b34aed7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,9 @@ env: AWS_DEFAULT_REGION: us-east-1 SDK_V1_CI_ROLE: ${{ secrets.CI_SDK_V1_ROLE_ARN }} +permissions: + id-token: write # This is required for requesting the JWT + jobs: java-compat: runs-on: ubuntu-latest From 06a34548c702dab8436d632169cc37717fa6288f Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Tue, 10 Jun 2025 16:08:25 -0700 Subject: [PATCH 06/23] use crt resource for testing --- .../services/iot/client/system_props_mutualAuth.properties | 6 +++--- .../services/iot/client/system_props_websocket.properties | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties index d3a78996dc..7b53481b1e 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties @@ -1,7 +1,7 @@ -clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com +clientEndpoint=a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8 -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/key-urPdXf +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/cert-3PRZza isWebSocket=false authMode=CertificateMutualAuthentication diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties index 9ec4527cf6..7e39cdac4b 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties @@ -1,7 +1,7 @@ -clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com +clientEndpoint=a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketSecretAccessKey-MKTSaV -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketAccessKeyId-1YdB9z +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/key-urPdXf +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/cert-3PRZza isWebSocket=true authMode=MqttOverWebSocketSigV4Signing From f0424736c8b3bdd47a7fd32478b98342f6a8a19a Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Thu, 12 Jun 2025 11:21:37 -0700 Subject: [PATCH 07/23] hardcode endpoint value to test CI --- .../iot/client/AWSIotMqttClientIntegrationUtil.java | 9 +++++---- codebuild/cd/promote-release.yml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 8a75f23b22..53a6917c8b 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -5,6 +5,7 @@ import java.io.FileInputStream; import java.security.KeyStore; +import java.util.UUID; import java.util.logging.ConsoleHandler; import java.util.logging.Handler; import java.util.logging.Level; @@ -14,14 +15,14 @@ public class AWSIotMqttClientIntegrationUtil { - private static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); - private static final String CLIENT_ID = System.getProperty("clientId"); + private static final String CLIENT_ENDPOINT = "ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com"; + private static final String CLIENT_ID = UUID.randomUUID().toString(); private static final String AUTH_MODE = System.getProperty("authMode"); private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket")); - private static final String PUBLIC_MATERIAL = System.getProperty("publicMaterial"); - private static final String PRIVATE_MATERIAL = System.getProperty("privateMaterial"); + private static final String PUBLIC_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE"; + private static final String PRIVATE_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8"; private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); private static final String KEYSTORE_PASSWORD = System.getProperty("keystorePassword"); private static final String KEY_PASSWORD = System.getProperty("keyPassword"); diff --git a/codebuild/cd/promote-release.yml b/codebuild/cd/promote-release.yml index 890e1c6092..b5d396465f 100644 --- a/codebuild/cd/promote-release.yml +++ b/codebuild/cd/promote-release.yml @@ -50,7 +50,7 @@ phases: commands: - cd $CODEBUILD_SRC_DIR/aws-iot-device-sdk-java - mvn -B versions:set -DnewVersion=${PKG_VERSION} - - mvn deploy -Dmaven.test.skip=true + - mvn clean deploy -P publishing -Dmaven.test.skip=true cache: paths: From 4edc2418412eda7e481c30d2ee96aa7c7a7052ea Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Thu, 12 Jun 2025 11:41:22 -0700 Subject: [PATCH 08/23] test with aws credentials set in env --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a91b34aed7..1819ca7ce8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,11 +37,19 @@ jobs: distribution: temurin java-version: ${{ matrix.version }} cache: maven - - uses: aws-actions/configure-aws-credentials@v4 + - name: Configure AWS Credentials + id: creds + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ env.SDK_V1_CI_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} + output-credentials: true - name: Build ${{ env.PACKAGE_NAME }} + consumers run: | java -version mvn -B test + env: + AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }} + AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }} + AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }} + AWS_REGION: ${{ env.AWS_DEFAULT_REGION }} From a3b9b47f515b8b5d88cb6506c73bb1dba8215573 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Thu, 12 Jun 2025 13:12:17 -0700 Subject: [PATCH 09/23] revert endpoint path and secrets --- .../services/iot/client/system_props_mutualAuth.properties | 6 +++--- .../services/iot/client/system_props_websocket.properties | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties index 7b53481b1e..611c519390 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties @@ -1,7 +1,7 @@ -clientEndpoint=a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com +clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/key-urPdXf -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/cert-3PRZza +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketSecretAccessKey-MKTSaV +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketAccessKeyId-1YdB9z isWebSocket=false authMode=CertificateMutualAuthentication diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties index 7e39cdac4b..9ef35ccc13 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties @@ -1,7 +1,7 @@ -clientEndpoint=a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com +clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/key-urPdXf -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:ci/mqtt5/us/Mqtt5Prod/cert-3PRZza +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8 +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE isWebSocket=true authMode=MqttOverWebSocketSigV4Signing From 613b69c6ca63e5c00dcb3f39358d1a988d05156d Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Thu, 12 Jun 2025 14:21:30 -0700 Subject: [PATCH 10/23] test with CRT CI role --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1819ca7ce8..3ee2c291e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ env: RUN: ${{ github.run_id }}-${{ github.run_number }} AWS_DEFAULT_REGION: us-east-1 SDK_V1_CI_ROLE: ${{ secrets.CI_SDK_V1_ROLE_ARN }} + CRT_CI_Role: arn:aws:iam::123124136734:role/CRT_CI_Role permissions: id-token: write # This is required for requesting the JWT @@ -41,7 +42,7 @@ jobs: id: creds uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{ env.SDK_V1_CI_ROLE }} + role-to-assume: ${{ env.CRT_CI_Role }} aws-region: ${{ env.AWS_DEFAULT_REGION }} output-credentials: true - name: Build ${{ env.PACKAGE_NAME }} + consumers From c9fc18bcfa9ae654ac85c96cd9ceac12b54d9296 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Thu, 12 Jun 2025 14:52:30 -0700 Subject: [PATCH 11/23] use CRT credential, hardcoded --- .github/workflows/ci.yml | 4 ++-- .../iot/client/AWSIotMqttClientIntegrationUtil.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ee2c291e4..d28337c772 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ env: RUN: ${{ github.run_id }}-${{ github.run_number }} AWS_DEFAULT_REGION: us-east-1 SDK_V1_CI_ROLE: ${{ secrets.CI_SDK_V1_ROLE_ARN }} - CRT_CI_Role: arn:aws:iam::123124136734:role/CRT_CI_Role + CRT_CI_ROLE: arn:aws:iam::123124136734:role/CRT_CI_Role permissions: id-token: write # This is required for requesting the JWT @@ -42,7 +42,7 @@ jobs: id: creds uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{ env.CRT_CI_Role }} + role-to-assume: ${{ env.CRT_CI_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} output-credentials: true - name: Build ${{ env.PACKAGE_NAME }} + consumers diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 53a6917c8b..99ca644e25 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -15,14 +15,14 @@ public class AWSIotMqttClientIntegrationUtil { - private static final String CLIENT_ENDPOINT = "ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com"; + private static final String CLIENT_ENDPOINT = "a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com"; private static final String CLIENT_ID = UUID.randomUUID().toString(); private static final String AUTH_MODE = System.getProperty("authMode"); private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket")); - private static final String PUBLIC_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE"; - private static final String PRIVATE_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8"; + private static final String PUBLIC_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/certificate-iZBV7L"; + private static final String PRIVATE_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/privatekey-p8-d3pMKx"; private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); private static final String KEYSTORE_PASSWORD = System.getProperty("keystorePassword"); private static final String KEY_PASSWORD = System.getProperty("keyPassword"); From 44ec7e6adb8fc17b48f9fd7f3b1b31bc86eb2cf2 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 09:45:47 -0700 Subject: [PATCH 12/23] hard coded to not use websocket --- .../services/iot/client/AWSIotMqttClientIntegrationUtil.java | 4 ++-- .../services/iot/client/system_props_mutualAuth.properties | 4 ++-- .../services/iot/client/system_props_websocket.properties | 4 ++-- pom.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 99ca644e25..3231bcd699 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -18,9 +18,9 @@ public class AWSIotMqttClientIntegrationUtil { private static final String CLIENT_ENDPOINT = "a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com"; private static final String CLIENT_ID = UUID.randomUUID().toString(); - private static final String AUTH_MODE = System.getProperty("authMode"); + private static final String AUTH_MODE = "CertificateMutualAuthentication"; - private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket")); + private static final Boolean IS_WEBSOCKET = false; private static final String PUBLIC_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/certificate-iZBV7L"; private static final String PRIVATE_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/privatekey-p8-d3pMKx"; private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties index 611c519390..d3a78996dc 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties @@ -1,7 +1,7 @@ clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketSecretAccessKey-MKTSaV -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketAccessKeyId-1YdB9z +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8 +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE isWebSocket=false authMode=CertificateMutualAuthentication diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties index 9ef35ccc13..9ec4527cf6 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties @@ -1,7 +1,7 @@ clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8 -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketSecretAccessKey-MKTSaV +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketAccessKeyId-1YdB9z isWebSocket=true authMode=MqttOverWebSocketSigV4Signing diff --git a/pom.xml b/pom.xml index 634af6145b..950d9ed8a6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 0.0.1-dev pom AWS IoT Device SDK for Java - The AWS IoT Device SDK for Java provides Java APIs for devices to connect to AWS IoT service using the MQTT protocol. The SDK also provides support for AWS IoT specific features, such as Thing Shadow and Thing Shadow abstraction. + The SDK is in maintenance mode, and no longer receive feature updates. Checkout aws-iot-device-sdk for new features. The AWS IoT Device SDK for Java provides Java APIs for devices to connect to AWS IoT service using the MQTT protocol. The SDK also provides support for AWS IoT specific features, such as Thing Shadow and Thing Shadow abstraction. https://aws.amazon.com/iot/sdk From f9f747c5d6b175b65ab275ea094599acbb444e73 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 09:59:37 -0700 Subject: [PATCH 13/23] revert test properties --- .../iot/client/AWSIotMqttClientIntegrationUtil.java | 10 +++++----- .../iot/client/system_props_mutualAuth.properties | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 3231bcd699..056acb5882 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -15,14 +15,14 @@ public class AWSIotMqttClientIntegrationUtil { - private static final String CLIENT_ENDPOINT = "a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com"; + private static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); private static final String CLIENT_ID = UUID.randomUUID().toString(); - private static final String AUTH_MODE = "CertificateMutualAuthentication"; + private static final String AUTH_MODE = System.getProperty("authMode"); - private static final Boolean IS_WEBSOCKET = false; - private static final String PUBLIC_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/certificate-iZBV7L"; - private static final String PRIVATE_MATERIAL = "arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/privatekey-p8-d3pMKx"; + private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket"));; + private static final String PUBLIC_MATERIAL = System.getProperty("publicMaterial"); + private static final String PRIVATE_MATERIAL = System.getProperty("privateMaterial"); private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); private static final String KEYSTORE_PASSWORD = System.getProperty("keystorePassword"); private static final String KEY_PASSWORD = System.getProperty("keyPassword"); diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties index d3a78996dc..466b487686 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties @@ -1,7 +1,7 @@ -clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com +clientEndpoint=a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestPrivateKey-vNUQU8 -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestCertificate-vTRwjE +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/privatekey-p8-d3pMKx +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/certificate-iZBV7L isWebSocket=false -authMode=CertificateMutualAuthentication +authMode=CertificateMutualAuthentication \ No newline at end of file From 4896536d7dd58e3f5284db88903378b10e5fc2b8 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 10:19:28 -0700 Subject: [PATCH 14/23] DEBUG: print system property --- .../iot/client/AWSIotMqttClientIntegrationTest.java | 4 ++++ .../iot/client/AWSIotMqttClientIntegrationUtil.java | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java index c2ee58d0b3..219668ee8f 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java @@ -36,6 +36,10 @@ public static void init() { @Before public void setup() { client = AWSIotMqttClientIntegrationUtil.getClient(); + + LOGGER.warning("Setup integration test, with websocket:" + AWSIotMqttClientIntegrationUtil.IS_WEBSOCKET + ", auth mode:" + + AWSIotMqttClientIntegrationUtil.AUTH_MODE + "endpoint:" + AWSIotMqttClientIntegrationUtil.CLIENT_ENDPOINT); + assertNotNull("Client not initialized likely due to required system properties not being provided", client); } diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 056acb5882..7178abed90 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -15,12 +15,12 @@ public class AWSIotMqttClientIntegrationUtil { - private static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); + public static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); private static final String CLIENT_ID = UUID.randomUUID().toString(); - private static final String AUTH_MODE = System.getProperty("authMode"); + public static final String AUTH_MODE = System.getProperty("authMode"); - private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket"));; + public static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket"));; private static final String PUBLIC_MATERIAL = System.getProperty("publicMaterial"); private static final String PRIVATE_MATERIAL = System.getProperty("privateMaterial"); private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); From 0b1a455e12f3ce2894365d23d57818e9e7cd6b9c Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 10:28:36 -0700 Subject: [PATCH 15/23] DEBUG: more logs --- .../services/iot/client/AWSIotDeviceIntegrationTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java index 131654c226..317589208b 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java @@ -33,6 +33,8 @@ public static void init() { @Before public void setup() { client = AWSIotMqttClientIntegrationUtil.getClient(); + LOGGER.warning("Setup integration test, with websocket:" + AWSIotMqttClientIntegrationUtil.IS_WEBSOCKET + ", auth mode:" + + AWSIotMqttClientIntegrationUtil.AUTH_MODE + "endpoint:" + AWSIotMqttClientIntegrationUtil.CLIENT_ENDPOINT); assertNotNull("Client not initialized likely due to required system properties not being provided", client); assertNotNull("thingName was not provided", THING_NAME); } From 34c7fbb60dbc130b44c57ad23e14f355148e44ba Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 10:38:21 -0700 Subject: [PATCH 16/23] update websocket test properties --- .../services/iot/client/system_props_websocket.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties index 9ec4527cf6..7c7adfb858 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_websocket.properties @@ -1,7 +1,7 @@ -clientEndpoint=ajje7lpljulm4-ats.iot.us-east-1.amazonaws.com +clientEndpoint=a16523t7iy5uyg-ats.iot.us-east-1.amazonaws.com clientId=DefaultClientId thingName=DefaultThingName -privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketSecretAccessKey-MKTSaV -publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:V1IotSdkIntegrationTestWebsocketAccessKeyId-1YdB9z +privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/privatekey-p8-d3pMKx +publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/certificate-iZBV7L isWebSocket=true authMode=MqttOverWebSocketSigV4Signing From d3af16842cd2d69e4866be520a6b275d06aad73e Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 10:57:47 -0700 Subject: [PATCH 17/23] setup environment variable for websocket test --- .../amazonaws/services/iot/client/CredentialUtil.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java index 68809b260a..52e57e474a 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java @@ -73,10 +73,14 @@ public static AWSIotMqttClient newClient(String clientEndpoint, String clientId, String privateMaterial = CredentialUtil.getSecret(privateMateiralARN); if (isWebSocket == false) { - return newMqttTlsClient(clientEndpoint, clientId+TEST_UID, publicMaterial, - privateMaterial); + return newMqttTlsClient(clientEndpoint, clientId+TEST_UID, publicMaterial, privateMaterial); } else { - return new AWSIotMqttClient(clientEndpoint, clientId+TEST_UID, publicMaterial, privateMaterial); + // For WebSocket, the public material is the AWS access key id and the private material is the AWS secret access key. + // Grab the test info from environment variables. + String accessKeyId = System.getenv("AWS_ACCESS_KEY_ID"); + String privateKey = System.getenv("AWS_SECRET_ACCESS_KEY"); + String sessionToken = System.getenv("AWS_SESSION_TOKEN"); + return new AWSIotMqttClient(clientEndpoint, clientId+TEST_UID, accessKeyId, privateKey, sessionToken); } } From d779ee989c72ce7d951c180c395b4f6c508f3ed7 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 12:38:42 -0700 Subject: [PATCH 18/23] use default thing name --- .../services/iot/client/AWSIotMqttClientIntegrationUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 7178abed90..7251357d7e 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -16,7 +16,7 @@ public class AWSIotMqttClientIntegrationUtil { public static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); - private static final String CLIENT_ID = UUID.randomUUID().toString(); + private static final String CLIENT_ID = System.getProperty("clientId"); public static final String AUTH_MODE = System.getProperty("authMode"); From 2f0aab40ef6b9f500b57424fa57a31b346ced1d2 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 12:52:15 -0700 Subject: [PATCH 19/23] revert to use SDK CI role --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d28337c772..6f3dfe976b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ env: RUN: ${{ github.run_id }}-${{ github.run_number }} AWS_DEFAULT_REGION: us-east-1 SDK_V1_CI_ROLE: ${{ secrets.CI_SDK_V1_ROLE_ARN }} - CRT_CI_ROLE: arn:aws:iam::123124136734:role/CRT_CI_Role permissions: id-token: write # This is required for requesting the JWT @@ -42,7 +41,7 @@ jobs: id: creds uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{ env.CRT_CI_ROLE }} + role-to-assume: ${{ env.SDK_V1_CI_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} output-credentials: true - name: Build ${{ env.PACKAGE_NAME }} + consumers @@ -53,4 +52,3 @@ jobs: AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }} AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }} AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }} - AWS_REGION: ${{ env.AWS_DEFAULT_REGION }} From f4d1d478a912ea69f0850b2a1c288081f0e1851c Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 12:58:07 -0700 Subject: [PATCH 20/23] clean up comments --- .../services/iot/client/AWSIotDeviceIntegrationTest.java | 2 -- .../services/iot/client/AWSIotMqttClientIntegrationUtil.java | 1 - .../java/com/amazonaws/services/iot/client/CredentialUtil.java | 2 +- .../services/iot/client/system_props_mutualAuth.properties | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java index 317589208b..131654c226 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotDeviceIntegrationTest.java @@ -33,8 +33,6 @@ public static void init() { @Before public void setup() { client = AWSIotMqttClientIntegrationUtil.getClient(); - LOGGER.warning("Setup integration test, with websocket:" + AWSIotMqttClientIntegrationUtil.IS_WEBSOCKET + ", auth mode:" - + AWSIotMqttClientIntegrationUtil.AUTH_MODE + "endpoint:" + AWSIotMqttClientIntegrationUtil.CLIENT_ENDPOINT); assertNotNull("Client not initialized likely due to required system properties not being provided", client); assertNotNull("thingName was not provided", THING_NAME); } diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 7251357d7e..703ea5f829 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -5,7 +5,6 @@ import java.io.FileInputStream; import java.security.KeyStore; -import java.util.UUID; import java.util.logging.ConsoleHandler; import java.util.logging.Handler; import java.util.logging.Level; diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java index 52e57e474a..24a485111a 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/CredentialUtil.java @@ -76,7 +76,7 @@ public static AWSIotMqttClient newClient(String clientEndpoint, String clientId, return newMqttTlsClient(clientEndpoint, clientId+TEST_UID, publicMaterial, privateMaterial); } else { // For WebSocket, the public material is the AWS access key id and the private material is the AWS secret access key. - // Grab the test info from environment variables. + // Grab the credential info from environment variables. String accessKeyId = System.getenv("AWS_ACCESS_KEY_ID"); String privateKey = System.getenv("AWS_SECRET_ACCESS_KEY"); String sessionToken = System.getenv("AWS_SESSION_TOKEN"); diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties index 466b487686..52a5aa0441 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/system_props_mutualAuth.properties @@ -4,4 +4,4 @@ thingName=DefaultThingName privateMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/privatekey-p8-d3pMKx publicMaterial=arn:aws:secretsmanager:us-east-1:123124136734:secret:unit-test/certificate-iZBV7L isWebSocket=false -authMode=CertificateMutualAuthentication \ No newline at end of file +authMode=CertificateMutualAuthentication From f39fa78af410e106725994cf4ab02374abff4146 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 13:04:29 -0700 Subject: [PATCH 21/23] cleanup test changes --- .../iot/client/AWSIotMqttClientIntegrationUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index 703ea5f829..f5690cc273 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -14,12 +14,12 @@ public class AWSIotMqttClientIntegrationUtil { - public static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); + private static final String CLIENT_ENDPOINT = System.getProperty("clientEndpoint"); private static final String CLIENT_ID = System.getProperty("clientId"); - public static final String AUTH_MODE = System.getProperty("authMode"); + private static final String AUTH_MODE = System.getProperty("authMode"); - public static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket"));; + private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket"));; private static final String PUBLIC_MATERIAL = System.getProperty("publicMaterial"); private static final String PRIVATE_MATERIAL = System.getProperty("privateMaterial"); private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); From c22ffeb6321e08b93295bd02dae2e66ef7480ccc Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 13:06:44 -0700 Subject: [PATCH 22/23] clean up --- .../services/iot/client/AWSIotMqttClientIntegrationUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java index f5690cc273..8a75f23b22 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationUtil.java @@ -19,7 +19,7 @@ public class AWSIotMqttClientIntegrationUtil { private static final String AUTH_MODE = System.getProperty("authMode"); - private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket"));; + private static final Boolean IS_WEBSOCKET = Boolean.parseBoolean(System.getProperty("isWebSocket")); private static final String PUBLIC_MATERIAL = System.getProperty("publicMaterial"); private static final String PRIVATE_MATERIAL = System.getProperty("privateMaterial"); private static final String KEYSTORE_FILE = System.getProperty("keystoreFile"); From 9e62ca21cf278e5a9dca534e7bcee9944d086d9c Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Mon, 16 Jun 2025 13:09:10 -0700 Subject: [PATCH 23/23] cleanup --- .../services/iot/client/AWSIotMqttClientIntegrationTest.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java index 219668ee8f..c2ee58d0b3 100644 --- a/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java +++ b/aws-iot-device-sdk-java/src/test/java/com/amazonaws/services/iot/client/AWSIotMqttClientIntegrationTest.java @@ -36,10 +36,6 @@ public static void init() { @Before public void setup() { client = AWSIotMqttClientIntegrationUtil.getClient(); - - LOGGER.warning("Setup integration test, with websocket:" + AWSIotMqttClientIntegrationUtil.IS_WEBSOCKET + ", auth mode:" - + AWSIotMqttClientIntegrationUtil.AUTH_MODE + "endpoint:" + AWSIotMqttClientIntegrationUtil.CLIENT_ENDPOINT); - assertNotNull("Client not initialized likely due to required system properties not being provided", client); }