Merge BYOW GA branch to main (#2398)

* feat(workers): Add ability to read and reinitialize cert authority (#2312)

* feat(workers): Return Release Version on worker list and read (#2377)

* feat(cli): Read and reinitialize worker certificate authority (#2387)
This commit is contained in:
Irena Rindos authored and GitHub committed 2022-09-08 13:19:21 -04:00
1 parent cee5ff7599
commit 18dff62b7b
50 files changed
+2401 -462

No files matched your search

@@ -86,6 +86,27 @@ message Worker {
// Output only. The api tags set for the worker.
map<string, google.protobuf.ListValue> api_tags = 180 [json_name = "api_tags"]; // @gotags: `class:"public"`
// Output only. The version of the Boundary binary the worker is running.
string release_version = 190 [json_name = "release_version"]; // @gotags: `class:"public"`
// Output only. The available actions on this resource for the requester.
repeated string authorized_actions = 300 [json_name = "authorized_actions"]; // @gotags: `class:"public"`
}
message Certificate {
// Output only. The ID of the certificate
string id = 10; // @gotags: `class:"public"`
// Output only. The public key of the cert authority
string public_key_sha256 = 20; // @gotags: `class:"public"`
// Output only. The time before which this CA is invalid
google.protobuf.Timestamp not_before_time = 30; // @gotags: `class:"public"`
// Output only. The time after which this CA is invalid
google.protobuf.Timestamp not_after_time = 40; // @gotags: `class:"public"`
}
message CertificateAuthority {
repeated Certificate certs = 10; // @gotags: `class:"public"`
}
@@ -141,6 +141,28 @@ service WorkerService {
summary: "Removes api tags from an existing Worker."
};
}
// ReadCertificateAuthority returns the current and next set of root certificates
rpc ReadCertificateAuthority(ReadCertificateAuthorityRequest) returns (ReadCertificateAuthorityResponse) {
option (google.api.http) = {
get: "/v1/workers:read-certificate-authority"
response_body: "item"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Retrieves root certificates used for worker authentication."
};
}
// ReinitializeCas removes both current and next root certs and replaces them with a new set
rpc ReinitializeCertificateAuthority(ReinitializeCertificateAuthorityRequest) returns (ReinitializeCertificateAuthorityResponse) {
option (google.api.http) = {
post: "/v1/workers:reinitialize-certificate-authority"
response_body: "item"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Reinitializes root certificates used for worker authentication."
};
}
}
message GetWorkerRequest {
@@ -230,3 +252,19 @@ message RemoveWorkerTagsRequest {
message RemoveWorkerTagsResponse {
resources.workers.v1.Worker item = 1;
}
message ReadCertificateAuthorityRequest {
string scope_id = 1; // @gotags: `class:"public"`
}
message ReadCertificateAuthorityResponse {
resources.workers.v1.CertificateAuthority item = 1;
}
message ReinitializeCertificateAuthorityRequest {
string scope_id = 1; // @gotags: `class:"public"`
}
message ReinitializeCertificateAuthorityResponse {
resources.workers.v1.CertificateAuthority item = 1;
}