|
| 1 | +.. This file is automatically generated. Do not edit this file directly. |
| 2 | +
|
| 3 | +Google Cloud Key Management Service Python Samples |
| 4 | +=============================================================================== |
| 5 | + |
| 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 |
| 8 | + |
| 9 | + |
| 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. |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +.. _Google Cloud Key Management Service: https://cloud.google.com/kms/docs/ |
| 16 | + |
| 17 | +Setup |
| 18 | +------------------------------------------------------------------------------- |
| 19 | + |
| 20 | + |
| 21 | +Install Dependencies |
| 22 | +++++++++++++++++++++ |
| 23 | + |
| 24 | +#. Clone python-docs-samples and change directory to the sample directory you want to use. |
| 25 | + |
| 26 | + .. code-block:: bash |
| 27 | +
|
| 28 | + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| 29 | +
|
| 30 | +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. |
| 31 | + |
| 32 | + .. _Python Development Environment Setup Guide: |
| 33 | + https://cloud.google.com/python/setup |
| 34 | + |
| 35 | +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. |
| 36 | + |
| 37 | + .. code-block:: bash |
| 38 | +
|
| 39 | + $ virtualenv env |
| 40 | + $ source env/bin/activate |
| 41 | +
|
| 42 | +#. Install the dependencies needed to run the samples. |
| 43 | + |
| 44 | + .. code-block:: bash |
| 45 | +
|
| 46 | + $ pip install -r requirements.txt |
| 47 | +
|
| 48 | +.. _pip: https://pip.pypa.io/ |
| 49 | +.. _virtualenv: https://virtualenv.pypa.io/ |
| 50 | + |
| 51 | +Samples |
| 52 | +------------------------------------------------------------------------------- |
| 53 | + |
| 54 | +Verify attestations for keys generated by Cloud HSM |
| 55 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 56 | + |
| 57 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 58 | + :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 |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +To run this sample: |
| 64 | + |
| 65 | +.. code-block:: bash |
| 66 | +
|
| 67 | + $ python verify_attestation.py |
| 68 | +
|
| 69 | + |
| 70 | +
|
| 71 | +
|
| 72 | +
|
| 73 | +
|
| 74 | +.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
0 commit comments