Skip to content

Commit

Permalink
feat: Add additional TokenType options (TOKEN_TYPE_PKI and `TOKEN…
Browse files Browse the repository at this point in the history
…_TYPE_LIMITED_AWS`)

PiperOrigin-RevId: 619305466
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 26, 2024
1 parent 2c24fa5 commit 9b6f3aa
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
17 changes: 15 additions & 2 deletions google/cloud/confidentialcomputing/v1/BUILD.bazel
Expand Up @@ -9,14 +9,17 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "confidentialcomputing_proto",
Expand Down Expand Up @@ -45,6 +48,7 @@ proto_library_with_info(
##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand Down Expand Up @@ -73,8 +77,8 @@ java_gapic_library(
rest_numeric_enums = True,
service_yaml = "confidentialcomputing_v1.yaml",
test_deps = [
"//google/cloud/location:location_java_grpc",
":confidentialcomputing_java_grpc",
"//google/cloud/location:location_java_grpc",
],
transport = "grpc+rest",
deps = [
Expand Down Expand Up @@ -109,6 +113,7 @@ java_gapic_assembly_gradle_pkg(
##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand Down Expand Up @@ -158,6 +163,7 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
Expand Down Expand Up @@ -197,6 +203,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand Down Expand Up @@ -234,6 +241,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand Down Expand Up @@ -264,6 +272,7 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
Expand Down Expand Up @@ -310,6 +319,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand All @@ -320,6 +330,7 @@ load(

csharp_proto_library(
name = "confidentialcomputing_csharp_proto",
extra_opts = [],
deps = [":confidentialcomputing_proto"],
)

Expand All @@ -336,6 +347,7 @@ csharp_gapic_library(
grpc_service_config = "confidentialcomputing_v1_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "confidentialcomputing_v1.yaml",
transport = "grpc+rest",
deps = [
":confidentialcomputing_csharp_grpc",
":confidentialcomputing_csharp_proto",
Expand All @@ -355,6 +367,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down
6 changes: 6 additions & 0 deletions google/cloud/confidentialcomputing/v1/service.proto
Expand Up @@ -79,6 +79,12 @@ enum TokenType {

// OpenID Connect (OIDC) token type
TOKEN_TYPE_OIDC = 1;

// Public Key Infrastructure (PKI) token type
TOKEN_TYPE_PKI = 2;

// Limited claim token type for AWS integration
TOKEN_TYPE_LIMITED_AWS = 3;
}

// A Challenge from the server used to guarantee freshness of attestations
Expand Down
28 changes: 22 additions & 6 deletions google/cloud/confidentialcomputing/v1alpha1/BUILD.bazel
Expand Up @@ -9,14 +9,17 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "confidentialcomputing_proto",
Expand Down Expand Up @@ -44,6 +47,7 @@ proto_library_with_info(
##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand Down Expand Up @@ -108,6 +112,7 @@ java_gapic_assembly_gradle_pkg(
##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand Down Expand Up @@ -156,6 +161,7 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
Expand All @@ -170,7 +176,8 @@ py_gapic_library(
rest_numeric_enums = True,
service_yaml = "confidentialcomputing_v1alpha1.yaml",
transport = "grpc+rest",
deps = [],
deps = [
],
)

py_test(
Expand All @@ -194,6 +201,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand All @@ -210,10 +218,13 @@ php_gapic_library(
name = "confidentialcomputing_php_gapic",
srcs = [":confidentialcomputing_proto_with_info"],
grpc_service_config = "confidentialcomputing_v1alpha1_grpc_service_config.json",
migration_mode = "PRE_MIGRATION_SURFACE_ONLY",
rest_numeric_enums = True,
service_yaml = "confidentialcomputing_v1alpha1.yaml",
transport = "grpc+rest",
deps = [":confidentialcomputing_php_proto"],
deps = [
":confidentialcomputing_php_proto",
],
)

# Open Source Packages
Expand All @@ -228,6 +239,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand Down Expand Up @@ -258,6 +270,7 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
Expand All @@ -280,12 +293,11 @@ ruby_grpc_library(
ruby_cloud_gapic_library(
name = "confidentialcomputing_ruby_gapic",
srcs = [":confidentialcomputing_proto_with_info"],
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-confidentialcomputing-v1alpha1",
],
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-confidentialcomputing-v1alpha1"],
grpc_service_config = "confidentialcomputing_v1alpha1_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "confidentialcomputing_v1alpha1.yaml",
transport = "grpc+rest",
deps = [
":confidentialcomputing_ruby_grpc",
":confidentialcomputing_ruby_proto",
Expand All @@ -305,6 +317,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand All @@ -315,6 +328,7 @@ load(

csharp_proto_library(
name = "confidentialcomputing_csharp_proto",
extra_opts = [],
deps = [":confidentialcomputing_proto"],
)

Expand All @@ -331,6 +345,7 @@ csharp_gapic_library(
grpc_service_config = "confidentialcomputing_v1alpha1_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "confidentialcomputing_v1alpha1.yaml",
transport = "grpc+rest",
deps = [
":confidentialcomputing_csharp_grpc",
":confidentialcomputing_csharp_proto",
Expand All @@ -350,6 +365,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down

0 comments on commit 9b6f3aa

Please sign in to comment.