이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 5. Attesting and validating a container image


Before Enterprise Contract can validate your signed container image, you must first create SLSA provenance and associate it with your container image. Provenance is the verifiable information about software artifacts, including where, when, and how a given software "link" in a supply chain was produced. For more information about Supply-chain Levels for Software Artifacts (SLSA) provenance, see SLSA Provenance.

Prerequisites

  • A signed container image.
  • Access to the OpenShift web console.
  • A working Red Hat Trusted Artifact Signer installation running on OpenShift version 4.13 or later.
  • A workstation with the cosign and oc binary files installed.

Procedure

  1. Create a SLSA provenance predicate.json file; for example:

    echo '{
     "builder": {
       "id": "https://localhost/dummy-id"
     },
     "buildType": "https://localhost/dummy-type",
     "invocation": {},
     "buildConfig": {},
     "metadata": {
       "buildStartedOn": "2023-09-25T16:26:44Z",
       "buildFinishedOn": "2023-09-25T16:28:59Z",
       "completeness": {
         "parameters": false,
         "environment": false,
         "materials": false
       },
       "reproducible": false
     },
     "materials": []
    }
    ' > predicate.json
    Copy to Clipboard Toggle word wrap
  2. Sign and attest the predicate.json file you just created; for example:

    cosign attest -y --fulcio-url=$FULCIO_URL \
       --rekor-url=$REKOR_URL \
       --oidc-issuer=$OIDC_ISSUER_URL \
       --predicate predicate.json \
       --type slsaprovenance $IMAGE
    Copy to Clipboard Toggle word wrap

    Keycloak opens to automatically authenticate you based on your login when you signed your container image.

  3. Verify the signature and attestation with Enterprise Contract, for example:

    ec validate image --image $IMAGE \
       --certificate-identity-regexp '.*' \
       --certificate-oidc-issuer-regexp '.*' \
       --output yaml --show-successes
    Copy to Clipboard Toggle word wrap
Important

Be as specific as possible when you run the ec validate image command so that each signature matches the expected identity.

Verification

  • When Enterprise Contract has validated your container image, a detailed report of all Enterprise Contract verifications and signatures opens.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat