Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import "google/protobuf/timestamp.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization";
option java_multiple_files = true;
option java_outer_classname = "BinaryAuthorizationResourcesProto";
option java_package = "com.google.cloud.binaryauthorization.v1beta1";
option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1";
option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1";

Expand Down
113 changes: 73 additions & 40 deletions protos/google/cloud/binaryauthorization/v1beta1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import "google/protobuf/empty.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization";
option java_multiple_files = true;
option java_outer_classname = "BinaryAuthorizationServiceProto";
option java_package = "com.google.cloud.binaryauthorization.v1beta1";
option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1";
option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1";

Expand All @@ -41,27 +44,33 @@ option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1";
// * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor]
service BinauthzManagementServiceV1Beta1 {
option (google.api.default_host) = "binaryauthorization.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
// a container image, before the project is allowed to deploy that
// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the
// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must
// attest to a container image, before the project is allowed to deploy that
// image. There is at most one policy per project. All image admission
// requests are permitted if a project has no policy.
//
// Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
// [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
// Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this
// project. Returns a default
// [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project
// does not have one.
rpc GetPolicy(GetPolicyRequest) returns (Policy) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/policy}"
};
option (google.api.method_signature) = "name";
}

// Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
// new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
// conditions with concurrent policy enforcement (or management!)
// requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
// if the request is malformed.
// Creates or updates a project's
// [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a
// copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy].
// A policy is always updated as a whole, to avoid race conditions with
// concurrent policy enforcement (or management!) requests. Returns NOT_FOUND
// if the project does not exist, INVALID_ARGUMENT if the request is
// malformed.
rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy) {
option (google.api.http) = {
put: "/v1beta1/{policy.name=projects/*/policy}"
Expand All @@ -70,10 +79,13 @@ service BinauthzManagementServiceV1Beta1 {
option (google.api.method_signature) = "policy";
}

// Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
// INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
// Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor],
// and returns a copy of the new
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns
// NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is
// malformed, ALREADY_EXISTS if the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already
// exists.
rpc CreateAttestor(CreateAttestorRequest) returns (Attestor) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*}/attestors"
Expand All @@ -83,7 +95,9 @@ service BinauthzManagementServiceV1Beta1 {
}

// Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
// Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
// Returns NOT_FOUND if the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
// exist.
rpc GetAttestor(GetAttestorRequest) returns (Attestor) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/attestors/*}"
Expand All @@ -92,7 +106,9 @@ service BinauthzManagementServiceV1Beta1 {
}

// Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
// Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
// Returns NOT_FOUND if the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
// exist.
rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor) {
option (google.api.http) = {
put: "/v1beta1/{attestor.name=projects/*/attestors/*}"
Expand All @@ -110,8 +126,10 @@ service BinauthzManagementServiceV1Beta1 {
option (google.api.method_signature) = "parent";
}

// Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
// Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
// Returns NOT_FOUND if the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
// exist.
rpc DeleteAttestor(DeleteAttestorRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/attestors/*}"
Expand All @@ -122,8 +140,9 @@ service BinauthzManagementServiceV1Beta1 {

// Request message for [BinauthzManagementService.GetPolicy][].
message GetPolicyRequest {
// Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
// in the format `projects/*/policy`.
// Required. The resource name of the
// [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
// the format `projects/*/policy`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -134,35 +153,42 @@ message GetPolicyRequest {

// Request message for [BinauthzManagementService.UpdatePolicy][].
message UpdatePolicyRequest {
// Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
// overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
// the request URL, in the format `projects/*/policy`.
// Required. A new or updated
// [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
// service will overwrite the [policy
// name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
// resource name in the request URL, in the format `projects/*/policy`.
Policy policy = 1 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [BinauthzManagementService.CreateAttestor][].
message CreateAttestorRequest {
// Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
// Required. The parent of this
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudresourcemanager.googleapis.com/Project"
}
];

// Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
// Required. The
// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
string attestor_id = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
// overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
// in the format `projects/*/attestors/*`.
// Required. The initial
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
// service will overwrite the [attestor
// name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
// the resource name, in the format `projects/*/attestors/*`.
Attestor attestor = 3 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [BinauthzManagementService.GetAttestor][].
message GetAttestorRequest {
// Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
// `projects/*/attestors/*`.
// Required. The name of the
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
// in the format `projects/*/attestors/*`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -173,16 +199,20 @@ message GetAttestorRequest {

// Request message for [BinauthzManagementService.UpdateAttestor][].
message UpdateAttestorRequest {
// Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
// overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
// in the request URL, in the format `projects/*/attestors/*`.
// Required. The updated
// [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
// service will overwrite the [attestor
// name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
// the resource name in the request URL, in the format
// `projects/*/attestors/*`.
Attestor attestor = 1 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [BinauthzManagementService.ListAttestors][].
message ListAttestorsRequest {
// Required. The resource name of the project associated with the
// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
// format `projects/*`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -195,8 +225,9 @@ message ListAttestorsRequest {
int32 page_size = 2;

// A token identifying a page of results the server should return. Typically,
// this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
// from the previous call to the `ListAttestors` method.
// this is the value of
// [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
// returned from the previous call to the `ListAttestors` method.
string page_token = 3;
}

Expand All @@ -206,15 +237,17 @@ message ListAttestorsResponse {
repeated Attestor attestors = 1;

// A token to retrieve the next page of results. Pass this value in the
// [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
// `ListAttestors` method to retrieve the next page of results.
// [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
// field in the subsequent call to the `ListAttestors` method to retrieve the
// next page of results.
string next_page_token = 2;
}

// Request message for [BinauthzManagementService.DeleteAttestor][].
message DeleteAttestorRequest {
// Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
// `projects/*/attestors/*`.
// Required. The name of the
// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
// in the format `projects/*/attestors/*`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down
3 changes: 3 additions & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading