-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document HashiCorp Vault Integration
- Loading branch information
1 parent
8027e53
commit f05652a
Showing
14 changed files
with
218 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
214 changes: 38 additions & 176 deletions
214
docs/software-supply-chain-assurance/sbom/generate-sbom.md
Large diffs are not rendered by default.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
docs/software-supply-chain-assurance/shared/artifact-source.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
<Tabs> | ||
<TabItem value="dockerhub" label="DockerHub" default> | ||
|
||
* **Container Registry:** Select the [Docker Registry connector](/docs/platform/connectors/cloud-providers/ref-cloud-providers/docker-registry-connector-settings-reference) that is configured for the DockerHub container registry where the artifact is stored. | ||
|
||
* **Image:** Enter the name of your image with tag, such as `repo-name:tag`. | ||
|
||
</TabItem> | ||
|
||
<TabItem value="ecr" label="ECR" default> | ||
|
||
* **Container Registry:** Select the [Docker Registry connector](/docs/platform/connectors/cloud-providers/ref-cloud-providers/docker-registry-connector-settings-reference) that is configured for the Elastic container registry where the artifact is stored. | ||
|
||
* **Image:** Enter the name of your image with tag for the image for which you're generating an SBOM, such as `my-docker-repo/my-artifact:latest`. | ||
|
||
* **Region:** The geographical location of your ECR repository. | ||
|
||
* **Account ID:** The unique identifier associated with your AWS account. | ||
|
||
</TabItem> | ||
|
||
<TabItem value="gcr" label="GCR" default> | ||
|
||
* **Container Registry:** Select the [Docker Registry connector](/docs/platform/connectors/cloud-providers/ref-cloud-providers/docker-registry-connector-settings-reference) that is configured for the Google container registry where the artifact is stored. | ||
|
||
* **Image:** Enter the name of your image with tag for which you're generating the SBOM, example `docker-image:tag`. | ||
|
||
* **Host:** Enter your GCR Host name. The Host name is regional-based. For instance, a common Host name is `gcr.io`, which serves as a multi-regional hostname for the United States. | ||
|
||
* **Project ID:** Enter the unique identifier of your Google Cloud Project. The Project-ID is a distinctive string that identifies your project across Google Cloud services. example: `my-gcp-project` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="gar" label="GAR" default> | ||
|
||
* **Container Registry:** Select the [Docker Registry connector](/docs/platform/connectors/cloud-providers/ref-cloud-providers/docker-registry-connector-settings-reference) that is configured for the Google artifact registry where the artifact is stored. | ||
|
||
* **Image:** Enter the name of your image with tag for which you're generating the SBOM, example `repository-name/image:tag`. | ||
|
||
* **Host:** Enter your GAR Host name. The Host name is regional-based. For example, `us-east1-docker.pkg.dev`. | ||
|
||
* **Project ID:** Enter the unique identifier of your Google Cloud Project. The Project-ID is a distinctive string that identifies your project across Google Cloud services. example: `my-gcp-project` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="acr" label="ACR" default> | ||
|
||
* **Container Registry:** Select the [Docker Registry connector](/docs/platform/connectors/cloud-providers/ref-cloud-providers/docker-registry-connector-settings-reference) that is configured for the Azure container registry where the artifact is stored. | ||
|
||
* **Image:** Enter your image details in the format `<registry-login-server>/<repository>:<tag>`. The `<registry-login-server>` is a fully qualified name of your Azure Container Registry. It typically follows the format `<registry-name>.azurecr.io`, where `<registry-name>` is the name you have given to your container registry instance in Azure. Example input: `automate.azurecr.io/acr:test` | ||
|
||
* **Subscription Id:** Enter the unique identifier that is associated with your Azure subscription. | ||
|
||
</TabItem> | ||
|
||
<TabItem value="Repository" label="Repository"> | ||
|
||
:::info | ||
|
||
The **Repository** option requires that your repository is cloned into the stage workspace before the SBOM Orchestration step runs. There are several ways you can do this: | ||
* Clone the codebase by default, such as a [Build stage's default codebase](/docs/continuous-integration/use-ci/codebase-configuration/create-and-configure-a-codebase). | ||
* Add a [Git Clone step](https://developer.harness.io/docs/continuous-delivery/x-platform-cd-features/cd-steps/containerized-steps/git-clone-step/) or [Run step](https://developer.harness.io/docs/continuous-delivery/x-platform-cd-features/cd-steps/containerized-steps/run-step/) to the Deploy stage. | ||
* Add a [Git Clone step or Run step to a Build stage](/docs/continuous-integration/use-ci/codebase-configuration/clone-and-process-multiple-codebases-in-the-same-pipeline). | ||
|
||
::: | ||
* **Repository URL:** The Repository URL you've configured for cloning into the workspace. | ||
* **Source Path:** Leave blank or enter a path (in the repository) for which you want to generate SBOM. Use this setting to generate SBOM for a specific section of your code repo, rather than your entire repo. The path must start with `/`. | ||
For example, if your repository URL is `https://github.com/username/repo`, and you want to generate SBOM for `https://github.com/username/repo/service-core/source`, then enter `/service-core/source` for **Source Path**. | ||
To generate an SBOM for the entire repository, leave this field empty. | ||
* **Git Branch:** The branch of the repository for which you want to generate the SBOM. | ||
* **Workspace:** If you cloned the codebase to a different directory than the root workspace directory (`/harness`), enter the path to the subdirectory using the format `/harness/PATH/TO/SUBDIRECTORY`. Leave this field empty if you cloned your codebase into the default directory (`/harness`). Usually, your codebase is only cloned into a non-default directory if you are [cloning multiple codebases](/docs/continuous-integration/use-ci/codebase-configuration/clone-and-process-multiple-codebases-in-the-same-pipeline) into a pipeline. | ||
|
||
</TabItem> | ||
</Tabs> |
44 changes: 44 additions & 0 deletions
44
docs/software-supply-chain-assurance/shared/cosign-attestation-options.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
import CosignKeyGeneration from '/docs/software-supply-chain-assurance/shared/generate-cosign-key-pair.md'; | ||
|
||
<Tabs> | ||
<TabItem value="Cosign" label="Cosign"> | ||
|
||
To perform attestation with **Cosign** selected, you need a key pair. Follow the instructions below to generate the key pair. | ||
|
||
<details> | ||
<summary>Generate key pairs using Cosign for SBOM attestation</summary> | ||
|
||
<CosignKeyGeneration /> | ||
|
||
</details> | ||
|
||
- **Private Key**: Input your Private key from the [Harness file secret](/docs/platform/secrets/add-file-secrets). | ||
- **Password**: Input your Password for the Private key from the [Harness file secret](/docs/platform/secrets/add-file-secrets). | ||
|
||
</TabItem> | ||
|
||
<TabItem value="Cosign with Secret Manager" label="Cosign with Secret Manager"> | ||
|
||
In this mode, you can pass your **Cosign keys** using a **Secret Manager**. Currently, SCS supports only the **HashiCorp Vault** secret manager. You can connect your Vault with Harness using the [Harness HashiCorp Vault connector](/docs/platform/secrets/secrets-management/add-hashicorp-vault/). Here are the key points to consider when connecting your Vault: | ||
|
||
1. **Enable the Transit Secrets Engine** on your HashiCorp Vault. This is essential for key management and cryptographic operations. | ||
2. Configure your HashiCorp Vault connector using the following authentication methods [**AppRole**](/docs/platform/secrets/secrets-management/add-hashicorp-vault/#option-app-role), [**Token**](/docs/platform/secrets/secrets-management/add-hashicorp-vault/#option-token), [**Vault Agent**](/docs/platform/secrets/secrets-management/add-hashicorp-vault/#option-vault-agent) | ||
3. Create a Cosign key pair of type `ecdsa-p256` in the Transit Secrets Engine. You can do this in two ways: | ||
- **CLI**: Run the command: | ||
```bash | ||
vault write -f <transit_name>/<key_name> type=ecdsa-p256 | ||
``` | ||
- **Vault UI**: Create the key pair directly from the Vault interface. | ||
4. Ensure the Vault token generated has the **[required policy](https://docs.sigstore.dev/cosign/key_management/overview/#hashicorp-vault)** applied for Cosign to perform attestation operations. | ||
|
||
Configure the following fields in the step to perform the attestation | ||
|
||
- **Connector**: Select the HashiCorp Vault connector. | ||
- **Key**: Enter the path to the Transit Secrets Engine in your HashiCorp Vault where the keys are stored. | ||
|
||
</TabItem> | ||
|
||
</Tabs> |
21 changes: 21 additions & 0 deletions
21
docs/software-supply-chain-assurance/shared/cosign-verification-options.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
<Tabs> | ||
<TabItem value="Cosign" label="Cosign"> | ||
|
||
To perform the attestation verification with Cosign selected, you need to pass the key from the Harness Secret Manager | ||
- **Public Key**: Input your Public key from the [Harness file secret](/docs/platform/secrets/add-file-secrets). | ||
|
||
</TabItem> | ||
|
||
<TabItem value="Cosign with Secret Manager" label="Cosign with Secret Manager"> | ||
|
||
If you used **HashiCorp Vault** as your Secret Manager for attestation, you can also use it for verifying the attestation. | ||
|
||
- **Connector**: Select the same HashiCorp Vault connector that was used during the attestation process. | ||
- **Key**: Enter the path to the Transit Secrets Engine in your HashiCorp Vault where your **public key** is stored. This should be the same path used for the attestation process. Note that **HashiCorp Vault** does not allow viewing the public key directly. | ||
|
||
</TabItem> | ||
|
||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-193 KB
docs/software-supply-chain-assurance/slsa/static/slsa-generation-step.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-151 KB
docs/software-supply-chain-assurance/slsa/static/slsa-ver-dockerhub.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.