Skip to content

Commit 5afbbeb

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add a token_type options proto to allow for customization of specific token types. Added the first token type option to hold principal tag token options
PiperOrigin-RevId: 700050491
1 parent 9ed52d4 commit 5afbbeb

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

google/cloud/confidentialcomputing/v1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ load(
330330

331331
csharp_proto_library(
332332
name = "confidentialcomputing_csharp_proto",
333+
extra_opts = [],
333334
deps = [":confidentialcomputing_proto"],
334335
)
335336

google/cloud/confidentialcomputing/v1/service.proto

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ enum TokenType {
8585

8686
// Limited claim token type for AWS integration
8787
TOKEN_TYPE_LIMITED_AWS = 3;
88+
89+
// Principal-tag-based token for AWS integration
90+
TOKEN_TYPE_AWS_PRINCIPALTAGS = 4;
8891
}
8992

9093
// A Challenge from the server used to guarantee freshness of attestations
@@ -227,6 +230,37 @@ message GcpCredentials {
227230

228231
// Options to modify claims in the token to generate custom-purpose tokens.
229232
message TokenOptions {
233+
// Token options that only apply to the AWS Principal Tags token type.
234+
message AwsPrincipalTagsOptions {
235+
// Allowed principal tags is used to define what principal tags will be
236+
// placed in the token.
237+
message AllowedPrincipalTags {
238+
// Allowed Container Image Signatures. Key IDs are required to allow this
239+
// claim to fit within the narrow AWS IAM restrictions.
240+
message ContainerImageSignatures {
241+
// Optional. List of key ids to filter into the Principal tags. Only
242+
// keys that have been validated and added to the token will be filtered
243+
// into principal tags. Unrecognized key ids will be ignored.
244+
repeated string key_ids = 1 [(google.api.field_behavior) = OPTIONAL];
245+
}
246+
247+
// Optional. Container image signatures allowed in the token.
248+
ContainerImageSignatures container_image_signatures = 1
249+
[(google.api.field_behavior) = OPTIONAL];
250+
}
251+
252+
// Optional. Principal tags to allow in the token.
253+
AllowedPrincipalTags allowed_principal_tags = 1
254+
[(google.api.field_behavior) = OPTIONAL];
255+
}
256+
257+
// An optional additional configuration per token type.
258+
oneof token_type_options {
259+
// Optional. Options for the Limited AWS token type.
260+
AwsPrincipalTagsOptions aws_principal_tags_options = 4
261+
[(google.api.field_behavior) = OPTIONAL];
262+
}
263+
230264
// Optional. Optional string to issue the token with a custom audience claim.
231265
// Required if one or more nonces are specified.
232266
string audience = 1 [(google.api.field_behavior) = OPTIONAL];

google/cloud/confidentialcomputing/v1alpha1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ load(
328328

329329
csharp_proto_library(
330330
name = "confidentialcomputing_csharp_proto",
331+
extra_opts = [],
331332
deps = [":confidentialcomputing_proto"],
332333
)
333334

0 commit comments

Comments
 (0)