@@ -4,7 +4,7 @@ Google Cloud Key Management Service Python Samples
4
4
===============================================================================
5
5
6
6
.. 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
8
8
9
9
10
10
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
14
14
15
15
.. _Google Cloud Key Management Service : https://cloud.google.com/kms/docs/
16
16
17
+
18
+
19
+
20
+
17
21
Setup
18
22
-------------------------------------------------------------------------------
19
23
@@ -32,36 +36,57 @@ Install Dependencies
32
36
.. _Python Development Environment Setup Guide :
33
37
https://cloud.google.com/python/setup
34
38
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 +.
36
40
37
41
.. code-block :: bash
38
42
39
43
$ virtualenv env
40
44
$ source env/bin/activate
41
45
42
- #. Install the dependencies needed to run the samples.
43
-
44
- .. code-block :: bash
45
-
46
- $ pip install -r requirements.txt
47
46
48
47
.. _pip : https://pip.pypa.io/
49
48
.. _virtualenv : https://virtualenv.pypa.io/
50
49
50
+ Samples
51
+ -------------------------------------------------------------------------------
51
52
53
+ Verify attestations and certificate chains for keys generated by Cloud HSM
54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
52
55
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
53
58
54
59
55
60
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
+
58
83
59
84
60
85
Verify attestations for keys generated by Cloud HSM
61
86
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62
87
63
88
.. 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
65
90
66
91
67
92
@@ -72,12 +97,11 @@ To run this sample:
72
97
73
98
$ python verify_attestation.py
74
99
75
-
76
100
usage: verify_attestation.py [-h] attestation_file bundle_file
77
101
78
102
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.
81
105
82
106
positional arguments:
83
107
attestation_file Name of attestation file.
@@ -90,8 +114,4 @@ To run this sample:
90
114
91
115
92
116
93
-
94
-
95
-
96
-
97
117
.. _Google Cloud SDK : https://cloud.google.com/sdk/
0 commit comments