Skip to content

Commit e36ef35

Browse files
authored
Merge pull request #302 from iExecBlockchainComputing/release/9.0.0
Release 9.0.0
2 parents 0341938 + ac26cdd commit e36ef35

File tree

84 files changed

+2330
-1143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2330
-1143
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [[9.0.0]](https://github.com/iExecBlockchainComputing/iexec-sms/releases/tag/v9.0.0) 2025-03-28
6+
7+
### New Features
8+
9+
- SMS can now be configured with a list of TEE-ready pre/post-compute applications for SGX tasks. (#286)
10+
- Add `getTeeServicesPropertiesVersion` endpoint to retrieve a specific pre/post-compute configuration pair version. (#287)
11+
- Add `teeFrameworkVersion` field to `TeeServicesProperties`. (#289)
12+
- Refactor `TeeWorkerInternalConfiguration` and related services to use `Map<String, TeeServicesProperties>`. (#290 #291)
13+
- Add enclave challenge private key, worker address and task ID related tokens in pre-compute session. (#296)
14+
15+
### Quality
16+
17+
- Refactor `SslConfig` and `TwoWaySslClient` to use HttpClient 5 and improve ssl handling. (#285)
18+
- Remove references to Ownable Smart Contract wrapper in integration test. (#288)
19+
- Rename `blockchain` package to `chain` and `BlockchainConfig` class to `ChainConfig`. (#294)
20+
- Fix several SonarQube Cloud issues. (#295)
21+
- Stop using `TestUtils` in `AuthorizationServiceTests.java`. (#300)
22+
23+
### Breaking API changes
24+
25+
- Remove deprecated code from `AppComputeSecretController` and `SmsClient`. (#293)
26+
- Replace custom yes/no boolean serialization with standard Java boolean strings in TEE sessions. (#297)
27+
- Harmonize YML internal variables to proper case. (#299)
28+
29+
### Dependency Upgrades
30+
31+
- Upgrade to `eclipse-temurin:17.0.13_11-jre-focal`. (#285)
32+
- Upgrade to Spring Doc OpenAPI 2.6.0. (#285)
33+
- Upgrade to Spring Boot 3.3.8. (#292)
34+
- Upgrade to `iexec-common` 9.0.0. (#301)
35+
- Upgrade to `iexec-commons-poco` 5.0.0. (#301)
36+
537
## [[8.7.0]](https://github.com/iExecBlockchainComputing/iexec-sms/releases/tag/v8.7.0) 2024-12-23
638

739
### New Features

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:11.0.24_8-jre-focal
1+
FROM eclipse-temurin:17.0.13_11-jre-focal
22

33
ARG jar
44

README.md

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To support:
5656
| `IEXEC_SMS_ADMIN_STORAGE_LOCATION` | Storage location where to persist replicated backups. It must be an absolute directory path. | String | `/backup` | `/backup` |
5757
| `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | Positive integer | `134` | `134` |
5858
| `IEXEC_IS_SIDECHAIN` | Define whether iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `true` | `true` |
59-
| `IEXEC_SMS_BLOCKCHAIN_NODE_ADDRESS` | URL to connect to the blockchain node. | URL | `https://bellecour.iex.ec` | `https://bellecour.iex.ec` |
59+
| `IEXEC_BLOCKCHAIN_NODE_ADDRESS` | URL to connect to the blockchain node. | URL | `https://bellecour.iex.ec` | `https://bellecour.iex.ec` |
6060
| `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | String | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` |
6161
| `IEXEC_BLOCK_TIME` | Duration between consecutive blocks on the blockchain network. | String | `PT5S` | `PT5S` |
6262
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER`. | Float | `1.0` | `1.0` |
@@ -68,14 +68,57 @@ To support:
6868
| `IEXEC_TEE_CHALLENGE_CLEANUP_CRON` | Cron expression to configure TEE challenges cleanup policy. | String | `@hourly` | `@hourly` |
6969
| `IEXEC_TEE_CHALLENGE_CLEANUP_MAX_BATCH_SIZE` | Max number of TEE challenges whose missing deadline could be set at a given time. | Integer | `500` | `500` |
7070
| `IEXEC_TEE_CHALLENGE_CLEANUP_RETENTION_DURATION` | Retention duration when setting missing final deadline. | Duration | `P5D` | `P5D` |
71-
| `IEXEC_TEE_WORKER_PRE_COMPUTE_IMAGE` | TEE enabled OCI image name for worker pre-compute stage of TEE tasks. | String | | |
72-
| `IEXEC_TEE_WORKER_PRE_COMPUTE_FINGERPRINT` | Fingerprint (aka mrenclave) of the TEE enabled worker pre-compute image. | String | | |
73-
| `IEXEC_TEE_WORKER_PRE_COMPUTE_HEAP_SIZE_GB` | Required heap size for a worker pre-compute enclave (in Giga Bytes). | Positive integer | `3` | `3` |
74-
| `IEXEC_TEE_WORKER_PRE_COMPUTE_ENTRYPOINT` | Command executed when starting a container from the TEE enabled worker pre-compute image. | String | `java -jar /app/app.jar` | `/bin/bash /apploader.sh` |
75-
| `IEXEC_TEE_WORKER_POST_COMPUTE_IMAGE` | TEE enabled OCI image name for worker post-compute stage of TEE tasks. | String | | |
76-
| `IEXEC_TEE_WORKER_POST_COMPUTE_FINGERPRINT` | Fingerprint (aka mrenclave) of the TEE enabled worker post-compute image. | String | | |
77-
| `IEXEC_TEE_WORKER_POST_COMPUTE_HEAP_SIZE_GB` | Required heap size for a worker post-compute enclave (in Giga Bytes). | Positive integer | `3` | `3` |
78-
| `IEXEC_TEE_WORKER_POST_COMPUTE_ENTRYPOINT` | Command executed when starting a container from the TEE enabled worker post-compute image. | String | `java -jar /app/app.jar` | `/bin/bash /apploader.sh` |
71+
| `TEE_WORKER_PIPELINES_0_VERSION` | Worker pipeline version | String | `v5` | `v5` |
72+
| `TEE_WORKER_PIPELINES_0_PRECOMPUTE_IMAGE` | TEE enabled OCI image name for worker pre-compute stage | String | | |
73+
| `TEE_WORKER_PIPELINES_0_PRECOMPUTE_FINGERPRINT` | Fingerprint (mrenclave) of the TEE enabled worker pre-compute image | String | | |
74+
| `TEE_WORKER_PIPELINES_0_PRECOMPUTE_HEAPSIZE` | Required heap size for a worker pre-compute enclave using units like KB, MB, GB | DataSize | `3GB` | `3GB` |
75+
| `TEE_WORKER_PIPELINES_0_PRECOMPUTE_ENTRYPOINT` | Command executed when starting a container from the TEE enabled worker pre-compute image | String | `java -jar /app/app.jar` | `/bin/bash /apploader.sh` |
76+
| `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_IMAGE` | TEE enabled OCI image name for worker post-compute stage | String | | |
77+
| `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_FINGERPRINT` | Fingerprint (mrenclave) of the TEE enabled worker post-compute image | String | | |
78+
| `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_HEAPSIZE` | Required heap size for a worker post-compute enclave using units like KB, MB, GB | DataSize | `3GB` | `3GB` |
79+
| `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_ENTRYPOINT` | Command executed when starting a container from the TEE enabled worker post-compute image | String | `java -jar /app/app.jar` | `/bin/bash /apploader.sh` |
80+
81+
## Heap Size Configuration
82+
The heap size configuration supports the following units:
83+
84+
- **B** for bytes
85+
- **KB** for kilobytes
86+
- **MB** for megabytes
87+
- **GB** for gigabytes
88+
- **TB** for terabytes
89+
90+
### Example Values
91+
- `3GB`
92+
- `4096MB`
93+
- `1TB`
94+
95+
### Conversion Table
96+
| Unit | Bytes Equivalent |
97+
|------|-----------------------------|
98+
| 1 KB | 1,024 B |
99+
| 1 MB | 1,024 KB (1,048,576 B) |
100+
| 1 GB | 1,024 MB (1,073,741,824 B) |
101+
| 1 TB | 1,024 GB (1,099,511,627,776 B) |
102+
103+
### Required Pipeline Configuration
104+
105+
The TEE worker pipeline configurations (`application-gramine.yml` and `application-scone.yml`) **no longer provide default values** for pre-compute and post-compute settings.
106+
The configuration must be set by SMS operator.
107+
108+
#### **Example Configuration (to be provided by SMS operator)**
109+
```yaml
110+
- version: v5
111+
pre-compute:
112+
image: iexechub/tee-worker-pre-compute:<version>-sconify-<scone-version>-production
113+
fingerprint: <tee-worker-pre-compute-fingerprint>
114+
heap-size: 3GB
115+
entrypoint: java -jar /app/app.jar
116+
post-compute:
117+
image: iexechub/tee-worker-post-compute:<version>-sconify-<scone-version>-production
118+
fingerprint: <tee-worker-post-compute-fingerprint>
119+
heap-size: 3GB
120+
entrypoint: java -jar /app/app.jar
121+
```
79122
80123
### Scone specific environment variables
81124

build.gradle

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
plugins {
22
id 'java'
33
id 'io.freefair.lombok' version '8.10.2'
4-
id 'org.springframework.boot' version '2.7.18'
4+
id 'org.springframework.boot' version '3.3.8'
55
id 'io.spring.dependency-management' version '1.1.6'
66
id 'jacoco'
77
id 'org.sonarqube' version '5.1.0.4882'
88
id 'maven-publish'
99
}
1010

11-
ext {
12-
openFeignVersion = '11.10'
13-
}
14-
1511
if (!project.hasProperty('gitBranch')) {
1612
ext.gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()
1713
}
@@ -39,8 +35,12 @@ allprojects {
3935
toolchain {
4036
languageVersion.set(JavaLanguageVersion.of(17))
4137
}
42-
sourceCompatibility = "11"
43-
targetCompatibility = "11"
38+
sourceCompatibility = JavaVersion.VERSION_17
39+
targetCompatibility = JavaVersion.VERSION_17
40+
}
41+
42+
tasks.withType(JavaCompile).configureEach {
43+
options.compilerArgs.add('-parameters')
4444
}
4545
}
4646

@@ -55,23 +55,20 @@ dependencies {
5555
implementation 'org.springframework.boot:spring-boot-starter-validation'
5656
implementation 'org.springframework.boot:spring-boot-starter-web'
5757
implementation 'org.springframework.retry:spring-retry'
58+
5859
// H2
5960
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
6061
implementation 'com.h2database:h2:2.2.224'
6162

6263
// Spring Doc
63-
implementation 'org.springdoc:springdoc-openapi-ui:1.7.0'
64+
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
6465

65-
//ssl
66-
implementation 'org.apache.httpcomponents:httpclient'
66+
// ssl
67+
implementation 'org.apache.httpcomponents.client5:httpclient5'
6768

6869
// observability
6970
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
7071

71-
// feign
72-
implementation "io.github.openfeign:feign-jackson:$openFeignVersion"
73-
implementation "io.github.openfeign:feign-slf4j:$openFeignVersion"
74-
7572
// expiring map
7673
implementation "net.jodah:expiringmap:0.5.11"
7774
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version=8.7.0
2-
iexecCommonVersion=8.6.0
3-
iexecCommonsPocoVersion=4.2.0
1+
version=9.0.0
2+
iexecCommonVersion=9.0.0
3+
iexecCommonsPocoVersion=5.0.0
44

55
nexusUser
66
nexusPassword

iexec-sms-library/build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,30 @@ plugins {
66
}
77

88
dependencies {
9+
implementation platform("org.springframework.boot:spring-boot-dependencies:3.3.8")
10+
911
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
1012
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
1113
}
1214

1315
java {
14-
sourceCompatibility = "11"
15-
targetCompatibility = "11"
16+
sourceCompatibility = JavaVersion.VERSION_17
17+
targetCompatibility = JavaVersion.VERSION_17
1618
withJavadocJar()
1719
withSourcesJar()
1820
}
1921

22+
tasks.withType(JavaCompile).configureEach {
23+
options.compilerArgs.add('-parameters')
24+
}
25+
2026
testing {
2127
suites {
2228
test {
2329
useJUnitJupiter()
2430
dependencies {
25-
implementation "org.assertj:assertj-core:3.22.0"
26-
implementation 'org.junit.jupiter:junit-jupiter:5.8.2'
27-
implementation 'org.mockito:mockito-junit-jupiter:4.7.0'
31+
implementation "org.assertj:assertj-core"
32+
implementation 'org.mockito:mockito-junit-jupiter'
2833
}
2934
}
3035
}

iexec-sms-library/src/main/java/com/iexec/sms/api/SmsClient.java

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022-2024 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2022-2025 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,16 +49,6 @@ ApiResponseBody<String, List<String>> addAppDeveloperAppComputeSecret(
4949
String secretValue
5050
);
5151

52-
/**
53-
* @deprecated Call {@code isAppDeveloperAppComputeSecretPresent(appAddress)}
54-
*/
55-
@Deprecated(forRemoval = true)
56-
@RequestLine("HEAD /apps/{appAddress}/secrets/{secretIndex}")
57-
ApiResponseBody<String, List<String>> isAppDeveloperAppComputeSecretPresent(
58-
@Param("appAddress") String appAddress,
59-
@Param("secretIndex") String secretIndex
60-
);
61-
6252
@RequestLine("HEAD /apps/{appAddress}/secrets")
6353
ApiResponseBody<String, List<String>> isAppDeveloperAppComputeSecretPresent(
6454
@Param("appAddress") String appAddress
@@ -119,13 +109,6 @@ String setWeb3Secret(
119109

120110
// region TEE
121111

122-
/**
123-
* @deprecated use {@link SmsClient#generateTeeChallenge(String, String)}
124-
*/
125-
@Deprecated(forRemoval = true)
126-
@RequestLine("POST /tee/challenges/{chainTaskId}")
127-
String generateTeeChallenge(@Param("chainTaskId") String chainTaskId);
128-
129112
@Headers("Authorization: {authorization}")
130113
@RequestLine("POST /tee/challenges/{chainTaskId}")
131114
String generateTeeChallenge(@Param("authorization") String authorization, @Param("chainTaskId") String chainTaskId);
@@ -140,8 +123,17 @@ ApiResponseBody<TeeSessionGenerationResponse, TeeSessionGenerationError> generat
140123
@RequestLine("GET /tee/framework")
141124
TeeFramework getTeeFramework();
142125

126+
/**
127+
* @deprecated Use {@link #getTeeServicesPropertiesVersion(TeeFramework, String)} instead.
128+
* This endpoint will be removed in future versions.
129+
*/
130+
@Deprecated(since = "8.7.0", forRemoval = true)
143131
@RequestLine("GET /tee/properties/{teeFramework}")
144132
<T extends TeeServicesProperties> T getTeeServicesProperties(@Param("teeFramework") TeeFramework teeFramework);
133+
134+
@RequestLine("GET /tee/properties/{teeFramework}/{version}")
135+
<T extends TeeServicesProperties> T getTeeServicesPropertiesVersion(@Param("teeFramework") TeeFramework teeFramework,
136+
@Param("version") String version);
145137
// endregion
146138

147139
// region Metrics

iexec-sms-library/src/main/java/com/iexec/sms/api/TeeSessionGenerationError.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022-2024 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2022-2025 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,6 +27,13 @@ public enum TeeSessionGenerationError {
2727
EXECUTION_NOT_AUTHORIZED_INVALID_SIGNATURE,
2828
// endregion
2929

30+
// region Signature token retrieval
31+
GET_SIGNATURE_TOKENS_FAILED_EMPTY_WORKER_ADDRESS,
32+
GET_SIGNATURE_TOKENS_FAILED_EMPTY_PUBLIC_ENCLAVE_CHALLENGE,
33+
GET_SIGNATURE_TOKENS_FAILED_EMPTY_TEE_CHALLENGE,
34+
GET_SIGNATURE_TOKENS_FAILED_EMPTY_TEE_CREDENTIALS,
35+
// endregion
36+
3037
// region Pre-compute
3138
PRE_COMPUTE_GET_DATASET_SECRET_FAILED,
3239
// endregion
@@ -39,19 +46,12 @@ public enum TeeSessionGenerationError {
3946
// region Post-compute
4047
POST_COMPUTE_GET_ENCRYPTION_TOKENS_FAILED_EMPTY_BENEFICIARY_KEY,
4148
POST_COMPUTE_GET_STORAGE_TOKENS_FAILED,
42-
43-
POST_COMPUTE_GET_SIGNATURE_TOKENS_FAILED_EMPTY_WORKER_ADDRESS,
44-
POST_COMPUTE_GET_SIGNATURE_TOKENS_FAILED_EMPTY_PUBLIC_ENCLAVE_CHALLENGE,
45-
POST_COMPUTE_GET_SIGNATURE_TOKENS_FAILED_EMPTY_TEE_CHALLENGE,
46-
POST_COMPUTE_GET_SIGNATURE_TOKENS_FAILED_EMPTY_TEE_CREDENTIALS,
4749
// endregion
4850

4951
// region Secure session generation
5052
SECURE_SESSION_STORAGE_CALL_FAILED,
5153
SECURE_SESSION_GENERATION_FAILED,
5254
SECURE_SESSION_NO_TEE_FRAMEWORK,
53-
@Deprecated(forRemoval = true)
54-
SECURE_SESSION_NO_TEE_PROVIDER,
5555
// endregion
5656

5757
// region Miscellaneous

iexec-sms-library/src/main/java/com/iexec/sms/api/config/GramineServicesProperties.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022-2023 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2022-2025 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,9 +24,23 @@
2424
@Getter
2525
public class GramineServicesProperties extends TeeServicesProperties {
2626

27-
@JsonCreator
27+
/**
28+
* GramineServicesProperties constructor.
29+
*
30+
* @deprecated This method is no longer acceptable to create a GramineServicesProperties object since we need the
31+
* TEE framework version also now.
32+
* Use {@link GramineServicesProperties(String, TeeAppProperties, TeeAppProperties)} instead.
33+
*/
34+
@Deprecated(since = "8.7.0", forRemoval = true)
2835
public GramineServicesProperties(@JsonProperty("preComputeProperties") TeeAppProperties preComputeProperties,
2936
@JsonProperty("postComputeProperties") TeeAppProperties postComputeProperties) {
30-
super(TeeFramework.GRAMINE, preComputeProperties, postComputeProperties);
37+
super(TeeFramework.GRAMINE, "", preComputeProperties, postComputeProperties);
38+
}
39+
40+
@JsonCreator
41+
public GramineServicesProperties(@JsonProperty("teeFrameworkVersion") String teeFrameworkVersion,
42+
@JsonProperty("preComputeProperties") TeeAppProperties preComputeProperties,
43+
@JsonProperty("postComputeProperties") TeeAppProperties postComputeProperties) {
44+
super(TeeFramework.GRAMINE, teeFrameworkVersion, preComputeProperties, postComputeProperties);
3145
}
3246
}

iexec-sms-library/src/main/java/com/iexec/sms/api/config/SconeServicesProperties.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022-2023 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2022-2025 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,11 +25,27 @@
2525
public class SconeServicesProperties extends TeeServicesProperties {
2626
private final String lasImage;
2727

28-
@JsonCreator
28+
/**
29+
* SconeServicesProperties constructor.
30+
*
31+
* @deprecated This method is no longer acceptable to create a SconeServicesProperties object since we need the
32+
* TEE framework version also now.
33+
* Use {@link SconeServicesProperties(String, TeeAppProperties, TeeAppProperties, String)} instead.
34+
*/
35+
@Deprecated(since = "8.7.0", forRemoval = true)
2936
public SconeServicesProperties(@JsonProperty("preComputeProperties") TeeAppProperties preComputeProperties,
3037
@JsonProperty("postComputeProperties") TeeAppProperties postComputeProperties,
3138
@JsonProperty("lasImage") String lasImage) {
32-
super(TeeFramework.SCONE, preComputeProperties, postComputeProperties);
39+
super(TeeFramework.SCONE, "", preComputeProperties, postComputeProperties);
40+
this.lasImage = lasImage;
41+
}
42+
43+
@JsonCreator
44+
public SconeServicesProperties(@JsonProperty("teeFrameworkVersion") String teeFrameworkVersion,
45+
@JsonProperty("preComputeProperties") TeeAppProperties preComputeProperties,
46+
@JsonProperty("postComputeProperties") TeeAppProperties postComputeProperties,
47+
@JsonProperty("lasImage") String lasImage) {
48+
super(TeeFramework.SCONE, teeFrameworkVersion, preComputeProperties, postComputeProperties);
3349
this.lasImage = lasImage;
3450
}
3551
}

0 commit comments

Comments
 (0)