docs: improve comments in security proto

The existing comments did not match the service definition (they look
like copy paste from another service). I also added a little bit more
comments for the fields in the request and response.

Signed-off-by: Tomasz Zurkowski <zurkowski@google.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
Tomasz Zurkowski 2022-03-14 22:23:52 +01:00 committed by Andrey Smirnov
parent caf800fe84
commit cc7719c9d0
No known key found for this signature in database
GPG Key ID: 7B26396447AB6DFD
3 changed files with 16 additions and 10 deletions

View File

@ -9,13 +9,16 @@ service SecurityService {
rpc Certificate(CertificateRequest) returns (CertificateResponse);
}
// The request message containing the process name.
// The request message containing the certificate signing request.
message CertificateRequest {
// Certificate Signing Request in PEM format.
bytes csr = 1;
}
// The response message containing the requested logs.
// The response message containing signed certificate.
message CertificateResponse {
// Certificate of the CA that signed the requested certificate in PEM format.
bytes ca = 1;
// Signed X.509 requested certificate in PEM format.
bytes crt = 2;
}

View File

@ -21,12 +21,13 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The request message containing the process name.
// The request message containing the certificate signing request.
type CertificateRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Certificate Signing Request in PEM format.
Csr []byte `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
}
@ -69,13 +70,15 @@ func (x *CertificateRequest) GetCsr() []byte {
return nil
}
// The response message containing the requested logs.
// The response message containing signed certificate.
type CertificateResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ca []byte `protobuf:"bytes,1,opt,name=ca,proto3" json:"ca,omitempty"`
// Certificate of the CA that signed the requested certificate in PEM format.
Ca []byte `protobuf:"bytes,1,opt,name=ca,proto3" json:"ca,omitempty"`
// Signed X.509 requested certificate in PEM format.
Crt []byte `protobuf:"bytes,2,opt,name=crt,proto3" json:"crt,omitempty"`
}

View File

@ -3067,12 +3067,12 @@ ResourceService provides user-facing API for the Talos resources.
<a name="securityapi.CertificateRequest"></a>
### CertificateRequest
The request message containing the process name.
The request message containing the certificate signing request.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| csr | [bytes](#bytes) | | |
| csr | [bytes](#bytes) | | Certificate Signing Request in PEM format. |
@ -3082,13 +3082,13 @@ The request message containing the process name.
<a name="securityapi.CertificateResponse"></a>
### CertificateResponse
The response message containing the requested logs.
The response message containing signed certificate.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| ca | [bytes](#bytes) | | |
| crt | [bytes](#bytes) | | |
| ca | [bytes](#bytes) | | Certificate of the CA that signed the requested certificate in PEM format. |
| crt | [bytes](#bytes) | | Signed X.509 requested certificate in PEM format. |