Skip to content

Commit 6e892e0

Browse files
feat: [google-cloud-confidentialcomputing] A new field attester is added to message .google.cloud.confidentialcomputing.v1.VerifyAttestationRequest (#13543)
- [ ] Regenerate this pull request now. docs: Fixed a typo in `VerifyAttestationRequest` comment PiperOrigin-RevId: 729146278 Source-Link: googleapis/googleapis@2a8bb82 Source-Link: googleapis/googleapis-gen@27ca8af Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbmZpZGVudGlhbGNvbXB1dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiMjdjYThhZjQ3YzhhMGFlYWZjNTcxNWUzZDYyNzVjYWIxNmVkNTE5MCJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent d67f3ed commit 6e892e0

File tree

11 files changed

+98
-12
lines changed

11 files changed

+98
-12
lines changed

packages/google-cloud-confidentialcomputing/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps:
2626
1. `Select or create a Cloud Platform project.`_
2727
2. `Enable billing for your project.`_
2828
3. `Enable the Confidential Computing API.`_
29-
4. `Setup Authentication.`_
29+
4. `Set up Authentication.`_
3030

3131
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
3232
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
3333
.. _Enable the Confidential Computing API.: https://cloud.google.com/confidential-computing
34-
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
34+
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
3535

3636
Installation
3737
~~~~~~~~~~~~

packages/google-cloud-confidentialcomputing/google/cloud/confidentialcomputing/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.15" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-confidentialcomputing/google/cloud/confidentialcomputing_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.15" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-confidentialcomputing/google/cloud/confidentialcomputing_v1/services/confidential_computing/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ async def sample_verify_attestation():
460460
The request object. A request for an OIDC token,
461461
providing all the necessary information
462462
needed for this service to verify the
463-
plaform state of the requestor.
463+
platform state of the requestor.
464464
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
465465
should be retried.
466466
timeout (float): The timeout for this request.

packages/google-cloud-confidentialcomputing/google/cloud/confidentialcomputing_v1/services/confidential_computing/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ def sample_verify_attestation():
879879
The request object. A request for an OIDC token,
880880
providing all the necessary information
881881
needed for this service to verify the
882-
plaform state of the requestor.
882+
platform state of the requestor.
883883
retry (google.api_core.retry.Retry): Designation of what errors, if any,
884884
should be retried.
885885
timeout (float): The timeout for this request.

packages/google-cloud-confidentialcomputing/google/cloud/confidentialcomputing_v1/services/confidential_computing/transports/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def __call__(
524524
The request object. A request for an OIDC token,
525525
providing all the necessary information
526526
needed for this service to verify the
527-
plaform state of the requestor.
527+
platform state of the requestor.
528528
retry (google.api_core.retry.Retry): Designation of what errors, if any,
529529
should be retried.
530530
timeout (float): The timeout for this request.

packages/google-cloud-confidentialcomputing/google/cloud/confidentialcomputing_v1/types/service.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class CreateChallengeRequest(proto.Message):
161161

162162
class VerifyAttestationRequest(proto.Message):
163163
r"""A request for an OIDC token, providing all the necessary
164-
information needed for this service to verify the plaform state
164+
information needed for this service to verify the platform state
165165
of the requestor.
166166
167167
This message has `oneof`_ fields (mutually exclusive fields).
@@ -200,6 +200,9 @@ class VerifyAttestationRequest(proto.Message):
200200
Optional. A collection of optional,
201201
workload-specified claims that modify the token
202202
output.
203+
attester (str):
204+
Optional. An optional indicator of the
205+
attester, only applies to certain products.
203206
"""
204207

205208
td_ccel: "TdxCcelAttestation" = proto.Field(
@@ -238,6 +241,10 @@ class VerifyAttestationRequest(proto.Message):
238241
number=5,
239242
message="TokenOptions",
240243
)
244+
attester: str = proto.Field(
245+
proto.STRING,
246+
number=8,
247+
)
241248

242249

243250
class TdxCcelAttestation(proto.Message):

packages/google-cloud-confidentialcomputing/noxfile.py

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,20 +382,29 @@ def docfx(session):
382382
["python", "upb", "cpp"],
383383
)
384384
def prerelease_deps(session, protobuf_implementation):
385-
"""Run all tests with prerelease versions of dependencies installed."""
385+
"""
386+
Run all tests with pre-release versions of dependencies installed
387+
rather than the standard non pre-release versions.
388+
Pre-releases versions can be installed using
389+
`pip install --pre <package>`.
390+
"""
386391

387392
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
388393
session.skip("cpp implementation is not supported in python 3.11+")
389394

390395
# Install all dependencies
391-
session.install("-e", ".[all, tests, tracing]")
396+
session.install("-e", ".")
397+
392398
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
399+
# Install dependencies for the unit test environment
393400
session.install(*unit_deps_all)
401+
394402
system_deps_all = (
395403
SYSTEM_TEST_STANDARD_DEPENDENCIES
396404
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
397405
+ SYSTEM_TEST_EXTRAS
398406
)
407+
# Install dependencies for the system test environment
399408
session.install(*system_deps_all)
400409

401410
# Because we test minimum dependency versions on the minimum Python
@@ -417,6 +426,7 @@ def prerelease_deps(session, protobuf_implementation):
417426
)
418427
]
419428

429+
# Install dependencies specified in `testing/constraints-X.txt`.
420430
session.install(*constraints_deps)
421431

422432
prerel_deps = [
@@ -458,3 +468,70 @@ def prerelease_deps(session, protobuf_implementation):
458468
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
459469
},
460470
)
471+
472+
473+
@nox.session(python="3.13")
474+
@nox.parametrize(
475+
"protobuf_implementation",
476+
["python", "upb"],
477+
)
478+
def core_deps_from_source(session, protobuf_implementation):
479+
"""Run all tests with local versions of core dependencies installed,
480+
rather than pulling core dependencies from PyPI.
481+
"""
482+
483+
# Install all dependencies
484+
session.install(".")
485+
486+
# Install dependencies for the unit test environment
487+
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
488+
session.install(*unit_deps_all)
489+
490+
# Install dependencies for the system test environment
491+
system_deps_all = (
492+
SYSTEM_TEST_STANDARD_DEPENDENCIES
493+
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
494+
+ SYSTEM_TEST_EXTRAS
495+
)
496+
session.install(*system_deps_all)
497+
498+
# Because we test minimum dependency versions on the minimum Python
499+
# version, the first version we test with in the unit tests sessions has a
500+
# constraints file containing all dependencies and extras that should be installed.
501+
with open(
502+
CURRENT_DIRECTORY
503+
/ "testing"
504+
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
505+
encoding="utf-8",
506+
) as constraints_file:
507+
constraints_text = constraints_file.read()
508+
509+
# Ignore leading whitespace and comment lines.
510+
constraints_deps = [
511+
match.group(1)
512+
for match in re.finditer(
513+
r"^\s*(\S+)(?===\S+)", constraints_text, flags=re.MULTILINE
514+
)
515+
]
516+
517+
# Install dependencies specified in `testing/constraints-X.txt`.
518+
session.install(*constraints_deps)
519+
520+
core_dependencies_from_source = [
521+
"google-api-core @ git+https://github.com/googleapis/python-api-core.git",
522+
"google-auth @ git+https://github.com/googleapis/google-auth-library-python.git",
523+
f"{CURRENT_DIRECTORY}/../googleapis-common-protos",
524+
f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1",
525+
"proto-plus @ git+https://github.com/googleapis/proto-plus-python.git",
526+
]
527+
528+
for dep in core_dependencies_from_source:
529+
session.install(dep, "--ignore-installed", "--no-deps")
530+
531+
session.run(
532+
"py.test",
533+
"tests/unit",
534+
env={
535+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
536+
},
537+
)

packages/google-cloud-confidentialcomputing/samples/generated_samples/snippet_metadata_google.cloud.confidentialcomputing.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-confidentialcomputing",
11-
"version": "0.4.15"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-confidentialcomputing/scripts/fixup_confidentialcomputing_v1_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class confidentialcomputingCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
4242
'create_challenge': ('parent', 'challenge', ),
43-
'verify_attestation': ('challenge', 'tpm_attestation', 'td_ccel', 'sev_snp_attestation', 'gcp_credentials', 'confidential_space_info', 'token_options', ),
43+
'verify_attestation': ('challenge', 'tpm_attestation', 'td_ccel', 'sev_snp_attestation', 'gcp_credentials', 'confidential_space_info', 'token_options', 'attester', ),
4444
}
4545

4646
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:

0 commit comments

Comments
 (0)