Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kms/attestations/ directory with sample script to verify attestations #3262

Merged
merged 2 commits into from
May 1, 2020

Conversation

bkuang
Copy link
Contributor

@bkuang bkuang commented Apr 2, 2020

This adds a kms/attestations/ directory to hold code samples that deal with attestations and certificates obtained from Cloud HSM. This also adds a verify_attestation.py script to verify attestations using certificate bundles containing one or more certificates.

fixes #3246

@bkuang bkuang requested review from daniel-sanche and a team as code owners April 2, 2020 18:03
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 2, 2020
@mdlinville
Copy link

/assign

Copy link

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also get technical review. :)

kms/attestations/README.rst.in Outdated Show resolved Hide resolved
kms/attestations/README.rst.in Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
@bkuang bkuang requested review from tmatsuo and removed request for a team April 8, 2020 22:00
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
kms/attestations/verify_attestation.py Outdated Show resolved Hide resolved
@bkuang bkuang requested a review from tmatsuo April 9, 2020 13:47
@tmatsuo tmatsuo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 24, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 24, 2020
@tmatsuo
Copy link
Contributor

tmatsuo commented Apr 24, 2020

@bkuang

In case you don't have access to the logs:
Lint fails with

./verify_attestation_test.py:134:1: W391 blank line at end of file

^
./verify_attestation.py:96:1: W391 blank line at end of file

^

Pytho builds failed with:

Program pytest not found.

I think you have to rebase to github master.

@tmatsuo tmatsuo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 25, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 25, 2020
@tmatsuo tmatsuo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 27, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 27, 2020
@tmatsuo tmatsuo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 27, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 27, 2020
Copy link
Contributor

@tmatsuo tmatsuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't point it out in the first pass, but I think it is harmful to completely swallow exceptions.

kms/attestations/verify_attestation.py Show resolved Hide resolved
Copy link
Member

@daniel-sanche daniel-sanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tmatsuo tmatsuo added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 1, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 1, 2020
@tmatsuo tmatsuo merged commit 4dab181 into GoogleCloudPlatform:master May 1, 2020
busunkim96 pushed a commit to busunkim96/python-kms that referenced this pull request Jun 16, 2020
busunkim96 pushed a commit to busunkim96/python-kms that referenced this pull request Jun 16, 2020
busunkim96 pushed a commit to googleapis/python-kms that referenced this pull request Jun 16, 2020
rsamborski pushed a commit that referenced this pull request Nov 8, 2022
…ions [(#3262)](#3262)

Co-authored-by: Benson Kuang <[email protected]>
Co-authored-by: Takashi Matsuo <[email protected]>
rsamborski pushed a commit that referenced this pull request Nov 8, 2022
…ions [(#3262)](#3262)

Co-authored-by: Benson Kuang <[email protected]>
Co-authored-by: Takashi Matsuo <[email protected]>
rsamborski pushed a commit that referenced this pull request Nov 11, 2022
…ions [(#3262)](#3262)

Co-authored-by: Benson Kuang <[email protected]>
Co-authored-by: Takashi Matsuo <[email protected]>
rsamborski pushed a commit that referenced this pull request Nov 14, 2022
…ions [(#3262)](#3262)

Co-authored-by: Benson Kuang <[email protected]>
Co-authored-by: Takashi Matsuo <[email protected]>
dandhlee pushed a commit that referenced this pull request Nov 14, 2022
…ions [(#3262)](#3262)

Co-authored-by: Benson Kuang <[email protected]>
Co-authored-by: Takashi Matsuo <[email protected]>
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create sample scripts for verifying HSM certificates and attestations
7 participants