Skip to content

Commit 50e6cad

Browse files
authored
docs: update README.md (#323)
1 parent daeddee commit 50e6cad

File tree

3 files changed

+73
-62
lines changed

3 files changed

+73
-62
lines changed

README.md

Lines changed: 66 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,26 @@
44

55
The _iExec Secret Management Service_ (SMS) stores user secrets and provisions them to authorized Trusted Execution Environment (TEE) applications running on the iExec network.
66

7-
Two TEE frameworks for TEE tasks are supported on the iExec platform:
8-
9-
* Scone
10-
* Gramine
7+
> [!IMPORTANT]
8+
> Support for Intel TDX based TEE enclaves is being introduced on the iExec platform.
9+
> The Scone and Gramine TEE SGX frameworks are being deprecated and their support will be removed in the future.
1110
1211
### Details
1312

14-
* Confidential assets you have (password, token, API key, AES key, ..) should be securely transferred from your machine to the SMS over a TLS channel (iExec SDK is recommended). This operation is only done once.
13+
* Confidential assets you own (password, token, API key, AES key, ..) should be securely transferred from your machine to the SMS over a TLS channel (iExec SDK is recommended). This operation is only done once.
1514
* Internally, secrets are encrypted with standard AES encryption before being written to disk.
1615
* The iExec SMS secret provisioning policy is based on on-chain ACL (PoCo). PoCo smart contracts define simple ACL rules where individuals have ownership of on-chain objects they have deployed (workerpool, application, secret-dataset & requester).
1716
* Each individual who is the owner of an object could define a policy on it. For example, "As a Requester (0xAlice), I only authorize my confidential Secret-Dataset (0xSecretOfAlice) to be used by the application of Bob (0xAppOfBob) I trust which will run on the Workerpool of Carl (0xWorkerpoolOfCarl)".
18-
* When the secure application of Bob starts, the secret of Alice is written into a temporary session and sent over TLS to a dedicated Configuration & Attestation Service (CAS) enclave responsible for communicating with the final application enclave.
17+
* When the secure application of Bob starts, the secret of Alice is written into a temporary session and sent over TLS to a dedicated Configuration & Attestation Service (CAS) enclave responsible for communicating with the final application enclave.
1918
* If the application enclave is legit (measurable with its mrenclave with Scone), it will receive the secrets.
20-
* To sum up, if all checks are correct, the secret of Alice will cross the following environments: Alice-Host -> iExec-SMS -> Scone-CAS -> Bob-Scone-Application
19+
* To sum up, if all checks are correct, the secret of Alice will cross the following environments:
20+
Alice-Host -> iExec-SMS -> TEE Session Storage (depends on TEE framework) -> Bob-Application (running in a TEE enclave)
2121

2222
## Configuration
2323

2424
The _iExec Secret Management Service_ is available as an OCI image on [Docker Hub](https://hub.docker.com/r/iexechub/iexec-sms/tags).
2525

2626
A single _iExec Secret Management Service_ instance supports a single TEE framework.
27-
To support both Scone and Gramine TEE tasks, two instances of _iExec SMS_ must be configured.
2827

2928
To run properly, the _iExec Secret Management Service_ requires:
3029
* A blockchain node. iExec smart contracts must be deployed on the blockchain network.
@@ -33,52 +32,61 @@ To run properly, the _iExec Secret Management Service_ requires:
3332
* for Scone TEE tasks:
3433
* a Scontain _Configuration and Attestation Service_ (CAS).
3534
* a valid OCI image configuration of a Scontain _Local Attestation Service_ (LAS). This service will be deployed by an iExec Worker to compute TEE tasks.
36-
* for Gramine TEE tasks:
37-
* an _iExec Secret Provisioner Service_ (_iExec SPS_) instance.
35+
* for TDX TEE tasks:
36+
* an _iExec Session Storage_ instance.
37+
* a _iExec Secret Broker Server_ instance.
3838

3939
The _iExec Secret Management Service_ can be started locally for development purpose.
4040
It is not advised to use an instance with such configuration in production.
4141

4242
To support:
4343
* Scone TEE tasks, set `IEXEC_SMS_TEE_RUNTIME_FRAMEWORK=scone`, then configure the SMS with properties of all following tables.
44-
* Gramine TEE tasks, set `IEXEC_SMS_TEE_RUNTIME_FRAMEWORK=gramine`, then configure the SMS with properties of following table.
44+
* TDX TEE tasks, set `IEXEC_SMS_TEE_RUNTIME_FRAMEWORK=tdx`, then configure the SMS with properties of following table.
4545

46-
### Environment variables (Scone or Gramine TEE framework)
46+
### Properties and environment variables
4747

48-
| Environment variable | Description | Type | Default Scone-configuration value | Default Gramine-configuration value |
48+
| Property name | Environment variable | Description | Type | Default value |
4949
| --- | --- | --- | --- | --- |
50-
| `IEXEC_SMS_TEE_RUNTIME_FRAMEWORK` | Define which TEE framework this _iExec SMS_ supports. | `scone` or `gramine` | | |
51-
| `IEXEC_SMS_PORT` | Server HTTP port. | Positive integer | `13300` | `13300` |
52-
| `IEXEC_SMS_H2_URL` | JDBC URL of the database. | URL | `jdbc:h2:file:/data/sms-h2` | `jdbc:h2:file:/data/sms-h2` |
53-
| `IEXEC_SMS_H2_CONSOLE` | Whether to enable the H2 console. | Boolean | `false` | `false` |
54-
| `IEXEC_SMS_STORAGE_ENCRYPTION_AES_KEY_PATH` | Path to the key created and used to encrypt secrets. | String | `src/main/resources/iexec-sms-aes.key` | `src/main/resources/iexec-sms-aes.key` |
55-
| `IEXEC_SMS_ADMIN_API_KEY` | API key used to authorize calls to `/admin` endpoints. | String | | |
56-
| `IEXEC_SMS_ADMIN_STORAGE_LOCATION` | Storage location where to persist replicated backups. It must be an absolute directory path. | String | `/backup` | `/backup` |
57-
| `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | Positive integer | `134` | `134` |
58-
| `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_BLOCKCHAIN_NODE_ADDRESS` | URL to connect to the blockchain node. | URL | `https://bellecour.iex.ec` | `https://bellecour.iex.ec` |
60-
| `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | String | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` |
61-
| `IEXEC_BLOCK_TIME` | Duration between consecutive blocks on the blockchain network. | String | `PT5S` | `PT5S` |
62-
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER`. | Float | `1.0` | `1.0` |
63-
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER > IEXEC_GAS_PRICE_CAP`. | Integer | `22000000000` | `22000000000` |
64-
| `IEXEC_SECRET_PROVISIONER_WEB_HOSTNAME` | Secret provisioner server host for session management. Used to post sessions of secrets. | String | `localhost` | `localhost` |
65-
| `IEXEC_SECRET_PROVISIONER_WEB_PORT` | Secret provisioner server port for session management. | Positive integer | `8081` | `8080` |
66-
| `IEXEC_SECRET_PROVISIONER_ENCLAVE_HOSTNAME` | Secret provisioner server host for retrieving secrets from attested enclaves. Typically used by workers to execute TEE tasks. | Positive integer | `localhost` | `localhost` |
67-
| `IEXEC_SECRET_PROVISIONER_ENCLAVE_PORT`| Secret provisioner server port for retrieving secrets from attested enclaves. | Positive integer | `18765` | `4433` |
68-
| `IEXEC_TEE_CHALLENGE_CLEANUP_CRON` | Cron expression to configure TEE challenges cleanup policy. | String | `@hourly` | `@hourly` |
69-
| `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` |
70-
| `IEXEC_TEE_CHALLENGE_CLEANUP_RETENTION_DURATION` | Retention duration when setting missing final deadline. | Duration | `P5D` | `P5D` |
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` |
50+
| `spring.profiles.active` | `IEXEC_SMS_TEE_RUNTIME_FRAMEWORK` | Define which TEE framework this _iExec SMS_ supports. | `scone` or `tdx` | |
51+
| `server.port` | `IEXEC_SMS_PORT` | Server HTTP port. | Positive integer | `13300` |
52+
| `spring.datasource.url` | `IEXEC_SMS_H2_URL` | JDBC URL of the database. | URL | `jdbc:h2:file:/data/sms-h2` |
53+
| `spring.h2.console.enabled` | `IEXEC_SMS_H2_CONSOLE` | Whether to enable the H2 console. | Boolean | `false` |
54+
| `encryption.aes-key-path` | `IEXEC_SMS_STORAGE_ENCRYPTION_AES_KEY_PATH` | Path to the key created and used to encrypt secrets. | String | `src/main/resources/iexec-sms-aes.key` |
55+
| `admin.api-key` | `IEXEC_SMS_ADMIN_API_KEY` | API key used to authorize calls to `/admin` endpoints. | String | |
56+
| `admin.storage-location` | `IEXEC_SMS_ADMIN_STORAGE_LOCATION` | Storage location where to persist replicated backups. It must be an absolute directory path. | String | `/backup` |
57+
| `chain.id` | `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | Positive integer | `134` |
58+
| `chain.sidechain` | `IEXEC_IS_SIDECHAIN` | Define whether iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `true` |
59+
| `chain.node-address` | `IEXEC_BLOCKCHAIN_NODE_ADDRESS` | URL to connect to the blockchain node. | URL | `https://bellecour.iex.ec` |
60+
| `chain.hub-address` | `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | String | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` |
61+
| `chain.block-time` | `IEXEC_BLOCK_TIME` | Duration between consecutive blocks on the blockchain network. | String | `PT5S` |
62+
| `chain.gas-price-multiplier` | `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER`. | Float | `1.0` |
63+
| `chain.gas-price-cap` | `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER > IEXEC_GAS_PRICE_CAP`. | Integer | `22000000000` |
64+
| `ipfs.gateway-url` | | Url of the IPFS gateway to use to fetch bulk processing related data when handling such a task. | URL | |
65+
| `metrics.storage.refresh-interval` | `IEXEC_SMS_METRICS_STORAGE_REFRESH_INTERVAL` | Time interval in seconds between consecutive queries to fetch database content statistics. | Integer | 30 |
66+
| `tee.secret-provisioner.web.hostname` | `IEXEC_SECRET_PROVISIONER_WEB_HOSTNAME` | Secret provisioner server host for session management. Used to post sessions of secrets. | String | `localhost` |
67+
| `tee.secret-provisioner.web.port` | `IEXEC_SECRET_PROVISIONER_WEB_PORT` | Secret provisioner server port for session management. | Positive integer | |
68+
| `tee.secret-provisioner.enclave.hostname` | `IEXEC_SECRET_PROVISIONER_ENCLAVE_HOSTNAME` | Secret provisioner server host for retrieving secrets from attested enclaves. Typically used by workers to execute TEE tasks. | Positive integer | `localhost` |
69+
| `tee.secret-provisioner.enclave.port` | `IEXEC_SECRET_PROVISIONER_ENCLAVE_PORT`| Secret provisioner server port for retrieving secrets from attested enclaves. | Positive integer | |
70+
| `tee.challenge.cleanup.cron` | `IEXEC_TEE_CHALLENGE_CLEANUP_CRON` | Cron expression to configure TEE challenges cleanup policy. | String | `@hourly` |
71+
| `tee.challenge.cleanup.missing-deadline-max-batch-size` | `IEXEC_TEE_CHALLENGE_CLEANUP_MAX_BATCH_SIZE` | Max number of TEE challenges whose missing deadline could be set at a given time. | Integer | `500` |
72+
| `tee.challenge.cleanup.missing-deadline-retention-duration` | `IEXEC_TEE_CHALLENGE_CLEANUP_RETENTION_DURATION` | Retention duration when setting missing final deadline. | Duration | `P5D` |
73+
| `tee.worker.pipelines[].version` | `TEE_WORKER_PIPELINES_0_VERSION` | Worker pipeline version | String | `v5` |
74+
| `tee.worker.pipelines[].pre-compute.image` | `TEE_WORKER_PIPELINES_0_PRECOMPUTE_IMAGE` | TEE enabled OCI image name for worker pre-compute stage | String | |
75+
| `tee.worker.pipelines[].pre-compute.fingerprint` | `TEE_WORKER_PIPELINES_0_PRECOMPUTE_FINGERPRINT` | Fingerprint (mrenclave) of the TEE enabled worker pre-compute image | String | |
76+
| `tee.worker.pipelines[].pre-compute.heap-size` | `TEE_WORKER_PIPELINES_0_PRECOMPUTE_HEAPSIZE` | Required heap size for a worker pre-compute enclave using units like KB, MB, GB | DataSize | `1GB` |
77+
| `tee.worker.pipelines[].pre-compute.entrypoint` | `TEE_WORKER_PIPELINES_0_PRECOMPUTE_ENTRYPOINT` | Command executed when starting a container from the TEE enabled worker pre-compute image | String | `/app/tee-worker-pre-compute` |
78+
| `tee.worker.pipelines[].post-compute.image` | `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_IMAGE` | TEE enabled OCI image name for worker post-compute stage | String | |
79+
| `tee.worker.pipelines[].post-compute.fingerprint` | `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_FINGERPRINT` | Fingerprint (mrenclave) of the TEE enabled worker post-compute image | String | |
80+
| `tee.worker.pipelines[].post-compute.heap-size` | `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_HEAPSIZE` | Required heap size for a worker post-compute enclave using units like KB, MB, GB | DataSize | `1GB` |
81+
| `tee.worker.pipelines[].post-compute.entrypoint` | `TEE_WORKER_PIPELINES_0_POSTCOMPUTE_ENTRYPOINT` | Command executed when starting a container from the TEE enabled worker post-compute image | String | `/app/tee-worker-post-compute` |
82+
83+
> [!IMPORTANT]
84+
> The environment variables are starting to be sunset in order to bring better configurability in the future.
85+
> It is recommended to use variables derived from application properties to benefit from Spring framework features
86+
> (see [Relaxed Binding](https://docs.spring.io/spring-boot/3.3/reference/features/external-config.html#features.external-config.typesafe-configuration-properties.relaxed-binding)).
8087
8188
## Heap Size Configuration
89+
8290
The heap size configuration supports the following units:
8391

8492
- **B** for bytes
@@ -88,36 +96,38 @@ The heap size configuration supports the following units:
8896
- **TB** for terabytes
8997

9098
### Example Values
99+
91100
- `3GB`
92101
- `4096MB`
93102
- `1TB`
94103

95104
### 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) |
105+
106+
| Unit | Bytes Equivalent |
107+
|------|----------------------------|
108+
| 1 KB | 1,024 B |
109+
| 1 MB | 1,024 KB (1,048,576 B) |
110+
| 1 GB | 1,024 MB (1,073,741,824 B) |
102111

103112
### Required Pipeline Configuration
104113

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.
114+
The TEE worker pipeline configurations (`application-scone.yml` and `application-tdx.yml`) **no longer provide default values** for pre-compute and post-compute settings.
106115
The configuration must be set by SMS operator.
107116

108117
#### **Example Configuration (to be provided by SMS operator)**
118+
109119
```yaml
110120
- version: v5
111121
pre-compute:
112-
image: iexechub/tee-worker-pre-compute:<version>-sconify-<scone-version>-production
122+
image: iexechub/tee-worker-pre-compute-rust:<version>-sconify-<scone-version>-production
113123
fingerprint: <tee-worker-pre-compute-fingerprint>
114-
heap-size: 3GB
115-
entrypoint: java -jar /app/app.jar
124+
heap-size: 1GB
125+
entrypoint: /app/tee-worker-pre-compute
116126
post-compute:
117-
image: iexechub/tee-worker-post-compute:<version>-sconify-<scone-version>-production
127+
image: iexechub/tee-worker-post-compute-rust:<version>-sconify-<scone-version>-production
118128
fingerprint: <tee-worker-post-compute-fingerprint>
119-
heap-size: 3GB
120-
entrypoint: java -jar /app/app.jar
129+
heap-size: 1GB
130+
entrypoint: /app/tee-worker-post-compute
121131
```
122132
123133
### Scone specific environment variables

release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"always-update": true,
34
"draft-pull-request": true,
45
"include-component-in-tag": false,
56
"include-v-in-tag": true,

src/main/resources/application-scone.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ tee:
1111
pipelines:
1212
- version: # v5
1313
pre-compute:
14-
image: # e.g.: iexechub/tee-worker-pre-compute:<version>-sconify-<scone-version>-production
14+
image: # e.g.: iexechub/tee-worker-pre-compute-rust:<version>-sconify-<scone-version>-production
1515
fingerprint:
16-
heap-size: # 3GB
17-
entrypoint: # java -jar /app/app.jar
16+
heap-size: # 1GB
17+
entrypoint: # /app/tee-worker-pre-compute
1818
post-compute:
19-
image: # e.g.: iexechub/tee-worker-post-compute:<version>-sconify-<scone-version>-production
19+
image: # e.g.: iexechub/tee-worker-post-compute-rust:<version>-sconify-<scone-version>-production
2020
fingerprint:
21-
heap-size: # 3GB
22-
entrypoint: # java -jar /app/app.jar
21+
heap-size: # 1GB
22+
entrypoint: # /app-tee-worker-post-compute
2323

2424
ssl:
2525
key-store: ${IEXEC_SMS_SSL_KEYSTORE:/app/ssl-keystore-dev.p12} #iexec-core dev certificate for dev

0 commit comments

Comments
 (0)