server.proto RawHistoryFolder
1// SPDX-License-Identifier: MIT
2
3syntax = "proto3";
4
5package ermite;
6
7// ServerService describes the server itself.
8service ServerService {
9 // GetVersion returns the server version and the optional capabilities of the
10 // contract it implements. It needs no authentication, so a client can call
11 // it first to check compatibility.
12 rpc GetVersion(GetVersionRequest) returns (GetVersionResponse);
13 // GetSigningKey returns the public key with which the server signs the
14 // commits it creates (squash merges, see MergeMode). It needs no
15 // authentication: the key is public, and anyone verifying a commit needs it.
16 // Servers that implement it list "signing_key" in
17 // GetVersionResponse.features.
18 rpc GetSigningKey(GetSigningKeyRequest) returns (GetSigningKeyResponse);
19}
20
21// GetVersionRequest is empty.
22message GetVersionRequest {}
23
24// GetVersionResponse describes the running server.
25message GetVersionResponse {
26 // Version is the server release, for example "v0.4.0", or "devel" for an
27 // untagged build. Informational: clients must not compare it to decide what
28 // is supported, they use features instead.
29 string version = 1;
30 // Features lists identifiers of the optional capabilities of the contract
31 // that this server implements, for example "repo.update" or
32 // "events.resume". A client that needs a capability missing from this list
33 // should warn instead of failing on an unimplemented RPC or ignored field.
34 // Identifiers are lowercase, dot-separated and never reused. The CI
35 // identifiers are "ci.runs" (RunService runs, jobs, logs, checks, and the
36 // run_updated and job_updated events), "ci.runs.filters" (ListRuns honours
37 // its filters) and "ci.runners" (RunnerService, and RunService.ListRunners
38 // and RemoveRunner).
39 repeated string features = 2;
40}
41
42// GetSigningKeyRequest is empty.
43message GetSigningKeyRequest {}
44
45// GetSigningKeyResponse describes the commit signing key of the server.
46message GetSigningKeyResponse {
47 // PublicKey is the public key as one OpenSSH authorized_keys line, for
48 // example "ssh-ed25519 AAAA...". Commits are signed in the SSH signature
49 // format (SSHSIG).
50 string public_key = 1;
51 // Fingerprint is the SHA-256 fingerprint of the key, in the form
52 // "SHA256:<base64>" that ssh-keygen prints.
53 string fingerprint = 2;
54 // CommitterName is the name the server records as the committer of the
55 // commits it creates.
56 string committer_name = 3;
57 // CommitterEmail is the email address the server records as the committer of
58 // the commits it creates. It is the principal of allowed_signers.
59 string committer_email = 4;
60 // AllowedSigners is a ready-to-use line for an allowed signers file
61 // ("<committer_email> <public_key>"), to verify these commits with
62 // "git config gpg.ssh.allowedSignersFile".
63 string allowed_signers = 5;
64}