Skip to content

Commit 13f260c

Browse files
authored
CRE: CLI 1.8.0 Release (#3602)
* tenant config docs * note about production cre: linked workflow owner vault auth * scriptable init + templates & release notes * added warnings about confidential http request + secrets
1 parent 1f6bb0e commit 13f260c

22 files changed

Lines changed: 437 additions & 205 deletions

public/changelog.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@
398398
}
399399
},
400400
"data": [
401+
{
402+
"category": "release",
403+
"date": "2026-03-26",
404+
"description": "CRE CLI version 1.8.0 is now available. This release adds a tenant context cache (`~/.cre/context.yaml`) after login, scriptable `cre init` for CI pipelines, and `cre templates list --json` for machine-readable template listings.\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.7.0...v1.8.0)",
405+
"title": "CRE CLI v1.8.0 — Tenant Context and Scriptable Init",
406+
"topic": "CRE"
407+
},
401408
{
402409
"category": "release",
403410
"date": "2026-03-26",

src/content/cre/account/cli-login.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "Logging in with the CLI"
55
metadata:
66
description: "Learn how to log in to the CRE CLI: authenticate through your browser, complete 2FA verification, and start using CLI commands."
77
datePublished: "2025-11-04"
8-
lastModified: "2026-02-12"
8+
lastModified: "2026-03-26"
99
---
1010

1111
import { Aside, ClickToZoom } from "@components"
@@ -80,3 +80,5 @@ Login completed successfully
8080
```
8181

8282
Your CLI session is authenticated and ready to use.
83+
84+
In the terminal, the CLI may show **“Fetching user context…”** while it downloads your organization’s tenant configuration from the platform. It then writes **`~/.cre/context.yaml`** (registry manifest: vault gateway URL, registries, secrets auth flows, and related fields). That file is separate from your credentials file (`cre.yaml`). For details and a sanitized example, see [Tenant context cache](/cre/reference/cli/authentication#tenant-context-cache).

src/content/cre/account/managing-auth.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "Managing Authentication"
55
metadata:
66
description: "Manage your CRE CLI sessions: check if you're logged in, handle expired sessions, and securely log out when needed."
77
datePublished: "2025-11-04"
8-
lastModified: "2026-02-12"
8+
lastModified: "2026-03-26"
99
---
1010

1111
import { Aside } from "@components"
@@ -18,6 +18,8 @@ To authenticate your CLI with your CRE account, use the `cre login` command. Thi
1818

1919
For detailed login instructions, see the [Logging in with the CLI](/cre/account/cli-login) guide.
2020

21+
Browser login stores **`~/.cre/cre.yaml`** (credentials) and **`~/.cre/context.yaml`** (cached **tenant context**: registry manifest from the platform, including vault gateway URL and related settings). **`cre logout`** removes both. For a full description and a sample `context.yaml` shape, see [Tenant context cache](/cre/reference/cli/authentication#tenant-context-cache).
22+
2123
## API key authentication
2224

2325
{/* prettier-ignore */}
@@ -70,7 +72,7 @@ To check your deploy access status or submit a request, see [Requesting Deploy A
7072

7173
## Logging out
7274

73-
To explicitly end your CLI session and remove your stored credentials, use the `cre logout` command:
75+
To explicitly end your CLI session and remove your stored credentials **and cached tenant context** (`context.yaml`), use the `cre logout` command:
7476

7577
```bash
7678
cre logout

src/content/cre/capabilities/confidential-http-go.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ This approach ensures:
4747
| **Request body** | Template-based injection: secrets referenced in the request body (e.g., `{{.myApiKey}}`) are resolved inside the enclave, so sensitive values never appear in workflow memory. |
4848
| **Response body** | Optionally encrypted. When `EncryptOutput` is enabled, the full response is [AES-GCM](https://en.wikipedia.org/wiki/Galois/Counter_Mode) encrypted before leaving the enclave. |
4949

50+
<Aside type="caution" title="Do not inject sensitive values into the request as plain workflow strings">
51+
**Credentials:** List sensitive values in **`VaultDonSecrets`** and reference them only with **`{{.key}}` placeholders**. Secrets read via **`runtime.GetSecret()`** (or any string you build in workflow code) and pasted into headers or body are handled in **Workflow DON** execution, not enclave-only. See [Making Confidential Requests (Go)](/cre/guides/workflow/using-confidential-http-client/making-requests-go#step-4-implement-the-request-logic).
52+
53+
**Scope:** The enclave executes the **outbound HTTP request** and template resolution—not arbitrary workflow logic. Using `confidentialhttp.Client` does not make the rest of your workflow confidential compute.
54+
55+
</Aside>
56+
5057
## Use cases
5158

5259
### Credential isolation

src/content/cre/capabilities/confidential-http-ts.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ This approach ensures:
4747
| **Request body** | Template-based injection: secrets referenced in the request body (e.g., `{{.myApiKey}}`) are resolved inside the enclave, so sensitive values never appear in workflow memory. |
4848
| **Response body** | Optionally encrypted. When `EncryptOutput` is enabled, the full response is [AES-GCM](https://en.wikipedia.org/wiki/Galois/Counter_Mode) encrypted before leaving the enclave. |
4949

50+
<Aside type="caution" title="Do not inject sensitive values into the request as plain workflow strings">
51+
**Credentials:** List sensitive values in **`vaultDonSecrets`** and reference them only with **`{{.key}}` placeholders**. Secrets read via **`runtime.getSecret()`** (or any string you build in workflow code) and pasted into headers or body are handled in **Workflow DON** execution, not enclave-only. See [Making Confidential Requests (TypeScript)](/cre/guides/workflow/using-confidential-http-client/making-requests-ts#step-4-implement-the-request-and-wire-it-into-your-workflow).
52+
53+
**Scope:** The enclave executes the **outbound HTTP request** and template resolution—not arbitrary workflow logic. Using `ConfidentialHTTPClient` does not make the rest of your workflow confidential compute.
54+
55+
</Aside>
56+
5057
## Use cases
5158

5259
### Credential isolation

src/content/cre/getting-started/part-1-project-setup-go.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pageId: "getting-started-part-1"
77
metadata:
88
description: "Getting started Part 1 (Go): set up your first CRE project, explore the structure, and run a successful workflow simulation."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-01-14"
10+
lastModified: "2026-03-26"
1111
---
1212

1313
import { Aside, CopyText, CodeHighlightBlock } from "@components"
@@ -89,6 +89,11 @@ The CRE CLI provides an `init` command to scaffold a new project. It's an intera
8989

9090
The CLI will then create a new `onchain-calculator` directory and initialize your first workflow within it.
9191

92+
{/* prettier-ignore */}
93+
<Aside type="note" title="Scriptable init">
94+
Prefer a **non-interactive** or **CI** flow? The CLI supports **`cre init --non-interactive`** and related flags—see [Project setup commands](/cre/reference/cli/project-setup).
95+
</Aside>
96+
9297
## Step 3: Explore the generated files
9398

9499
The `init` command creates a directory with a standard structure and generates your first workflow code. Let's explore what was created.

src/content/cre/getting-started/part-1-project-setup-ts.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pageId: "getting-started-part-1"
77
metadata:
88
description: "Getting started Part 1 (TypeScript): set up your first CRE project, explore the structure, and run a successful workflow simulation."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-01-20"
10+
lastModified: "2026-03-26"
1111
---
1212

1313
import { Aside, CopyText, CodeHighlightBlock } from "@components"
@@ -89,6 +89,11 @@ The CRE CLI provides an `init` command to scaffold a new project. It's an intera
8989

9090
The CLI will then create a new `onchain-calculator` directory and initialize your first workflow within it.
9191

92+
{/* prettier-ignore */}
93+
<Aside type="note" title="Scriptable init">
94+
Prefer a **non-interactive** or **CI** flow? The CLI supports **`cre init --non-interactive`** and related flags—see [Project setup commands](/cre/reference/cli/project-setup).
95+
</Aside>
96+
9297
## Step 3: Explore the generated files
9398

9499
The `init` command creates a directory with a standard structure and generates your first workflow code. Let's explore what was created.

src/content/cre/guides/workflow/secrets/index.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date: Last Modified
55
metadata:
66
description: "Secure your API keys and credentials: learn how to manage secrets safely in CRE for both simulated and deployed workflows."
77
datePublished: "2025-11-04"
8-
lastModified: "2025-11-04"
8+
lastModified: "2026-03-26"
99
---
1010

1111
import { Aside, CodeHighlightBlockMulti } from "@components"
@@ -42,6 +42,8 @@ Your workflow environment determines how you manage secrets:
4242
- Your workflow retrieves secrets from the Vault at runtime
4343
- **Vault DON required**
4444

45+
**Production CRE** supports **only** the **linked workflow owner** authorization model for `cre secrets`. Alternate vault authorization is **not** available in production and currently exist only in **non-production** environments.
46+
4547
**→ Follow this guide:** [Using Secrets with Deployed Workflows](/cre/guides/workflow/secrets/using-secrets-deployed)
4648

4749
### 3. Secure secret management (Best practice)

src/content/cre/guides/workflow/using-confidential-http-client/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ import { Aside } from "@components"
1313

1414
The CRE SDK provides a Confidential HTTP client that allows your workflows to interact with external APIs while keeping sensitive data private. Requests execute inside a secure enclave, secrets are injected via templates, and responses can optionally be encrypted.
1515

16-
For a conceptual overview of what Confidential HTTP is and how it differs from the regular HTTP capability, see [The Confidential HTTP Capability](/cre/capabilities/confidential-http).
16+
<Aside type="caution" title="Read this before putting sensitive data in Confidential HTTP requests">
17+
**Confidential HTTP does not automatically protect credentials you load with `runtime.getSecret()` / `runtime.GetSecret()`** and then paste into headers or body as plaintext. For Vault DON–style isolation, use **`vaultDonSecrets` / `VaultDonSecrets`** and **`{{.key}}` templates** only. The step-by-step guide below explains the correct pattern and common mistakes.
18+
</Aside>
19+
20+
For **why** you might need Confidential HTTP—what stays off Workflow DON nodes, and [when to use it vs. regular HTTP](/cre/capabilities/confidential-http#when-to-use-confidential-http-vs-regular-http)—see [The Confidential HTTP capability](/cre/capabilities/confidential-http#whats-kept-confidential).
1721

1822
## Guides
1923

src/content/cre/guides/workflow/using-confidential-http-client/making-requests-go.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ metadata:
1212

1313
import { Aside } from "@components"
1414

15-
The `confidentialhttp.Client` is the SDK's interface for the underlying [Confidential HTTP Capability](/cre/capabilities/confidential-http). It allows your workflow to make privacy-preserving API calls where secrets are injected inside a secure enclave and responses can be optionally encrypted.
15+
`confidentialhttp.Client` implements the [Confidential HTTP capability](/cre/capabilities/confidential-http-go). Use it when an outbound call should carry [sensitive credentials or request fields](/cre/capabilities/confidential-http-go#whats-kept-confidential) without assembling them as plain strings in workflow code on every node—see [when to use Confidential vs. regular HTTP](/cre/capabilities/confidential-http-go#when-to-use-confidential-http-vs-regular-http). For those values, use **`VaultDonSecrets`** with **`{{.key}}`** placeholders only; **`runtime.GetSecret()`** in headers or body follows a different trust boundary.
1616

1717
Unlike the regular [`http.Client`](/cre/reference/sdk/http-client), the Confidential HTTP client:
1818

1919
- Executes the request in a secure **enclave** (not on each node individually)
20-
- Injects secrets from the **Vault DON** using template syntax
20+
- Resolves **`VaultDonSecrets`** into the request via **Vault DON** template syntax
2121
- Optionally **encrypts the response** before returning it to your workflow
2222

2323
## Prerequisites
@@ -139,9 +139,11 @@ func makeConfidentialRequest(config Config, runtime cre.Runtime) (Result, error)
139139
}
140140
```
141141

142-
<Aside type="note" title="Alphabetic secret ordering required">
143-
When using multiple secrets, pass them into `VaultDonSecrets` in alphabetical order by key. The Vault DON processes
144-
secrets in a canonical order to ensure consistent behavior across nodes during execution.
142+
<Aside type="caution" title="Do not assemble sensitive request data in workflow code">
143+
Register API credentials in the Vault DON, add them to **`VaultDonSecrets`**, and reference them **only** with **`{{.key}}` placeholders** in headers or body—not with plaintext from **`runtime.GetSecret()`** or other workflow-built strings (those run in **Workflow DON** execution on every node). See [Using secrets with deployed workflows](/cre/guides/workflow/secrets/using-secrets-deployed).
144+
145+
With **multiple** secrets, list **`VaultDonSecrets`** keys in **alphabetical order** (Vault DON canonical ordering).
146+
145147
</Aside>
146148

147149
### Step 5: Wire it into your workflow
@@ -188,7 +190,7 @@ headers := map[string]*confidentialhttp.HeaderValues{
188190
}
189191
```
190192

191-
The template placeholders are resolved inside the enclave. The actual secret values never appear in your workflow code or in node memory.
193+
The template placeholders are resolved inside the enclave. The actual secret values never appear in your workflow code or in node memory. Credentials must be wired through **`VaultDonSecrets`** as in Step 4—not interpolated from **`runtime.GetSecret()`**.
192194

193195
## Response encryption
194196

0 commit comments

Comments
 (0)