Skip to content

Commit

Permalink
feat: upgrade amphora to enable secure truple provisioning
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Becker <[email protected]>
  • Loading branch information
sbckr committed Aug 1, 2023
1 parent 90fefcc commit d5619bc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
30 changes: 28 additions & 2 deletions 3RD-PARTY-LICENSES/sbom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>amphora-common</name>
<groupId>io.carbynestack</groupId>
<artifactId>amphora-common</artifactId>
<version>0.1-SNAPSHOT-4205214333-22-2fa009a</version>
<version>0.1.1</version>
<licenses>
<license>
<name>Apache-2.0</name>
Expand All @@ -16,7 +16,7 @@
<name>amphora-java-client</name>
<groupId>io.carbynestack</groupId>
<artifactId>amphora-java-client</artifactId>
<version>0.1-SNAPSHOT-4205214333-22-2fa009a</version>
<version>0.1.1</version>
<licenses>
<license>
<name>Apache-2.0</name>
Expand Down Expand Up @@ -102,6 +102,32 @@
</license>
</licenses>
</dependency>
<dependency>
<name>Apache HttpComponents Core HTTP/1.1</name>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.2</version>
<projectUrl>https://hc.apache.org/httpcomponents-core-5.2.x/5.2/httpcore5/</projectUrl>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</dependency>
<dependency>
<name>Apache HttpComponents Core HTTP/2</name>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5-h2</artifactId>
<version>5.2</version>
<projectUrl>https://hc.apache.org/httpcomponents-core-5.2.x/5.2/httpcore5-h2/</projectUrl>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</dependency>
<dependency>
<name>Apache HttpCore</name>
<groupId>org.apache.httpcomponents</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<maven-license-plugin.version>2.0.0</maven-license-plugin.version>

<!-- Carbyne Stack dependency versions -->
<amphora-java-client.version>0.1-SNAPSHOT-4205214333-22-2fa009a</amphora-java-client.version>
<amphora-java-client.version>0.1.1</amphora-java-client.version>
<castor-common.version>0.1-SNAPSHOT-4191841095-22-1721229</castor-common.version>
<castor-java-client.version>0.1-SNAPSHOT-4191841095-22-1721229</castor-java-client.version>
<castor-upload-java-client.version>0.1-SNAPSHOT-4191841095-22-1721229</castor-upload-java-client.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 - for information on the respective copyright owner
* Copyright (c) 2021-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository https://github.com/carbynestack/cli.
*
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -8,7 +8,7 @@

import io.carbynestack.amphora.client.Secret;
import io.carbynestack.amphora.common.exceptions.AmphoraClientException;
import io.carbynestack.amphora.common.exceptions.SecretVerificationException;
import io.carbynestack.amphora.common.exceptions.IntegrityVerificationException;
import io.carbynestack.cli.client.amphora.command.config.GetSecretAmphoraClientCliCommandConfig;
import io.carbynestack.cli.client.amphora.util.SecretPrinter;
import io.carbynestack.cli.exceptions.CsCliConfigurationException;
Expand All @@ -31,7 +31,7 @@ public void run() throws CsCliRunnerException {
Secret result = this.getAmphoraClient().getSecret(this.getConfig().getSecretId());
log.debug(getMessages().getString("get.log.success"), result);
System.out.println(SecretPrinter.secretToString(result));
} catch (AmphoraClientException | SecretVerificationException e) {
} catch (AmphoraClientException | IntegrityVerificationException e) {
throw new CsCliRunnerException("Failed fetching secret.", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 - for information on the respective copyright owner
* Copyright (c) 2021-2023 - for information on the respective copyright owner
* see the NOTICE file and/or the repository https://github.com/carbynestack/cli.
*
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -24,7 +24,7 @@
import io.carbynestack.amphora.common.TagFilter;
import io.carbynestack.amphora.common.TagFilterOperator;
import io.carbynestack.amphora.common.exceptions.AmphoraClientException;
import io.carbynestack.amphora.common.exceptions.SecretVerificationException;
import io.carbynestack.amphora.common.exceptions.IntegrityVerificationException;
import io.carbynestack.amphora.common.paging.Sort;
import io.carbynestack.cli.CsClientCli;
import io.carbynestack.cli.TemporaryConfiguration;
Expand Down Expand Up @@ -151,8 +151,7 @@ public void downloadMissingIdOptionTest() throws CsCliRunnerException, CsCliLogi

@Test(expected = CsCliRunnerException.class)
public void downloadFailedTest()
throws CsCliException, CsCliRunnerException, AmphoraClientException,
SecretVerificationException, CsCliLoginException {
throws CsCliException, CsCliRunnerException, AmphoraClientException, CsCliLoginException {
when(amphoraClientMock.getSecret(any(UUID.class))).thenThrow(new AmphoraClientException(""));
getCliWithArgs(
GetSecretAmphoraClientCliCommandConfig.COMMAND_NAME, UUID.randomUUID().toString())
Expand Down Expand Up @@ -329,8 +328,8 @@ public void downloadFailInvalidNumberOfMainParameters()
@SneakyThrows
@Test
public void downloadSecretVerificationFails() {
SecretVerificationException expectedCause =
new SecretVerificationException("Verification failed.");
IntegrityVerificationException expectedCause =
new IntegrityVerificationException("Verification failed.");
Secret expectedSecret =
Secret.of(
UUID.randomUUID(),
Expand All @@ -351,8 +350,7 @@ public void downloadSecretVerificationFails() {

@Test
public void downloadLargeSecretSuccessTest()
throws CsCliException, CsCliRunnerException, AmphoraClientException,
SecretVerificationException, CsCliLoginException {
throws CsCliException, CsCliRunnerException, AmphoraClientException, CsCliLoginException {
Secret expectedSecret =
Secret.of(
UUID.randomUUID(),
Expand All @@ -368,8 +366,7 @@ public void downloadLargeSecretSuccessTest()

@Test
public void downloadSuccessWithTagsTest()
throws CsCliException, CsCliRunnerException, AmphoraClientException,
SecretVerificationException, CsCliLoginException {
throws CsCliException, CsCliRunnerException, AmphoraClientException, CsCliLoginException {
Secret expectedSecret =
Secret.of(
UUID.randomUUID(),
Expand Down

0 comments on commit d5619bc

Please sign in to comment.