-
Notifications
You must be signed in to change notification settings - Fork 0
/
pki.proto
96 lines (79 loc) · 2.28 KB
/
pki.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
syntax = "proto3";
package pkiService;
option go_package = "github.com/hm-edu/portal-apis";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
service SSLService {
rpc ListCertificates(ListSslRequest) returns (ListSslResponse);
rpc CertificateDetails(CertificateDetailsRequest) returns (SslCertificateDetails);
rpc IssueCertificate(IssueSslRequest) returns (IssueSslResponse);
rpc RevokeCertificate(RevokeSslRequest) returns (google.protobuf.Empty);
}
service SmimeService {
rpc ListCertificates(ListSmimeRequest) returns (ListSmimeResponse);
rpc IssueCertificate(IssueSmimeRequest) returns (IssueSmimeResponse);
rpc RevokeCertificate(RevokeSmimeRequest) returns (google.protobuf.Empty);
}
message RevokeSmimeRequest {
oneof identifier {
string serial = 1;
string email = 2;
}
string reason = 3;
}
message ListSmimeRequest { string email = 1; }
message IssueSmimeRequest {
string csr = 1;
string email = 2;
string first_name = 3;
string last_name = 4;
string middle_name = 5;
string common_name = 6;
bool student = 7;
bool validation_standard = 8;
}
message IssueSmimeResponse { string certificate = 1; }
message ListSmimeResponse {
message CertificateDetails {
int32 id = 1;
string status = 2;
string serial = 3;
google.protobuf.Timestamp expires = 4;
}
repeated CertificateDetails certificates = 1;
}
message ListSslRequest {
repeated string domains = 1;
bool include_partial = 2;
}
message SslCertificateDetails {
int32 id = 1;
string common_name = 2;
string status = 3;
string serial = 4;
repeated string subject_alternative_names = 5;
google.protobuf.Timestamp expires = 6;
google.protobuf.Timestamp not_before = 7;
string issued_by = 8;
google.protobuf.Timestamp created = 9;
string source = 10;
int32 db_id = 11;
string ca = 12;
}
message ListSslResponse { repeated SslCertificateDetails items = 1; }
message CertificateDetailsRequest { string serial = 1; }
message IssueSslRequest {
string csr = 1;
repeated string subject_alternative_names = 2;
reserved 3;
string issuer = 4;
string source = 5;
}
message IssueSslResponse { string certificate = 1; }
message RevokeSslRequest {
oneof identifier {
string serial = 1;
string common_name = 2;
}
string reason = 3;
}