You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/getting-started/attestation-crafting.md
+31-24Lines changed: 31 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ title: Attestation Crafting
10
10
11
11
## Introduction
12
12
13
-
In the previous section, we created a workflow definition, a contract and a robot account in the control plane. Next, we'll perform an attestation crafting example using Chainloop.
13
+
In the previous section, we created a workflow definition, a contract and an API Token in the control plane. Next, we'll perform an attestation crafting example using Chainloop.
14
14
15
15
The lifecycle of a crafting process has the following stages: `init`, `add`, `push` or `reset`. As you can see, it mimics the workflow of a commonly used version control tool, and this is not by coincidence. Chainloop wants to make sure that the tooling feels familiar to developers and that no security jargon leaks into this stage of the process. For a developer, creating an attestation must be as simple as initializing it, adding materials to it and pushing it.
16
16
@@ -23,21 +23,21 @@ During this stage, the crafting tool will contact the control plane to
23
23
- Signal the intent of starting an attestation.
24
24
- Retrieve the associated workflow contract.
25
25
- If the contract has a specified runner context type, check that we are compliant with it.
26
-
- Initialize environment variables explicitly stated in the contract.
27
-
28
-
:::note
29
-
In the future, during this initialization stage, we will also retrieve ephemeral signing keys for keyless signing/verification
30
-
:::
26
+
- Initialize environment variables, explicitly stated in the contract and other contextual information.
31
27
32
28
#### attestation add
33
29
34
-
Add the **materials required by the contract**, i.e artifact, OCI image ref, SBOM.
30
+
Add the **materials required by the contract** and any other additional pieces of evidence, i.e artifact, OCI image ref, SBOM.
35
31
36
32
The `add` command knows how to handle each kind of material transparently to the user.
37
33
38
-
- STRING kinds will be injected as is.
34
+
For example
35
+
39
36
- ARTIFACT kinds will be uploaded to your artifact registry and referenced by their content digest.
40
37
- CONTAINER_IMAGE kinds will be resolved to obtain their repository digests using the local authentication keychain.
38
+
- SBOM_CYCLONEDX_JSON will validate the right SBOM format and upload it to the artifact registry.
39
+
40
+
For a complete list of available material types, see the [reference](/reference/operator/contract#material-schema).
41
41
42
42
#### attestation push
43
43
@@ -47,7 +47,7 @@ This stage will take the current crafting state, validate that it has all the re
47
47
- Push it to the control plane for storage
48
48
49
49
:::note
50
-
Chainlooop leverages Cosign for signing and verifying, so it supports any of its key providers.
50
+
Chainloop leverages Cosign for signing and verifying, so it supports any of its key providers.
51
51
Currently, local file-based `cosign private key` and GCP, AWS, Azure and Hashicorp Vault KMS are supported.
52
52
53
53
In future releases this will not be needed since we will rely on keyless signing and verification.
@@ -63,31 +63,31 @@ See the state of the current crafting process.
63
63
64
64
## Crafting our first attestation locally
65
65
66
-
To create an attestation two things are required, the Chainloop crafting tool and a robot account.
66
+
To create an attestation two things are required, the Chainloop crafting tool and an [API Token](/reference/operator/api-tokens).
67
67
68
68
The crafting tool is currently bundled within Chainloop command line tool. To install it just follow the [installation](installation) instructions.
69
69
70
-
The robot account was created during the [previous step](./workflow-definition#robot-account-creation) and it's required during all the stages of the crafting process. It can be provided via the `--token` flag or the `$CHAINLOOP_TOKEN` environment variable.
71
-
72
-
### Initialization
70
+
The API Token was created during the [previous step](./workflow-definition#api-token-creation) and it's required during all the stages of the crafting process. It can be provided via the `--token` flag or the `$CHAINLOOP_TOKEN` environment variable.
73
71
74
72
```bash
75
73
$ export CHAINLOOP_TOKEN=deadbeef
76
74
```
77
75
76
+
### Initialization
77
+
78
78
#### Options
79
79
80
80
`chainloop attestation init` supports the following options
81
81
82
-
-`--token` token provided by the SecOps team. Alternatively, you can set the `CHAINLOOP_TOKEN` environment variable.
82
+
-`--token` token provided by the SecOps team. Alternatively, you can set the `CHAINLOOP_TOKEN` environment variable (required).
83
+
-`--name` name of the workflow to run the attestation (required).
83
84
-`--revision` of the contract (default: `latest`).
84
-
-`--workflow-name` name of the workflow to run the attestation. This is ignored when authentication is based on robot account and needed for api tokens.
85
85
-`--dry-run`; do not store the attestation in the Control plane, and do not fail if the runner context or required env variables can not be resolved. Useful for development (default: `false`).
86
86
87
87
To initialize a new crafting process just run `attestation init` and the system will retrieve the latest version (if no specific revision is set via the `--revision` flag) of the contract.
@@ -191,14 +191,21 @@ $ chainloop attestation status --full
191
191
### Encode, sign and push attestation
192
192
193
193
:::note
194
-
Chainlooop leverages Cosign for signing and verifying, so it supports any of its key providers.
194
+
Chainloop leverages Cosign for signing and verifying, so it supports any of its key providers.
195
195
Currently, local file-based `cosign private key` and GCP, AWS, Azure and Hashicorp Vault KMS are supported.
196
196
In future releases this will not be needed since we will rely on keyless signing and verification.
197
197
:::
198
198
199
-
Since all the required materials have been attached, a **signed in-toto statement can now be generated and sent for storage**. This example uses AWS KMS for signing:
199
+
Since all the required materials have been attached, a **signed in-toto statement can now be generated and sent for storage**.
Copy file name to clipboardExpand all lines: docs/docs/getting-started/workflow-definition.mdx
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ A workflow represents the identity of any automation, any CI/CD workflow you wan
22
22
23
23
<WorkflowContractIntro />
24
24
25
-
### Robot Accounts
25
+
### Chainloop API Token
26
26
27
-
A robot account is a long-lasting, though revokable, **secret token associated with a Workflow**. It's meant to be used in the target CI/CD pipeline during the attestation process. This token along with the crafting CLI are the only two things development/Apps teams need for the integration.
27
+
A [Chainloop API Token](/reference/operator/api-tokens)is a long-lasting, though revokable, **secret token associated with a Chainloop organization**. It's meant to be used in the target CI/CD pipeline during the attestation process and/or for unatended operations with the controlplane. This token along with the crafting CLI are the only two things development teams need to perform attestations.
28
28
29
29
## Workflow and Contract creation
30
30
@@ -34,7 +34,7 @@ To achieve that, we will need to
34
34
35
35
- Create a new Workflow Contract (optional)
36
36
- Create a Workflow associated with a new or existing Contract
37
-
- Create a Robot account for that Workflow so the integration can happen in the CI.
We could have reached the same result by first creating the contract via `chainloop workflow contract create -f ...` and then attaching it during workflow creation `chainloop workflow create ... --contract deadbeef`
147
147
:::
148
148
149
-
### Robot Account creation
149
+
### API Token Creation
150
150
151
-
The final step is to create a robot account that will be shared with the development team so they can start the integration.
151
+
The final step is to create an API Token that will be shared with the development team so they can start the integration.
152
152
153
153
:::note
154
154
155
-
- Robot accounts are attached to a single workflow. If you create another workflow, another robot account must be created.
156
-
- You can have more than one robot account associated with a workflow.
157
-
- Accounts can be revoked via `chainloop workflow robot-account revoke`command
155
+
- API Tokens are attached to a single organization and can be used to perform attestations in multiple workflows.
156
+
- You can have multiple API Tokens per organization
157
+
- Tokens can be revoked via `chainloop org api-token revoke`command
Copy file name to clipboardExpand all lines: docs/docs/guides/dagger/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Daggerized version of [Chainloop](https://docs.chainloop.dev) that can be used t
17
17
18
18
19
19
- This module requires existing familiarity with Chainloop and its attestation process. Please refer to [this guide](https://docs.chainloop.dev/getting-started/attestation-crafting) to learn more.
20
-
- You need a `token` (aka workflow robot account) [previously generated](https://docs.chainloop.dev/getting-started/workflow-definition#robot-account-creation) by your Chainloop administrator.
20
+
- You need an `API Token`[previously generated](https://docs.chainloop.dev/getting-started/workflow-definition#api-token-creation) by your Chainloop administrator.
Copy file name to clipboardExpand all lines: docs/docs/guides/dependency-track/dependency-track.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,9 @@ There are two steps involved to enable this integration:
43
43
44
44
### Prerequisites
45
45
46
-
**Dependency-Track API token**
46
+
**Dependency-Track API Token**
47
47
48
-
An API token is required for the Chainloop instance to communicate securely with DependencyTrack. The required permissions are `BOM_UPLOAD`, `VIEW_PORTFOLIO` (to validate that the provided project ID exists) and optionally `PROJECT_CREATION_UPLOAD` if `project-auto-creation` is enabled, more on that later.
48
+
An API Token is required for the Chainloop instance to communicate securely with DependencyTrack. The required permissions are `BOM_UPLOAD`, `VIEW_PORTFOLIO` (to validate that the provided project ID exists) and optionally `PROJECT_CREATION_UPLOAD` if `project-auto-creation` is enabled, more on that later.
49
49
50
50
The API Key can be created by going to Settings -> Access Management -> Teams -> Select (or create) a Team -> Set permissions -> Copy API key
Copy file name to clipboardExpand all lines: docs/docs/guides/github-releases/github-releases.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ jobs:
52
52
This workflow will trigger every time a new release is published in your repository. It will collect all the assets from the release page and attest them using Chainloop. The attestation will be stored in the workflow you specify in the `workflow_name` field.
53
53
There are some parameters that you need to provide:
54
54
- `workflow_name`: The name of the workflow in Chainloop where the attestation will be stored.
55
-
- `api_token`: The Chainloop API token to authenticate with the Chainloop API.
55
+
- `api_token`: The Chainloop API Token to authenticate with the Chainloop API.
56
56
- `cosign_key`: The path to the `cosign` key file.
57
57
- `cosign_password`: The passphrase for the `cosign` key.
Copy file name to clipboardExpand all lines: docs/docs/guides/sbom-management/sbom-management.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,9 @@ In the first part, we explain how to:
30
30
This guide makes the following assumptions:
31
31
* You have Chainloop CLI already installed, and you have already authenticated to the Chainloop control plane. Please check [this CLI installation guide](/getting-started/installation) if you don't.
32
32
* You have already added your OCI registry, where all artifacts, metadata, and attestations will be stored. Please learn more about how to do it in [the Account Setup section](/getting-started/setup).
33
-
* You have a Chainloop Workflow, default empty Contract, and Robot Account created as explained in [this document](/getting-started/workflow-definition).
33
+
* You have a Chainloop Workflow, and an API Token created as explained in [this document](/getting-started/workflow-definition).
34
34
* You have a Github Action created for your project in your GitHub repository, which is connected to your Chainloop workflow. The Chainloop Integration Demo Action is a good example. You can check it out [here](https://github.com/chainloop-dev/integration-demo/blob/main/chainloop-demo/github-workflow/release.v1.yaml).
35
-
* Your Chainloop Robot Account Token is set locally and in your GitHub project as the `CHAINLOOP_ROBOT_ACCOUNT` environment variable. The Chainloop CLI uses this token to authenticate with our Control Plane.
35
+
* Your Chainloop API Token is set locally and in your GitHub project as the `CHAINLOOP_TOKEN` environment variable. The Chainloop CLI uses this token to authenticate with our Control Plane.
36
36
* Your Private Key and Private Key Password are exposed locally and in your Github project as the following environment variables. We use this key to sign in-toto attestations for your artifacts, such as SBOMs.
37
37
*`CHAINLOOP_SIGNING_KEY`
38
38
*`CHAINLOOP_SIGNING_PASSWORD`
@@ -79,7 +79,8 @@ Although the workflow run process can be complex, we will highlight the three mo
79
79
### Initializing an attestation
80
80
Before adding and sending SBOMs to Chainloop, initiating the attestation process is necessary.
81
81
```bash
82
-
chainloop attestation init
82
+
# --name sbom-cdx is an example of the name of the workflow registered in Chainloop's control plane
83
+
chainloop attestation init --name sbom-cdx
83
84
```
84
85
### Generating SBOMs
85
86
Generate SBOM with Syft. Running this command locally will probably generate an empty SBOM, but it should be good enough in our example.
0 commit comments