Skip to content

Commit dee31ea

Browse files
bkuangrsamborski
authored andcommitted
docs: update README for attestation verification scripts (#151)
1 parent 2087966 commit dee31ea

File tree

3 files changed

+41
-19
lines changed

3 files changed

+41
-19
lines changed

kms/attestations/README.rst

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Google Cloud Key Management Service Python Samples
44
===============================================================================
55

66
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=kms/attestations/README.rst
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/python-kms&page=editor&open_in_editor=samples/attestations/README.rst
88

99

1010
This directory contains samples for Google Cloud Key Management Service. The `Cloud Key Management Service`_ allows you to create, import, and manage cryptographic keys and perform cryptographic operations in a single centralized cloud service.
@@ -14,6 +14,10 @@ This directory contains samples for Google Cloud Key Management Service. The `Cl
1414

1515
.. _Google Cloud Key Management Service: https://cloud.google.com/kms/docs/
1616

17+
18+
19+
20+
1721
Setup
1822
-------------------------------------------------------------------------------
1923

@@ -32,36 +36,57 @@ Install Dependencies
3236
.. _Python Development Environment Setup Guide:
3337
https://cloud.google.com/python/setup
3438

35-
#. Create a virtualenv. Samples are compatible with Python 3.6+.
39+
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
3640

3741
.. code-block:: bash
3842
3943
$ virtualenv env
4044
$ source env/bin/activate
4145
42-
#. Install the dependencies needed to run the samples.
43-
44-
.. code-block:: bash
45-
46-
$ pip install -r requirements.txt
4746
4847
.. _pip: https://pip.pypa.io/
4948
.. _virtualenv: https://virtualenv.pypa.io/
5049

50+
Samples
51+
-------------------------------------------------------------------------------
5152

53+
Verify attestations and certificate chains for keys generated by Cloud HSM
54+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5255

56+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
57+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/python-kms&page=editor&open_in_editor=samples/attestations/verify_attestation_chains.py,samples/attestations/README.rst
5358

5459

5560

56-
Samples
57-
-------------------------------------------------------------------------------
61+
62+
To run this sample:
63+
64+
.. code-block:: bash
65+
66+
$ python verify_attestation_chains.py
67+
68+
usage: verify_attestation_chains.py [-h] [--certificates CERTIFICATES]
69+
[--attestation ATTESTATION]
70+
71+
This application verifies HSM attestations using certificate chains
72+
obtained from Cloud HSM and the HSM manufacturer.
73+
74+
For more information, visit https://cloud.google.com/kms/docs/attest-key.
75+
76+
optional arguments:
77+
-h, --help show this help message and exit
78+
--certificates CERTIFICATES
79+
The certificate chains filename.
80+
--attestation ATTESTATION
81+
The attestation filename.
82+
5883
5984
6085
Verify attestations for keys generated by Cloud HSM
6186
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6287

6388
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
64-
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=kms/attestations/verify_attestation.py,kms/attestations/README.rst
89+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=samples/attestations/verify_attestation.py,samples/attestations/README.rst
6590

6691

6792

@@ -72,12 +97,11 @@ To run this sample:
7297
7398
$ python verify_attestation.py
7499
75-
76100
usage: verify_attestation.py [-h] attestation_file bundle_file
77101
78102
This application verifies HSM attestations using certificate bundles obtained
79-
from Cloud HSM. For more information, visit
80-
https://cloud.google.com/kms/docs/attest-key.
103+
from Cloud HSM. For more information, visit https://cloud.google.com/kms/docs
104+
/attest-key.
81105
82106
positional arguments:
83107
attestation_file Name of attestation file.
@@ -90,8 +114,4 @@ To run this sample:
90114
91115
92116
93-
94-
95-
96-
97117
.. _Google Cloud SDK: https://cloud.google.com/sdk/

kms/attestations/README.rst.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ samples:
1919
file: verify_attestation.py
2020
show_help: True
2121

22-
folder: kms/attestations
22+
folder: samples/attestations
23+

kms/attestations/verify_attestation_chains.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16-
"""This application verifies HSM certificate chains.
16+
"""This application verifies HSM attestations using certificate chains
17+
obtained from Cloud HSM and the HSM manufacturer.
1718
1819
For more information, visit https://cloud.google.com/kms/docs/attest-key.
1920
"""

0 commit comments

Comments
 (0)