Skip to content

Commit cdcc24b

Browse files
DOCSP-38348 added ak8so ssdlc steps (#96)
* added ak8so ssdlc steps (cherry picked from commit 75e4513)
1 parent 3781352 commit cdcc24b

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed

source/ak8so-get-started.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ To learn more, see :ref:`ak8so-compatibility-ref`.
5353
:titlesonly:
5454

5555
Quick Start </ak8so-quick-start>
56+
Verify Integrity of Packages </ak8so-verify-packages>
5657
Helm Charts Quick Start </ak8so-quick-start-helm>
5758
Atlas for Government </ak8so-for-gov>
5859
Compatibility </ak8so-compatibility>

source/ak8so-verify-packages.txt

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
.. _ak8so-verify-packages:
2+
3+
======================================================
4+
Verify Integrity of {+ak8so+} Packages
5+
======================================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
Starting in {+ak8so+} 2.2.0, the MongoDB release team
16+
digitally signs {+ak8so+} packages to certify that they are valid and
17+
unaltered MongoDB releases.
18+
19+
You can verify {+ak8so+} packages using a :ref:`makefile rule
20+
<verify-with-makefile-rule>`, or :ref:`cosign <verify-with-cosign>`.
21+
22+
Prerequisites
23+
-------------
24+
25+
Before you can verify {+ak8so+} packages, you must have a local copy of
26+
:github:`the Atlas Kubernetes Operator repository <mongodb/mongodb-atlas-kubernetes>`.
27+
28+
.. _verify-with-makefile-rule:
29+
30+
Verify with Makefile Rule
31+
-------------------------
32+
33+
The makefile rule ``verify`` verifies an {+ak8so+} multi-architecture
34+
image's signature.
35+
36+
Run the following command to verify with the signatures at the
37+
``mongodb/signatures`` MongoDB registry. Replace the following
38+
placeholders with your values:
39+
40+
.. list-table::
41+
:widths: 25 75
42+
:header-rows: 1
43+
44+
* - Placeholder
45+
- Description
46+
47+
* - ``IMG``
48+
- The image reference you want to verify.
49+
50+
* - ``SIGNATURE_REPO``
51+
- The repository that contains all the signatures you want to
52+
verify against.
53+
54+
.. code-block::
55+
:copyable: true
56+
57+
make verify {IMG}=mongodb/mongodb-atlas-kubernetes-operator:2.2.0 {SIGNATURE_REPO}=mongodb/signatures
58+
59+
If the command is successful, it prints ``VERIFIED OK``. Otherwise, it
60+
prints an error such as ``Error: no matching signatures``.
61+
62+
.. _verify-with-cosign:
63+
64+
Verify with Cosign
65+
------------------
66+
67+
.. procedure::
68+
69+
.. step:: Install `Cosign <https://docs.sigstore.dev/system_config/installation/>`__.
70+
71+
.. step:: Obtain our signing key.
72+
73+
Run the following command to obtain the signing key from our team to
74+
verify the signatures against:
75+
76+
.. code-block::
77+
78+
curl -LO https://cosign.mongodb.com/atlas-kubernetes-operator.pem
79+
80+
.. step:: Obtain the image reference you want to verify.
81+
82+
Cosign prefers the image reference to include the SHA, such as the following:
83+
84+
.. code-block::
85+
:copyable: false
86+
87+
mongodb/mongodb-atlas-kubernetes-operator@sha256:c7420df24f236831d21cd591c32aeafcd41787382eb093afcc2ce456c30f3a17
88+
89+
.. step:: Verify the package.
90+
91+
Run the following command to verify the {+ak8so+} package. Replace the following placeholders with your values:
92+
93+
.. list-table::
94+
:widths: 25 75
95+
:header-rows: 1
96+
97+
* - Placeholder
98+
- Description
99+
100+
* - ``IMG``
101+
- The image reference you want to verify.
102+
103+
* - ``KEY_FILENAME``
104+
- The name of the file you downloaded the signature key PEM to.
105+
106+
.. code-block::
107+
108+
COSIGN_REPOSITORY=mongodb/signatures cosign verify --insecure-ignore-tlog --key="${KEY_FILENAME}" "${IMG}" && echo PASS
109+
110+
If the command is successful, it prints ``PASS``. Otherwise, it
111+
prints an error such as ``Error: no matching signatures``.

0 commit comments

Comments
 (0)